Skip to main content

Receiving Template Registration Status

Last updated: 30 May 2022

This article describes a callback function for transmitting information about template status changes. A callback is a request that transmits information about a template status change to your server. The request parameters are passed in the request body.

Connection URL

To receive the template's callback statuses in your personal account in the section Integration > Setup in the Callback URL field for the Management API, specify your system's API endpoint, which will process incoming POST requests from API-edna.

warning

Only HTTPS protocol is supported.

Example of the incoming POST request body

[
{
"id": 0,
"name": "string",
"channelType": "SMS",
"language": "string",
"content": {
"attachment": {
"id": 0,
"fileUrl": "string",
"originalFileName": "string",
"size": 0
},
"action": "string",
"caption": "string",
"header": {
"headerType": "TEXT",
"text": "string",
"attachment": {
"id": 0,
"fileUrl": "string",
"originalFileName": "string",
"size": 0
},
"headerExampleTextParam": "string",
"headerExampleMediaUrl": "string"
},
"text": "string",
"footer": {
"text": "string"
},
"keyboard": {
"rows": [
{
"buttons": [
{
"text": "string",
"buttonType": "PHONE",
"url": "string",
"urlPostfix": "string",
"phone": "string",
"payload": "string",
"urlTextExample": "string"
}
]
}
]
},
"textExampleParams": [
"string"
]
},
"contentType": "TEXT",
"category": "ACCOUNT_UPDATE",
"status": "string",
"locked": true,
"type": "OPERATOR",
"createdAt": "2023-07-21T13:51:47.862Z",
"updatedAt": "2023-07-21T13:51:47.862Z"
}
]
info

If there are no buttons in the template, an empty keyboard' object will be returned.:{"row":[{"buttons":[]}]}}

Request Format

The parameters of the message-matchers method are returned in the request body.

File IconCreating Operator Templates

Template Statuses

  • APPROVED – active. This is the only status where the template can be used to send messages.;
  • REJECTED – rejected by the operator;
  • PENDING – on registration;
  • NOT_SENT – draft;
  • ARCHIVED – in the archive;
  • PAUSED – suspended;
  • DISABLED – disabled.

Response Format

In response to a request from your server, the status of its execution with the code 200 should be returned.

If the code 200 does not arrive in response to the callback request, edna Pulse performs 10 more request attempts with an interval of 2 seconds between attempts (where X is the attempt number) until the code 200 arrives in response.

info

That is, every 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 seconds.