Skip to main content

Service Trigger Notification

POST /api/v1/notifications/service-trigger

Description

This endpoint triggers notifications to be sent based on a service API request. It supports various types of notifications such as in-app messages, email, or SMS, with custom data passed via the request body.

Headers:

  • service-api-key (required): The API key used to authenticate the service triggering the notification.
  • service-api-code (required): The API code to validate the service requesting the notification.
  • tenantId (required): The tenant ID for which the notification is being sent.

Request Body:

Media Type: application/json

  • notifications: An array of notification objects to be triggered.

Example Value:

{
"notifications": [
{
"type": "IN_APP",
"subject": "New Notification",
"message": "You have a new notification",
"userId": "USR123",
"tag": "promo",
"image": "https://example.com/image.png",
"link": "https://example.com/notification-link",
"actions": [
{
"action": "OPEN",
"title": "Open Now",
"url": "https://example.com/action-link"
}
],
"template": {
"payload": {
"key": "value",
"anotherKey": "anotherValue"
},
"templateName": "defaultTemplate"
}
}
]
}