Notifications
Update Notifications
REST APIs
- Organizations
- Folders
- Documents
- Users
- Organization User Groups
- Comments Feature
- Notifications
- Live State
SDK
- APIs
- Models
Notifications
Update Notifications
POST
/
v1
/
notifications
/
update
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": {}
}
}
}'
{
"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.
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)",
}
]
}
}
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?
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": {}
}
}
}'
{
"result": {
"status": "success",
"message": "Notification(s) updated successfully.",
"data": {
"5471488637912692": {
"success": true,
"message": "Notification updated."
}
}
}
}