Skip to main content
POST
/
v1
/
campaign
/
{id}
/
webhooks
Create webhook
curl --request POST \
  --url https://api.sendo.dev/v1/campaign/{id}/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "url": "<string>",
  "eventTypes": [
    "<string>"
  ],
  "numbers": [
    "<string>"
  ]
}
'
{
  "success": true,
  "webhook": {
    "id": "d3392dbf-ae4b-43b9-9b50-dcafa5c7h4mn",
    "createdAt": "2023-12-31T03:07:35.826Z",
    "name": "Event Service",
    "url": "https://website.com/webhook",
    "campaignId": "g1tkV7Eq",
    "signature": "aVWS7HTLR9xxMkdE",
    "eventTypes": [
      "message.incoming",
      "message.status"
    ],
    "numbers": [
      "+14159436397"
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.sendo.dev/llms.txt

Use this file to discover all available pages before exploring further.

Parameters

id
string
required
The ID of the campaign for the webhook.

Body

name
string
The name for the webhook.
url
string
required
The URL for the webhook.
eventTypes
string[]
required
The webhook events that you want to receive. Options aremessage.incoming, message.status, or recipient.optout (read more).
numbers
string[]
Array of phone numbers to receive events for in . If none are provided, webhook will default to all numbers assigned to the campaign.

Response

success
boolean
Whether the webhook was created successfully.
webhook
object
The details of the new webhook.
{
  "success": true,
  "webhook": {
    "id": "d3392dbf-ae4b-43b9-9b50-dcafa5c7h4mn",
    "createdAt": "2023-12-31T03:07:35.826Z",
    "name": "Event Service",
    "url": "https://website.com/webhook",
    "campaignId": "g1tkV7Eq",
    "signature": "aVWS7HTLR9xxMkdE",
    "eventTypes": [
      "message.incoming",
      "message.status"
    ],
    "numbers": [
      "+14159436397"
    ]
  }
}