curl --request POST \
--url https://api.velt.dev/v2/notifications/add \
--header 'Content-Type: application/json' \
--header 'x-velt-api-key: <x-velt-api-key>' \
--header 'x-velt-auth-token: <x-velt-auth-token>' \
--data '{
"data": {
"organizationId": "<string>",
"documentId": "<string>",
"actionUser": {},
"notificationId": "<string>",
"displayHeadlineMessageTemplate": "<string>",
"displayHeadlineMessageTemplateData": {
"actionUser": {},
"recipientUser": "<string>",
"yourCustomField": "<string>"
},
"displayBodyMessage": "<string>",
"notifyUsers": [
{}
],
"notifyAll": true,
"notificationSourceData": {},
"createDocument": true,
"createOrganization": true
}
}'
{
"result": {
"status": "success",
"message": "Notification added successfully.",
"data": {
"success": true,
"message": "Notification added successfully."
}
}
}
curl --request POST \
--url https://api.velt.dev/v2/notifications/add \
--header 'Content-Type: application/json' \
--header 'x-velt-api-key: <x-velt-api-key>' \
--header 'x-velt-auth-token: <x-velt-auth-token>' \
--data '{
"data": {
"organizationId": "<string>",
"documentId": "<string>",
"actionUser": {},
"notificationId": "<string>",
"displayHeadlineMessageTemplate": "<string>",
"displayHeadlineMessageTemplateData": {
"actionUser": {},
"recipientUser": "<string>",
"yourCustomField": "<string>"
},
"displayBodyMessage": "<string>",
"notifyUsers": [
{}
],
"notifyAll": true,
"notificationSourceData": {},
"createDocument": true,
"createOrganization": true
}
}'
{
"result": {
"status": "success",
"message": "Notification added successfully.",
"data": {
"success": true,
"message": "Notification added successfully."
}
}
}
POST https://api.velt.dev/v2/notifications/add
Show properties
_
, -
are allowed.notifyUsers
array.{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"actionUser": {
"userId": "yourUserId",
"name": "User Name",
"email": "user@example.com"
},
"displayHeadlineMessageTemplate": "This is main template, you can pass variables using curly brackets like this: {actionUser}, {recipientUser}, {yourCustomVariableWithStringValue}",
"displayHeadlineMessageTemplateData": {
"actionUser": {
"userId": "yourUserId",
"name": "User Name",
"email": "user@example.com"
},
"recipientUser": {
"userId": "recipientUserId",
"name": "Recipient Name",
"email": "recipient@example.com"
},
"yourCustomField": "Variable will be replaced with this text"
},
"displayBodyMessage": "This is body message (Secondary message)",
"notifyUsers": [
{
"email": "test@example.com",
"userId": "testingUserId"
},
{
"userId": "yourUserId",
"name": "User Name",
"email": "user@example.com"
}
]
}
}
{
"result": {
"status": "success",
"message": "Notification added successfully.",
"data": {
"success": true,
"message": "Notification added successfully."
}
}
}
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
{
"result": {
"status": "success",
"message": "Notification added successfully.",
"data": {
"success": true,
"message": "Notification added successfully."
}
}
}
Was this page helpful?