Webhook Integration

Introduction

The partner will be notified about certain events, such as message delivered status, by using webhook

Once webhooks are configured successfully, the available delivery statuses will be sent to the endpoint submitted by the partner. Thus, despite the APIs which need to pull data from a server periodically to stay up to date, with webhooks, the partner does not have to send a request to the server of Dexatel to get the message delivery status. These requests are POST requests containing webhook payload sent in standard JSON format.

In this documentation, webhooks fired from events configured by the partner are described. For getting webhook configuration details, see Dexatel Messaging Integration API.

Target Audience

This document aims at the developers who already set up webhooks and want to get webhooks fired from events.

Signature

Dexatel signs every webhook request message sent to the user. The signature of each message is computed using the HMAC_SHA256 hashing algorithm, which takes the payload of the webhook, signs with the secret, and sends the computed hash code in the X-Dexatel-Signature header of the request.

Event: Delivery

Operation gets the details of the webhook.

URL {configured url}
Method Type POST
Authorization API Key
Request Content-Type JSON
Response Content-Type JSON

Headers

Name Type Description Status
X-Dexatel-Signature string X-Dexatel-Signature header Required

Request Body

Name Type Description Status
data object

Details

(see data object below)
Required
data object
Name Type Description
account_id string Unique identifier of the account to which the message was sent
message_id string Unique identifier of the message
event string Event type for which the webhook is fired.
Possible values:
• message - the webhook will be fired in case of an inbound message
• delivery - the webhook will be fired in case of an available delivery report
status string Updated status of the message
timestamp string Timestamp value of the status update

Response Parameters

Example of request body

POST: {configured url}
X-Dexatel-Key: 94d2f2f2884848bca861264ad86d8ace
Content-Type: application/json

                
                        

Example of response body

status - 200