Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
create
/
webhooks
Create Webhook
curl --request POST \
  --url https://api.example.com/v1/businesses/{businessId}/create/webhooks \
  --header 'Content-Type: application/json' \
  --data '
{
  "topic": "<string>",
  "address": "<string>",
  "type": "<string>",
  "configuration": {
    "echo": true,
    "channelTypes": [
      {}
    ],
    "filters": [
      {
        "field": "<string>",
        "expression": "<string>"
      }
    ],
    "webengageConfiguration": {
      "webengageToken": "<string>",
      "webengageWebhookUrl": "<string>"
    }
  }
}
'
Register a URL that Connectly will POST to whenever a subscribed event occurs. You can register one address per topic.

Endpoint

POST https://api.connectly.ai/v1/businesses/{businessId}/create/webhooks

Request body

topic
string
required
The event topic to subscribe to.
ValueDescription
messagesInbound WhatsApp messages sent by your customers.
delivery_statusDelivery status updates: sent, delivered, read, delivery_failed.
address
string
required
Your publicly accessible HTTPS endpoint URL (e.g. https://example.com/webhook).
type
string
Integration type for this webhook. Defaults to custom.
ValueDescription
customYour own HTTP endpoint.
zapierZapier integration.
webengageWebEngage integration.
integromat_makeIntegromat / Make integration.
configuration
object
Advanced configuration options.

Examples

curl --request POST \
  --url https://api.connectly.ai/v1/businesses/{businessId}/create/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --data '{
    "topic": "messages",
    "address": "https://example.com/webhook/messages"
  }'
curl --request POST \
  --url https://api.connectly.ai/v1/businesses/{businessId}/create/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --data '{
    "topic": "delivery_status",
    "address": "https://example.com/webhook/delivery"
  }'
curl --request POST \
  --url https://api.connectly.ai/v1/businesses/{businessId}/create/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --data '{
    "topic": "delivery_status",
    "address": "https://example.com/webhook/delivery",
    "configuration": {
      "channelTypes": ["whatsapp"],
      "filters": [
        { "field": "campaign_name", "expression": "summer-promo-*" }
      ]
    }
  }'

Response

{ "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV" }
Save the returned id — you’ll need it to update or delete this registration.

Error responses

StatusMeaning
400Malformed body or invalid field values.
401Missing or invalid X-API-Key.
409An endpoint is already registered for this topic — use Update webhook instead.
500Internal server error.