Webhooks
Receive real-time events from Atlas in your own systems
Webhooks let Atlas push events to your systems the moment they happen — when a
call starts or ends, or when a chat message is received or sent. Instead of
polling the API, you register a URL once and Atlas sends an HTTP POST to it
every time the event fires.
This is the inverse of Atlas Actions: Actions let your agent call out to your API during a conversation, while webhooks let Atlas notify your API after something happens.
How it works
- You register a webhook for a campaign and an event (a trigger).
- When that event fires, Atlas sends a
POSTrequest to your URL with the event payload as JSON. - Your endpoint responds quickly with a
2xxstatus code.
All requests use the standard API base URL and api-key authentication — see
API Overview.
Events
You can subscribe to four events. The triggerName value is what you pass when
subscribing.
Subscribe (create a webhook)
Register a webhook by POSTing to /events-gateway/trigger/subscribe.
A successful subscription returns 201:
Each subscription is one event for one campaign. To receive both call_started
and call_completed, subscribe twice.
Event payloads
When an event fires, Atlas sends a POST to your hookUrl with
Content-Type: application/json. The body is a JSON array containing the
event object.
call_started
call_completed
Includes everything from call_started, plus the call result:
message_received / message_sent
message_sent uses sentAt instead of receivedAt.
Before subscribing, you can fetch a sample payload built from a real campaign to develop against:
List webhooks
See every webhook registered for a campaign:
Unsubscribe (delete a webhook)
Stop delivery by sending a DELETE to /events-gateway/trigger/unsubscribe
with the same values you subscribed with:
Building your receiver
- Respond with
2xxquickly. Acknowledge the request and do any heavy processing asynchronously. Slow endpoints may time out. - Expect retries to be best-effort. If your endpoint is unreachable, the event may not be redelivered — don’t rely on a webhook as your only record of an event; the Calls and chat endpoints remain the source of truth.
- Handle duplicates. Treat delivery as at-least-once and de-duplicate on
callId(calls) or message identifiers where it matters.
Atlas does not currently sign webhook requests. Treat your hookUrl as a
secret: use HTTPS and a hard-to-guess path (for example, include a random token
in the URL) so only Atlas can post to it.
