Webhook

Webhooks are user-defined HTTP callbacks. If the user sets up a webhook for an event, and that event occurs, the platform fires a webhook to inform the user and to get verification. Learn more about webhook and its functions here.

Webhook communication is made by sending an HTTP request from the Dexatel Platform to a user’s application. When an event occurs in the Dexatel Platform an HTTP request, that might contain user data relating to the event, is triggered. This HTTP request is sent to the user’s application’s endpoint. This is the endpoint set by the user for webhook requests to be sent to. The endpoint is often referred to as the webhook URL.

Webhook endpoints are meant to configure the webhooks of the account.

Method: Read

Operation gets the details of the webhook.

URL /v1/webhooks/{id}
Method Type GET
Authorization API Key
Request Content-Type JSON
Response Content-Type JSON

Headers

Name Type Description Status
X-Dexatel-Key string API key Required

Request Body

-empty-

Response Parameters

Name Type Description
data object

Details

(see data object below)
data object
Name Type Description
id string Unique identifier of the webhook
account_id string Unique identifier of the account
url string Payload URL to which the webhook request is sent
secret string Webhook secret to sign the payload
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
create_date string Creation date of the webhook in UTC, formatted as yyyyMM-dd HH:mm:ss
update_date string Update date of the webhook in UTC, formatted as yyyyMM-dd HH:mm:ss
links object

Details

(see links object below)
links object
Name Type Description
self string URL of the webhook
account string URL of the account

Example of request body

GET: /v1/webhooks/48e200b7-be98-4360-b5c7-5dfac16b06f9
X-Dexatel-Key: 94d2f2f2884848bca861264ad86d8ace

Example of response body

status - 200

                
                        

Error Codes

The following error codes are returned in response to a user’s request which contains bad syntax or cannot be fulfilled.

Code Description
1201 Webhook is not found
1203 'data' is required
1204 'data.url' is required
1205 data.secret' is required
1206 'data.event' is required
1207 'data.event' values should be in: [MESSAGE, DELIVERY]
1208 'data.url' is too long
1209 Illegal given domain name: Contains non-LDH ASCII characters