This article covers a callback function that passes information about the changes in a template’s registration status. Callback is a request that passes information to your server. The request parameters are passed in the request body.
URL
To receive callbacks about template registration statuses, in your edna dashboard, go to the Settings tab on Integration page, and in the Callback URL for managing API field, specify your system’s API endpoint that will process incoming POST requests from edna API.
Only the HTTPS protocol is supported.
Example of an Incoming POST Request
{ "messageMatcher": { "name": "new_matcher_2", "channelType": "WHATSAPP", "language": "EN", "content": { "header": { "headerType": "TEXT", "text": "Hello, thank you for choosing us." }, "text": "string", "footer": { "text": "my footer text" } }, "category": "MARKETING", "status": "APPROVED", "locked": false, "type": "OPERATOR", "createdAt": "2022-05-05T11:34:34.844Z", "updatedAt": "2022-05-05T11:34:34.844Z" }, "subjectIds": [ 18594 ] }
Request Parameters
Parameter | Data type | Description |
messageMatcher | object | Object with the template data |
name | string | Template name |
channelType | string | Interaction channel type. Possible values are: WHATSAPP , VIBER , SMS |
language | string | Template language |
content | object | Object with the template contents |
category | string | Template category |
type | string | Template type. Possible values are: • OPERATOR – Operator template (a template that was registered with a service provider)• USER – User template (a template that was created by a user based on an operator template) |
subjectIds | integer | Array of identifiers of the subjects of the channels for which the template is being created. To retrieve the IDs, use the channel-profile method. |
createdAt | string | Template creation date |
updatedAt | string | Template status change date |
status | string | Template registration status |
locked | boolean | Attribute that defines whether the template is blocked. Possible values are: • TRUE – The template is blocked• FALSE – The template is active |
Response Format
As a response to the request from your server, its status with code 200
must return.