Endpoint
POST https://api.velt.dev/v2/notifications/add
Headers
Your API key.
Your Auth Token.
Body
Params
Show properties
Show properties
Organization ID
If set to true, a new organization will be created (if it doesn’t exist) before the notification is created.
Document ID
If set to true, a new document will be created before the notification is created.
User who took the action
When enabled, notifications are only created for users who have access to the specified document.
This ensures notifications respect document access permissions configured via Access Control or Permission Provider.Default:
falseNotification ID. If not provided, Velt will generate a random ID.
Use this if you want more control on the ID being set and prevent duplicate notifications.
Only the special characters
_, - are allowed.Display Headline Message Template
Display Body Message
Array of Notify Users
Default is true.
If set to true, the notification will be sent to all users in the organization.
If set to false, the notification will be sent to only the users specified in the
notifyUsers array.Any custom object to be stored with the notification.
When the user clicks on the notification, this data will be sent in the callback.
Example Request
Copy
Ask AI
{
"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"
}
]
}
}
Example Request with Permission Verification
Copy
Ask AI
{
"data": {
"organizationId": "org1",
"documentId": "document3",
"actionUser": {
"userId": "1.1"
},
"verifyUserPermissions": true,
"displayHeadlineMessageTemplate": "This is main template, you can pass variables using curly brackets like this: {actionUser}, {recipientUser}",
"displayHeadlineMessageTemplateData": {
"actionUser": {
"userId": "1.1"
},
"recipientUser": {
"userId": "2.2"
}
},
"displayBodyMessage": "This is body message (Secondary message)",
"notifyUsers": [
{
"userId": "2.2"
}
],
"notifyAll": false
}
}
When
verifyUserPermissions is enabled, the API checks document access for each user before creating notifications. Only users with access to the document will receive notifications.Response
Success Response
Copy
Ask AI
{
"result": {
"status": "success",
"message": "Notification added successfully.",
"data": {
"success": true,
"message": "Notification added successfully."
}
}
}
Failure Response
Copy
Ask AI
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
Copy
Ask AI
{
"result": {
"status": "success",
"message": "Notification added successfully.",
"data": {
"success": true,
"message": "Notification added successfully."
}
}
}

