v1

latestOpenAPI 3.0.32026-07-24156161.2 MB
Webhooks management

Create Webhook

Register a webhook to receive event callbacks. name, url, headers, and retries are required.

Authentication: TextPeak API key in the Authorization header (see Authentication in the API Overview).

post/webhooks

Request body

namestring required

Webhook name.

urlstring required

Destination URL that receives the callback.

webhookTrigger'INCOMING_MESSAGE' | 'SHORT_URL_CLICK' | 'MESSAGE_DELIVERY' | 'EDR_INFORMATION' | 'CALL_PERMISSION'

The event that fires this webhook.

method'GET' | 'POST'

HTTP method used for the callback.

paramsobject

Payload options (send_bulk, include_message_text, include_contact_details, include_lead_id, extended).

headersobject required

Custom HTTP headers sent with each callback.

retriesinteger required

Number of retry attempts on failure.

activatedboolean

Whether the webhook is active.

Example request

{
  "name": "Delivery receipts",
  "url": "https://example.com/webhooks/delivery",
  "webhookTrigger": "MESSAGE_DELIVERY",
  "method": "POST",
  "filter": {
    "stream_id": 5
  },
  "headers": {
    "X-Token": "your-shared-secret"
  },
  "retries": 3,
  "activated": true
}

Response

The created webhook.

idinteger

Unique webhook identifier.

namestring

Webhook name.

urlstring

Destination URL that receives the callback.

webhookTrigger'INCOMING_MESSAGE' | 'SHORT_URL_CLICK' | 'MESSAGE_DELIVERY' | 'EDR_INFORMATION' | 'CALL_PERMISSION'

The event that fires this webhook.

method'GET' | 'POST'

HTTP method used for the callback.

headersobject

Custom HTTP headers sent with each callback.

retriesinteger

Number of retry attempts on failure.

activatedboolean

Whether the webhook is active.

createdAtstring

When the webhook was created.

updatedAtstring

When the webhook was last updated.

Example response

{
  "id": 3,
  "name": "Delivery receipts",
  "url": "https://example.com/webhooks/delivery",
  "webhookTrigger": "MESSAGE_DELIVERY",
  "method": "POST",
  "filter": {
    "stream_id": 5
  },
  "params": {
    "include_message_text": true
  },
  "headers": {
    "X-Token": "your-shared-secret"
  },
  "retries": 3,
  "activated": true,
  "createdAt": "2026-03-01 09:00:00",
  "updatedAt": "2026-03-02 12:30:00"
}