Events a WhatsApp agent can send
They arrive in that order:
chat_completed first, then the two analysis events as each finishes, then all_processing_completed. An analysis event is skipped when its analysis didn’t succeed, but all_processing_completed still fires and carries the status.
Call events (
call_started, call_ringing, call_ongoing, call_completed, recording_completed) never fire for a chat, so they aren’t offered on a WhatsApp agent. Subscribing to one through the API returns 400: Event type ‘call_completed’ is not available for a WhatsApp agent — it can only be produced by a voice call. Likewise, chat_completed can’t be added to a voice agent.Create a subscription
1
Open Event Subscription
In the agent editor, select Event Subscription under Advanced Settings.
2
Enter your endpoint
Choose the Method (POST by default) and enter the Callback URL, for example
https://your-domain.com/webhook.3
Select events
Tick the events you want. Only the four chat events above are listed for a WhatsApp agent.
4
Add headers (optional)
Use Add Header for anything your endpoint needs, such as an
Authorization token.5
Save
Select Create Subscription. Each event type can have up to four subscriptions.
Event Subscription on a WhatsApp agent offers only the chat events.
Payload
Every chat event shares the same base fields, and none of them carriescall_id or call_sid. Use entity_type to tell chat events from call events on a shared endpoint.
- chat_completed
- all_processing_completed
platform_analysis_completed and client_analysis_completed carry the base fields and transcript, plus that analysis in analysis_data and its status.
Delivery and retries
- Requests use the subscription’s method with
Content-Type: application/jsonplus your custom headers. AGETsubscription is sent without a body. - Your endpoint has 30 seconds to respond. Any
2xxcounts as delivered. 5xxresponses and timeouts are retried with backoff. A429is retried more slowly. Other4xxresponses are not retried.- The same event can be delivered more than once, so make your handler idempotent on
chat_id+event_type.