Webhooks API
Webhooks let the platform notify your other systems the moment something happens: a new contact, a reply, an appointment booked, and more. This API manages the subscriptions themselves: which URLs receive which events. For how to receive and verify the payloads your endpoint gets, see Webhooks.
All paths are relative to https://api.dmchamp.com/v1, and every request is authenticated (see Authentication). Every field, body and response is in the API Reference; errors use the standard envelope from Errors & Pagination.
Note: Webhooks must be enabled for your account. If they are not, these endpoints return a 403.
How subscriptions work
- A subscription is a URL plus the events it receives (
subscribed_to), with its own opt-ins: a signing secret, retries, an on/off switch, and for agencies whether it also covers client accounts. - Addressing. Each subscription has an
idand an optionalname; either can be the{webhookId}in a path. Prefer the name: ids are positional, so they can shift after another subscription is deleted. Set a stablenamewhen you create one and address it by that. - Event names are exact strings. Read them live from
GET /webhooks/eventsrather than hard-coding them. The events are Contact Created, Human Alerted, Appointment Booked, Appointment Cancelled, Appointment Rescheduled, Replies, Reads, Deliveries, Credits Spent, Credits Recharged, Low Credit Balance, Contact Paused, Contact Do Not Disturb, Contact Unarchived, New Message, Contact Resumed, Chat Concluded, Task Created, Task Updated, Task Completed, Daily Summary Created, Channel Connected, Channel Disconnected, Broadcast Started, Broadcast Completed, Skool Member Joined, Skool Member Qualified and Skool Call Booked. Channel Connected is accepted insubscribed_tobut nothing emits it today, so do not build against it. Channel Disconnected fires once when a channel drops (disconnected, access expired or revoked, Instagram message access turned off); payload andreasonvalues: Channel Disconnected Webhook. New Message carriesmessage.sourceon outgoing messages (ai,human,automation,broadcast,follow_up,api,unknown). What each event means and theeventcode it sends: All Webhook Events.
Endpoints
| Task | Method + path | Explorer |
|---|---|---|
| List subscriptions | GET /webhooks |
Open in API Reference |
| List subscribable event types | GET /webhooks/events |
Open in API Reference |
| Create a subscription | POST /webhooks |
Open in API Reference |
| Update a subscription | PUT /webhooks/{webhookId} |
Open in API Reference |
| Delete a subscription | DELETE /webhooks/{webhookId} |
Open in API Reference |
| Send a test payload | POST /webhooks/{webhookId}/test |
Open in API Reference |
| Test a URL before saving it | POST /webhooks/validate |
Open in API Reference |
| Test an agent tag’s webhook | POST /webhooks/test-agent-tag |
Open in API Reference |
| Test a campaign tag’s webhook | POST /webhooks/test-campaign-tag |
Open in API Reference |
| Check delivery health | GET /webhooks/{webhookId}/health |
Open in API Reference |
| Re-enable delivery | POST /webhooks/{webhookId}/reenable |
Open in API Reference |
| Read the signing secret | GET /webhooks/{webhookId}/signing-secret |
Open in API Reference |
| Generate or rotate the signing secret | POST /webhooks/{webhookId}/signing-secret |
Open in API Reference |
| Turn signing off | DELETE /webhooks/{webhookId}/signing-secret |
Open in API Reference |
Create and update
curl -X POST "https://api.dmchamp.com/v1/webhooks?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://hooks.example.com/incoming",
"subscribed_to": ["Contact Created", "Replies"],
"name": "Order updates hook",
"retries_enabled": true,
"generate_signing_secret": true
}'
curl -X PUT "https://api.dmchamp.com/v1/webhooks/Order%20updates%20hook?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://hooks.example.com/v2/incoming", "subscribed_to": ["Replies", "Chat Concluded"] }'
Good to know
- URL rules. The URL must use
https://and be publicly reachable. Plainhttp://,localhost, private-network addresses and platform-internal addresses are refused with400. An empty or invalidsubscribed_tois also a400. namedefaults to a timestamped name.subscribed_to_tagsdoes not scope events to tags. It only narrows which tags produce a conversation-summary notification. To get a request when a specific tag is applied, set a webhook URL on that tag in the Tags tab of the agent (or campaign).signing_enabled,retries_enabledandapply_to_sub_accountsare per-subscription opt-ins, all off unless you turn them on.enableddefaults totrue.generate_signing_secret: truemints a signing secret with the subscription; it is returned once, as a top-levelsigning_secreton the response. The list never includes the secret.- On update, send at least one field; omitted fields keep their values.
subscribed_toandsubscribed_to_tagsare replaced, not merged. An update never disturbs the signing secret. - Changing the URL re-enables delivery for the new URL, giving a previously failing endpoint a fresh start.
- Deleting a subscription resets its delivery-health counters, so re-adding the same URL later starts with a clean record. An unknown id or name returns
404(Webhook not found).
Testing and delivery health
curl -X POST "https://api.dmchamp.com/v1/webhooks/0/test?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "event": "Contact Created" }'
{ "success": true, "webhook_id": "0", "delivered": false, "failure_type": "permanent", "status_code": 404, "error_message": "Request failed with status code 404" }
- A test always answers
200. The outcome is indelivered; a failed test does not return an error status.failure_typeispermanent,temporary,timeout,networkorunknown.eventis optional (one of the event names) and defaults to a delivery event. - Test deliveries never touch the health counters.
POST /webhooks/validatetests a URL you have not saved yet (the “test connection” step);/testtests a saved subscription. The two tag tests send to the webhook URL set on an agent tag or a campaign tag; tag names match exactly first, then case-insensitively, and a failed delivery is reported as a200withsuccess: false.
Check delivery health
GET /webhooks/{webhookId}/health returns how many deliveries to the subscription’s URL succeeded and failed, whether delivery is paused, and the last failure. "health": null means no delivery has been attempted yet.
When is_disabled is true, delivery to the URL was paused automatically after repeated failures. Fix your receiver, then call POST /webhooks/{webhookId}/reenable. That clears the paused flag and the failure counters but does not attempt a delivery: send a test afterwards to confirm the receiver is healthy.
Switching a subscription off
enabled is the subscription’s own on/off switch. Switching it off stops deliveries while keeping the URL, event list and signing secret intact.
curl -X PUT "https://api.dmchamp.com/v1/webhooks/0?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": false}'
- Absent means on. A subscription created before this field existed has no
enabledvalue stored and delivers normally.GET /webhooksalways reports a concrete boolean. - Switched-off subscriptions are still listed by
GET /webhooks: that is how you find them to switch back on. - A retry queued before the switch-off does not resume: the retry re-reads the subscription at send time and drops if it is switched off.
- Nothing suppressed while switched off is replayed when you switch it back on.
Distinct from the automatic pause after repeated failures, reported by the health endpoint as
is_disabledand cleared withreenable.enabledis the account’s switch;is_disabledis ours. Neither overrides the other: a subscription must be both switched on and not auto-paused to deliver.
One subscription for all client accounts (agencies)
On an agency account, set apply_to_sub_accounts: true on a subscription (at create time or with PUT) and it also receives events that happen on every one of the agency’s client accounts. One endpoint covers the whole agency, instead of re-creating the subscription on each client account.
curl -X PUT "https://api.dmchamp.com/v1/webhooks/0?apiKey=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"apply_to_sub_accounts": true}'
- The
userblock tells the accounts apart. Every payload’suserblock identifies the account the event happened on, so your receiver can route per client. - The agency subscription’s own settings apply everywhere. Its event list, signing secret and retry opt-in are used for the inherited deliveries too.
- A client account’s own subscription to the same URL wins. If a client account has its own subscription pointing at the same URL, that one is used for that account’s events: the same event is never delivered twice to one endpoint.
- Client accounts don’t see it. Inherited subscriptions do not appear in a client account’s own webhook list, and the client cannot switch them off; only the agency manages them.
- Delivery health is tracked per client account. An endpoint that keeps failing is auto-paused for the account whose deliveries failed, not for the whole agency.
subscribed_to_tagsdoes not inherit. The tag list references the agency’s own tags, which do not exist on client accounts, so conversation-summary narrowing only applies to the agency’s own events.- Inert elsewhere. On an account with no client accounts the flag stores fine and does nothing.
Headers on every delivery
| Header | Meaning |
|---|---|
X-Webhook-Delivery |
Stable id for the logical event. Identical across retries: dedupe on it. |
X-Webhook-Attempt |
1-based attempt number. |
X-Webhook-Event |
The event name. |
Signed payloads
Signing is optional, off by default, and set per subscription. When a subscription has a signing secret, every delivery carries two more headers:
| Header | Meaning |
|---|---|
X-Webhook-Signature |
v1=<hex>: HMAC-SHA256 of the string "<timestamp>.<raw request body>", keyed with the subscription’s signing secret. |
X-Webhook-Timestamp |
Send time, Unix seconds. Bound into the signature, so it cannot be altered independently. |
To verify, recompute the HMAC-SHA256 of <X-Webhook-Timestamp>.<raw request body> with your secret and compare it to the hex after v1=. Verify against the raw request body: re-serializing parsed JSON changes the bytes and breaks the comparison. Reject deliveries whose timestamp is outside a freshness window (300s is a sensible default) to prevent replay, and compare with a timing-safe function. Full Node and Python examples: Signed Payloads.
Manage the secret with the three /webhooks/{webhookId}/signing-secret routes:
curl -X POST "https://api.dmchamp.com/v1/webhooks/0/signing-secret?apiKey=YOUR_API_KEY"
GETreads it (signing_enabled: falseandsigning_secret: nullwhen signing is off).POSTcreates a secret, turning signing on, or replaces the existing one, and returns it.DELETEturns signing off.- Rotation takes effect immediately: the next delivery is signed with the new secret only. Accept both secrets briefly while you roll the change out to a live endpoint.
- All three routes need the Integrations edit permission, including the
GET. The secret is a credential that can forge deliveries, so it is not exposed to read-only roles.
Signing is not the same as API authentication. The REST API itself authenticates with API keys rather than OAuth (OAuth 2.1 does exist for MCP servers you register as bot tools), and there are no official npm or PyPI SDK packages yet: call the endpoints with any HTTP client.
Retries
Optional, off by default, and set per subscription with retries_enabled on create or update.
- A failed delivery is retried at 1m, 5m, 30m and 2h after the first attempt (about 2h40m of coverage).
- Retried: 5xx responses, timeouts and connection failures. Not retried: any 4xx. The receiver is rejecting the request itself, so replaying it unchanged only reproduces the rejection.
- Retries make duplicate delivery possible: an endpoint that processed an event but timed out before responding will see it again. Dedupe on
X-Webhook-Delivery, which is constant across attempts. This is why retries are opt-in. - The health counters count a whole delivery, not each attempt: a failure is recorded only once every retry is exhausted, so enabling retries does not make the automatic pause trigger sooner.
Next steps
- Webhooks (receiving payloads): set up your receiver and understand the payload shape.
- Authentication: the four ways to authenticate a request.
- Errors & Rate Limits: status codes and the 300 req/min limit.