Webhooks

Register a webhook to receive event callbacks. name, url, webhookTrigger and method are required.

URL. Must be an absolute https:// URL; anything else is rejected with 500.

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

post/webhooks

Request

  • Base URL
    https://api.commpeak.com/textpeak
  • URL
    https://api.commpeak.com/textpeak/webhooks
  • Auth
    API key in header Authorization

Request body

namestring required

Webhook name.

urlstring required

Absolute HTTPS URL that receives the callback. Other schemes are rejected.

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

The event that fires this webhook. Case-sensitive.

method'GET' | 'POST' required

HTTP method used for the callback. Case-sensitive.

headersobject nullable

Custom HTTP headers sent with each callback. Must not be null.

retriesinteger nullable

Number of retry attempts on failure.

activatedboolean nullable

Whether the webhook is active.

Example request

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

Response

Successful Response

idinteger required

Unique webhook identifier.

namestring required

Webhook name.

urlstring required

HTTPS URL that receives the callback.

webhookTrigger'INCOMING_MESSAGE' | 'SHORT_URL_CLICK' | 'MESSAGE_DELIVERY' | 'EDR_INFORMATION' | 'CALL_PERMISSION' | 'UNKNOWN' required
method'GET' | 'POST' | 'UNKNOWN' required
filterunknown required
paramsunknown required
headersunknown required
retriesinteger required

Number of retry attempts on failure.

activatedboolean required

Whether the webhook is active.

createdAtstring required

When the webhook was created. Format YYYY-MM-DD HH:MM:SS.

updatedAtstring required

When the webhook was last updated. Format YYYY-MM-DD HH:MM:SS.

Example response

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

Changes

    • breaking

      the request property became required

    • breaking

      the request property became required

    • breaking

      the request property type changed from object to no type

    • breaking

      the request property type changed from object to no type

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • warning

      the request property's maxLength was set to 255

    • warning

      the request property's maxLength was set to 255

    • warning

      removed the request property /

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      added the new UNKNOWN enum value to the response property for the response status

    • warning

      added the new UNKNOWN enum value to the response property for the response status

    • info

      api operation id createWebhook removed and replaced with create_webhook

    • info

      the endpoint scheme security APIKeyHeader was added to the API

    • info

      api tag Webhooks added

    • info

      api tag Webhooks management removed

    • info

      added subschema #2 to the request property anyOf list

    • info

      added subschema #2 to the request property anyOf list

    • info

      the request property became optional

    • info

      the request property became optional

    • info

      the request property default value true was added

    • info

      the request property default value {} was added

    • info

      the request property default value 0 was added

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status