v1

latestOpenAPI 3.0.02026-08-067074272.5 KB
Webhooks

Register Web Hook

Registers a new Web Hook. Web hooks can be registered to send callbacks when messages are received, sent, or when a contact is created. You can make multiple webhooks from the same event, but not hitting the same url. Webhooks can be used for third party integrations such as Zapier and other partner integrations. Press Callbacks below to see event types.

post/dashboards/{dashboard_id}/hooks

Path parameters

dashboard_idinteger required
Example:121

Id of dashboard

Request body

target_urlstring uri

The url that will be called when the web hook is triggered.

event'msg_sent' | 'msg_received' | 'contact_created' | 'msg_status_updated' | 'location_received' | 'payment_status_updated' | 'contact_updated'

The event type that you registered for.

http_verb'PUT' | 'POST' | 'DELETE'

The HTTP verb that will be used when the webhook is triggered. This cannot be GET.

Example request

{
  "target_url": "enter-url-here",
  "event": "msg_sent",
  "http_verb": "PUT"
}

Response

The new webhook

idinteger

The webhook identifier. You will need this identifier if you decide to remove this web hook. Deleting the dashboard will automatically remove all hooks for the deleted dashboard.

target_urlstring uri

The url that will be called when the web hook is triggered.

event'msg_sent' | 'msg_received' | 'contact_created' | 'msg_status_updated' | 'location_received' | 'payment_status_updated' | 'contact_updated'

The event type that you registered for.

dashboard_idinteger

The dashboard id for the Text Request dashboard that this web hook applies to.

httpVerb'PUT' | 'POST' | 'DELETE'

The HTTP verb that will be used when the webhook is triggered. This cannot be GET.

is_user_definedboolean

If the hook was defined from the Text Request web portal. False if the hook was defined via the API.

is_connectedboolean

If the hook was disconnected from Text Request by the webhook failing to receive a 2XX or 3XX response 10 times in a row.

Example response

{
  "id": 1414,
  "target_url": "https://www.someurl.com/user-defined-public-endpoints/webhook-endpoint",
  "event": "msg_sent",
  "dashboard_id": 121,
  "httpVerb": "PUT"
}