REST APIs
Get Notifications
POST
/
Use this API to retrieve notifications.
Endpoint
POST https://getnotifications.api.velt.dev/
Headers
x-velt-api-key
string
requiredYour API key.
x-velt-auth-token
string
requiredYour Auth Token.
Body Example
Params
data
object
requiredExample Requests
1. Get by organizationId, documentId
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId"
}
}
2. Get by organizationId, documentId and notificationIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"notificationIds": [
"yourNotificationId"
]
}
}
3. Get by organizationId, documentId and locationId
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"locationId": "yourLocationId"
}
}
4. Get by organizationId, documentId, locationId and notificationIds
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"locationId": "yourLocationId",
"notificationIds": [
"yourNotificationId"
]
}
}
5. Get by organizationId and userId
{
"data": {
"organizationId": "yourOrganizationId",
"userId": "yourUserId"
}
}
6. Get by organizationId, userId and notificationIds
{
"data": {
"organizationId": "yourOrganizationId",
"userId": "yourUserId",
"notificationIds": [
"yourNotificationId"
]
}
}
7. Get by organizationId, documentId and userId
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"userId": "yourUserId"
}
}
8. Get by organizationId, locationId and userId
{
"data": {
"organizationId": "yourOrganizationId",
"userId": "yourUserId",
"locationId": "yourLocationId"
}
}
9. Get by organizationId, documentId, locationId, and userId
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"userId": "yourUserId",
"locationId": "yourLocationId"
}
}
Response
Success Response
{
"result": {
"status": "success",
"message": "Notification(s) retrieved successfully.",
"data": [
{
"actionUser": {
"email": "user@example.com",
"name": "User Name",
"userId": "yourUserId"
},
"displayBodyMessage": "This is body message (Secondary message)",
"displayHeadlineMessageTemplate": "This is main template, you can pass variables using curly brackets like this: {actionUser}, {recipientUser}, {yourCustomVariableWithStringValue}",
"displayHeadlineMessageTemplateData": {
"actionUser": {
"email": "user@example.com",
"name": "User Name",
"userId": "yourUserId"
},
"recipientUser": {
"email": "recipient@example.com",
"name": "Recipient Name",
"userId": "recipientUserId"
},
"yourCustomVariableWithStringValue": "Variable will be replaced with this text"
},
"id": "yourNotificationId",
"metadata": {
"apiKey": "yourApiKey",
"clientDocumentId": "yourDocumentId",
"clientOrganizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"organizationId": "yourOrganizationId"
},
"notificationSource": "custom",
"notifyUsers": {
"yourNotifyUserId": true
},
"notifyUsersByUserId": {
"yourNotifyUserById": true
},
"timestamp": 1722409519944
}
]
}
}
Failure Response
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
Was this page helpful?