REST APIs
- Organizations
- Folders
- Documents
- Users
- User Groups
- Comments Feature
- Notifications
- Live State
- Workspace
SDK
- APIs
- Models
Notifications
Update Notifications
POST
/
v1
/
notifications
/
update
Copy
Ask AI
curl --request POST \
--url https://api.velt.dev/v1/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>",
"notifications": {
"id": "<string>",
"actionUser": {},
"displayHeadlineMessageTemplate": "<string>",
"displayHeadlineMessageTemplateData": {
"actionUser": {},
"recipientUser": "<string>",
"yourCustomField": "<string>"
},
"displayBodyMessage": "<string>",
"notificationSourceData": {},
"readByUserIds": [
"<string>"
],
"persistReadForUsers": true
}
}
}'
Copy
Ask AI
{
"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/v1/notifications/update
Headers
Your API key.
Your Auth Token.
Body
Params
Organization ID
Document ID (Optional)
Location ID
User ID (Optional)
Notifications object
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
Copy
Ask AI
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is body message (Secondary message)",
}
]
}
}
2. Update by organizationId, documentId and locationId
Copy
Ask AI
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"locationId": "yourLocationId",
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is body message (Secondary message)",
}
]
}
}
3. Update by organizationId, documentId and userId
Copy
Ask AI
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"userId": "yourUserId",
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is body message (Secondary message)",
}
]
}
}
4. Update by organizationId and userId
Copy
Ask AI
{
"data": {
"organizationId": "yourOrganizationId",
"userId": "yourUserId",
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is body message (Secondary message)",
}
]
}
}
5. Update by organizationId, documentId, locationId and userId
Copy
Ask AI
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"userId": "yourUserId",
"locationId": "yourLocationId",
"notifications": [
{
"id": "yourNotificationId",
"displayBodyMessage": "This is body message (Secondary message)",
}
]
}
}
Response
Success Response
Copy
Ask AI
{
"result": {
"status": "success",
"message": "Notification(s) updated successfully.",
"data": {
"5471488637912692": {
"success": true,
"message": "Notification updated."
}
}
}
}
When some notifications are not found
Copy
Ask AI
{
"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
Copy
Ask AI
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
Copy
Ask AI
{
"result": {
"status": "success",
"message": "Notification(s) updated successfully.",
"data": {
"5471488637912692": {
"success": true,
"message": "Notification updated."
}
}
}
}
Was this page helpful?
Copy
Ask AI
curl --request POST \
--url https://api.velt.dev/v1/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>",
"notifications": {
"id": "<string>",
"actionUser": {},
"displayHeadlineMessageTemplate": "<string>",
"displayHeadlineMessageTemplateData": {
"actionUser": {},
"recipientUser": "<string>",
"yourCustomField": "<string>"
},
"displayBodyMessage": "<string>",
"notificationSourceData": {},
"readByUserIds": [
"<string>"
],
"persistReadForUsers": true
}
}
}'
Copy
Ask AI
{
"result": {
"status": "success",
"message": "Notification(s) updated successfully.",
"data": {
"5471488637912692": {
"success": true,
"message": "Notification updated."
}
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.