Receiving Template Registration Status

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

ParameterData typeDescription
messageMatcherobjectObject with the template data
namestringTemplate name
channelTypestringInteraction channel type. Possible values are: WHATSAPP, VIBER, SMS
languagestringTemplate language
contentobjectObject with the template contents
categorystringTemplate category
typestringTemplate 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)
subjectIdsintegerArray of identifiers of the subjects of the channels for which the template is being created. To retrieve the IDs, use the channel-profile method.
createdAtstringTemplate creation date
updatedAtstringTemplate status change date
statusstringTemplate registration status
lockedbooleanAttribute 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.

Creating Operator Templates
Next Article Retrieving List of Templates