Update Notifications
curl --request POST \
--url https://api.velt.dev/v2/notifications/update \
--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>",
"locationId": "<string>",
"userId": "<string>",
"verifyUserPermissions": true,
"notifications": {
"id": "<string>",
"actionUser": {},
"displayHeadlineMessageTemplate": "<string>",
"displayHeadlineMessageTemplateData": {
"actionUser": {},
"recipientUser": "<string>",
"yourCustomField": "<string>"
},
"displayBodyMessage": "<string>",
"notificationSourceData": {},
"readByUserIds": [
"<string>"
],
"persistReadForUsers": true
}
}
}
'{
"result": {
"status": "success",
"message": "Notification(s) updated successfully.",
"data": {
"5471488637912692": {
"success": true,
"message": "Notification updated."
}
}
}
}
Notifications
Update Notifications
POST
/
v2
/
notifications
/
update
Update Notifications
curl --request POST \
--url https://api.velt.dev/v2/notifications/update \
--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>",
"locationId": "<string>",
"userId": "<string>",
"verifyUserPermissions": true,
"notifications": {
"id": "<string>",
"actionUser": {},
"displayHeadlineMessageTemplate": "<string>",
"displayHeadlineMessageTemplateData": {
"actionUser": {},
"recipientUser": "<string>",
"yourCustomField": "<string>"
},
"displayBodyMessage": "<string>",
"notificationSourceData": {},
"readByUserIds": [
"<string>"
],
"persistReadForUsers": true
}
}
}
'{
"result": {
"status": "success",
"message": "Notification(s) updated successfully.",
"data": {
"5471488637912692": {
"success": true,
"message": "Notification updated."
}
}
}
}
Use this API to update notifications.
Endpoint
POST https://api.velt.dev/v2/notifications/update
Headers
Your API key.
Your Auth Token.
Body
Params
Show properties
Show properties
Organization ID
Document ID (Optional)
Location ID
User ID (Optional)
When enabled, notifications are only updated for users who have access to the specified document.
This ensures notification updates respect document access permissions configured via Access Control or Permission Provider.Default:
falseNotifications object
Show properties
Show properties
Notification ID
User who took the action
Display Headline Message Template
Display Body Message
Any custom object to be stored with the notification.
When the user clicks on the notification, this data will be sent to in the callback.
Array of user ids that you want to mark the notification as read.
Use this with the
readByUserIds param. If true, the read notifications will be not be removed from the “For You” tab.Example Requests
1. Update by organizationId and documentId
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is body message (Secondary message)",
}
]
}
}
2. Update by organizationId, documentId and locationId
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"locationId": "yourLocationId",
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is body message (Secondary message)",
}
]
}
}
3. Update by organizationId, documentId and userId
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"userId": "yourUserId",
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is body message (Secondary message)",
}
]
}
}
4. Update by organizationId and userId
{
"data": {
"organizationId": "yourOrganizationId",
"userId": "yourUserId",
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is body message (Secondary message)",
}
]
}
}
5. Update by organizationId, documentId, locationId and userId
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"userId": "yourUserId",
"locationId": "yourLocationId",
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is body message (Secondary message)",
}
]
}
}
6. Update with Permission Verification
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"verifyUserPermissions": true,
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is updated body message (Secondary message)"
}
]
}
}
When
verifyUserPermissions is enabled, the API checks document access for each user before updating their notifications. Updates are only applied to users with access to the document.Response
Success Response
{
"result": {
"status": "success",
"message": "Notification(s) updated successfully.",
"data": {
"5471488637912692": {
"success": true,
"message": "Notification updated."
}
}
}
}
When some notifications are not found
{
"result": {
"status": "success",
"message": "Notification(s) updated successfully.",
"data": {
"5471488637912692": {
"success": false,
"message": "Failed to update notification."
},
"5471488637912693": {
"success": true,
"message": "Notification updated."
}
}
}
}
Failure Response
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
{
"result": {
"status": "success",
"message": "Notification(s) updated successfully.",
"data": {
"5471488637912692": {
"success": true,
"message": "Notification updated."
}
}
}
}
Was this page helpful?
⌘I

