Schedule
Schedule Notification
POST /notification/schedule
The schedule Notification endpoint allows the creation and scheduling of a notification. The service then receives requests containing the required parameters, analyzes the provided information, and, upon verification, saves the notification in a data persistence tool.
Request Body
{
"notifications": [
{
"project": "",
"clientId":Ā "",
"msg": "",
"channel": "",
"to": "",
"templateId": "",
"templateParams": "",
"notificationDate": "",
"sendNow": false
}
]
}
Parameter Name | Type | Required | Description |
---|---|---|---|
project | string | Yes | Reference project to send notifications. This allows the app to store data in a different data persistence tool. Supported values:
|
clientId | string | Yes | Could be:
|
msg | string | Yes, for SMS Optional for FBM/ WA | Message to be send by the notification. Mandatory for SMS For WA (only): if provided, the service will send the msg value, and will NOT try to use the template. |
channel | string | Yes | Way of communication where the scheduled message will be sent: Current supported values:
|
to | string | Yes | Identifier used by the specified channel to send the message. |
templateId | string | Yes | Identifier used for ALL channels to tag the type of message. This is later use for canceling scheduled messages. For WA (only): TemplateID used on the Meta service. SMS & FBM: id is for internal used (mainly to cancel notifications) |
templateParams | string | optional | Parameters to be used in the template specified. |
notificationDate | string | Yes if sendNow=false | Date on which the notification will be sent. Format: |
processId | string | optional | Allows the application to store any value or values for debugging or cross reference. Optional. |
sendNow | boolean | optional | Parameter to specify if the notification should be sent on creation time. |
Request body SMS
{
"notifications": [
{
Ā Ā Ā Ā "project": "LAC-FP",
"clientId":Ā "cMyjKYJtgSI",
Ā Ā Ā Ā "channel": "SMS",
"templateId":Ā "template_3",
"msg":Ā "hi",
"to":Ā "+26658636836",
Ā Ā Ā Ā "templateParams":Ā "",
"processId": "any data from the originator app", // optional (under dev)
Ā Ā Ā Ā "notificationDate":Ā "2024-02-23T13:18:30.800Z"
}
]
}
Request body Facebook template
{
"notifications": [
{
Ā Ā "project": "LAC-FP",
"clientId":Ā "cMyjKYJtgSI",
Ā Ā Ā Ā "channel": "facebook",
"templateId":Ā "template_3",
"msg": "message text"
"templateParams": "{'quick_replies':[{'content_type':'text','image_url':'http://example.com/img/red.png','payload':'<POSTBACK_PAYLOAD>','title':'Red'},{'content_type':'text','image_url':'http://example.com/img/green.png','payload':'<POSTBACK_PAYLOAD><','title':'Green'}],'text':'Pick a color:'}",
Ā Ā Ā Ā "to":Ā "1234jdj204",
Ā Ā Ā Ā "notificationDate":Ā "2023-11-23T13:18:30.800Z",// this will be ignored as sendNow = true
"sendNow": true}]
}
Check out official Metaās quick replies for facebook documentation to know more about the structure to use in templateParams parameter when the channel is.
We also can send a bundle of notifications:
Example Request: