v1

latestOpenAPI 3.0.32026-08-0422127127.8 KB
Webhook

Create Webhook

We use webhooks to let your application know when events happen, such as receiving an SMS message. When the event occurs, the system makes an HTTP request (usually a POST) to the URL you configured for the webhook. The request will include details of the event such as the incoming phone number or the body of an incoming message.

post/v2/webhook

Request body

event_type'LINK_HIT' | 'OPT_OUT' | 'MMS_STATUS' | 'SMS_INBOUND' | 'SMS_STATUS' | 'MMS_INBOUND' | 'WHATSAPP_STATUS' | 'WHATSAPP_INBOUND' | 'RCS_STATUS' | 'RCS_INBOUND'

Event type string values:

  • LINK_HIT: Link hit event when a recipient visits a tracked link
  • OPT_OUT: Opt out event when a recipient visits an opt-out link or by sending a message with the text "STOP"
  • MMS_STATUS: Status change for a MMS messages. Currently only comprised of internal statuses (sent, failed)
  • SMS_INBOUND: Inbound SMS sent from a recipient back to the sender
  • SMS_STATUS: Status change for a SMS message. Includes internal statuses (sent, failed) and delivery receipts (soft_bounce, hard_bounce, delivered, undelivered). Multiple status events can be triggered for a single message
  • MMS_INBOUND: Inbound MMS sent from a recipient back to the sender
  • WHATSAPP_STATUS: Status change for Whatsapp messages
  • WHATSAPP_INBOUND: Inbound Whatsapp sent from a recipient back to the sender
  • RCS_STATUS: Status change for RCS messages
  • RCS_INBOUND: Inbound RCS sent from a recipient back to the sender
namestring required

Name of the webhook

urlstring uri required

URL (https) that accepts JSON encoded POST requests

rate_limitinteger

Rate limit for your URL in requests per second. Max 10,000/sec. If set to 0 or not specified, the default system limit will be applied.

is_sandboxboolean

Deprecated. Will be removed in a future version.

Example request

{
  "filter": {
    "event_type": [
      "SMS_STATUS",
      "SMS_INBOUND"
    ],
    "sender": [
      "+61412345678",
      "+61487654321"
    ],
    "status": [
      "DELIVERED",
      "FAILED"
    ],
    "message_ref": [
      "ref123",
      "ref456"
    ],
    "campaign_id": [
      "campaign_123",
      "campaign_456"
    ]
  },
  "name": "My Webhook",
  "url": "https://example.com/webhook"
}

Response

Webhook created successfully

idstring required

Unique identifier for the webhook.

namestring required

Name of the webhook.

urlstring uri required

URL (https) that accepts JSON encoded POST requests.

rate_limitinteger required

Rate limit for the webhook in requests per second.

is_sandboxboolean required

Deprecated. Will be removed in a future version.

created_atstring date-time required

Timestamp when the webhook was created.

updated_atstring date-time required

Timestamp when the webhook was last updated.

Example response

{
  "id": "67e3e4af-62e8-4515-8b67-6f20d0c51ffb",
  "filter": {
    "event_type": [
      "SMS_STATUS",
      "SMS_INBOUND"
    ],
    "sender": [
      "+61412345678",
      "+61487654321"
    ],
    "status": [
      "DELIVERED",
      "FAILED"
    ],
    "message_ref": [
      "ref123",
      "ref456"
    ],
    "campaign_id": [
      "campaign_123",
      "campaign_456"
    ]
  },
  "name": "Hook",
  "url": "https://webhook.site/uuid",
  "rate_limit": 10,
  "created_at": "2025-04-14T00:59:32.75819Z",
  "updated_at": "2025-04-14T00:59:32.75819Z"
}