Hi Monday Team,
In your API documentation, for creating notifications, it says we can add JSON payload, but I am getting 500s constantly when I try to add it (without that argument it works well):
monday.api(`
mutation {
create_notification(
text: ${JSON.stringify(notificationText)},
user_id: ${userId},
target_id: ${itemId},
payload: ${JSON.stringify(1234)},
target_type: Project,
internal: true
) {
text
}
}
`);
Response:
{error_message: "Internal server error", status_code: 500}
Am I doing something wrong? Could you help me, please?
Additionally I have a couple questions as well: if it will work, how we can get the payload when opening a notification? I will be in the context? What is “post” target_type (I tried it but it results as 500 on my side)?
In this documentation you used “internal” argument for creating notification, what does it mean?
Thanks,
Krisztian