Skip to main content
PUT
/
v1
/
webhooks
/
{webhookId}
cURL
curl --request PUT \
  --url https://api.buildwithchirp.com/v1/webhooks/{webhookId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://example.com/webhook",
  "events": [
    "messages.sms.sent",
    "messages.whatsapp.sent"
  ],
  "headers": {
    "X-Custom-Header": "new-value"
  }
}
'
{
  "id": "whk_2DbBs7GWhGvVNJGrDXr5RG0mBWI",
  "appId": "app_2DbBs7GWhGvVNJGrDXr5RG0mBWI",
  "url": "https://example.com/webhook",
  "events": [
    "messages.sms.received",
    "messages.whatsapp.sent"
  ],
  "headers": {
    "X-Custom-Header": "value"
  },
  "createdAt": "2021-08-01T00:00:00Z",
  "updatedAt": "2021-08-01T00:00:00Z"
}

Authorizations

Authorization
string
header
required

App API key (format: sk_live_app_* or sk_test_app_*) for app-level operations

Path Parameters

webhookId
string
required

Unique identifier for a Webhook. Format: whk_[test_]{ksuid}

Example:

"whk_2DbBs7GWhGvVNJGrDXr5RG0mBWI"

Body

application/json
url
string<uri>

URL to send webhook events to

Example:

"https://example.com/webhook"

events
enum<string>[]

Events to trigger webhook. Use messages.sms.* for SMS/MMS events, or messages.whatsapp.* for WhatsApp events.

Available options:
messages.sms.received,
messages.sms.sent,
messages.sms.delivered,
messages.sms.failed,
messages.whatsapp.received,
messages.whatsapp.sent,
messages.whatsapp.delivered,
messages.whatsapp.read,
messages.whatsapp.failed,
templates.whatsapp.created,
templates.whatsapp.updated,
templates.whatsapp.deleted,
templates.whatsapp.connected,
contacts.whatsapp.created,
contacts.whatsapp.updated,
contacts.whatsapp.deleted,
whatsapp.account.connected,
whatsapp.account.disconnected
Example:
[
"messages.sms.sent",
"messages.whatsapp.sent"
]
headers
object

Custom headers to include in webhook requests

Example:
{ "X-Custom-Header": "new-value" }

Response

Update webhook

id
string
required

Unique identifier for a Webhook. Format: whk_[test_]{ksuid}

Example:

"whk_2DbBs7GWhGvVNJGrDXr5RG0mBWI"

appId
string
required

Unique identifier for a App. Format: app_[test_]{ksuid}

Example:

"app_2DbBs7GWhGvVNJGrDXr5RG0mBWI"

url
string<uri>
required

URL to send webhook events to

Example:

"https://example.com/webhook"

events
string[]
required

Events that trigger this webhook

Example:
[
"messages.sms.received",
"messages.whatsapp.sent"
]
headers
object
required

Custom headers included in webhook requests

Example:
{ "X-Custom-Header": "value" }
createdAt
string<date-time>
required

When the webhook was created

Example:

"2021-08-01T00:00:00Z"

updatedAt
string<date-time>
required

When the webhook was last updated

Example:

"2021-08-01T00:00:00Z"