Events
Each endpoint can subscribe to specific events or receive all of them. Endpoints subscribed to all events also receive event types added in the future.
Behaviors to know:
lead.capturedfires the first time a visitor leaves contact details. Repeat submissions and identify calls for the same visitor do not fire it again.- A handoff request that includes contact details fires
escalation.createdonly, not both events. The escalation payload carries the same visitor contact fields. client.credits_exhaustedfires once per exhaustion: it does not repeat while the client stays at zero, and it arms again once credits return (a top-up, a limit raise, or the monthly renewal). It only fires for clients with their ownmessage_limit, and only when their own budget runs out, not when your agency-wide pool does. Since it is a team-level event,chatbot_idisnullin the payload.
Payload
Every request body has the same envelope:idis unique per delivery and stays the same across retries, so you can deduplicate.team_idis the client workspace the event happened in.external_referenceis the billing reference you set on the client workspace, so you can map events straight to your own billing system.datais event-specific.escalation.createdaddslast_messageandinbox_url.client.credits_exhaustedcarriesmessage_limit,messages_used, andtopup_credits_remaining.
Auto-replenish flow
client.credits_exhausted pairs with the Add Top-Up Credits endpoint to automate replenishment: when the event arrives, charge the client in your own billing system, then call the top-ups API. Use the event’s delivery id as your Idempotency-Key so a retried delivery can never buy credits twice. The client’s AI agents start answering again within seconds of the top-up.
Verifying signatures
Every request includes these headers:
Your webhook secret is shown once when you create the endpoint. Verify each request by computing the HMAC over the raw body and comparing:
Node.js
PHP
Delivery and retries
- Respond with any
2xxstatus within 15 seconds to acknowledge a delivery. Redirects are not followed. - A failed delivery is attempted up to 5 times in total: the initial delivery plus 4 retries after 30 seconds, 2 minutes, 10 minutes, and 1 hour. A delivery that exhausts its attempts gets a last error ending in
(retries exhausted). - The last 30 days of delivery attempts are visible under Agency > Webhooks and via the deliveries endpoint, including response status and the last error.
- To change an endpoint’s URL or event subscriptions, use the update endpoint; the signing secret stays the same. Deleting and recreating an endpoint generates a new secret.
ping event and confirm your endpoint and signature verification work end to end.
Ready to automate your customer service with AI?
Join over 1000+ businesses, websites and startups automating their customer service and other tasks with a custom trained AI agent.