Skip to main content
Webhook sent after a chat conversation ends containing transcript, extracted variables, and customer data
The Conversation Ended Webhook is automatically sent to your specified webhook URL after a chat conversation (WhatsApp or Web Widget) ends. This webhook contains the full transcript, extracted variables, customer information, and sender details.

Webhook Configuration

To enable conversation ended webhooks:
  1. Use the Enable Conversation Ended Webhook API endpoint
  2. Provide your webhook URL where notifications will be sent
  3. Optionally configure post-call variables on your assistant to extract structured data from conversations

Request Format

The webhook is sent as a POST request to your configured URL with the following JSON payload:

Payload Structure

integer
Numeric identifier of the conversation (the same id shown in the dashboard conversation URL). Use conversation_id (UUID) when calling the API.
string
Unique identifier (UUID) of the conversation
string
Unique identifier (UUID) of the assistant that handled the conversation
string
The type of conversation. Possible values: widget, whatsapp
integer
Total number of messages exchanged in the conversation
string
Status of the conversation. Value: ended
object
Variables extracted by AI based on your assistant’s post-call schema configuration
object
Variables that were passed to the assistant at the start of the conversation (e.g., from pre-chat form fields or automation flows)
array
Array of message objects representing the full conversation, ordered oldest to newest
string
Human-readable formatted transcript with AI: and Customer: prefixes
array
Media files (images, videos, documents) shared during the conversation. Each entry includes a direct URL you can pass to external services (for example, image or video analysis). This is an empty array when no media was shared — media is typically present on WhatsApp conversations.
string
Customer phone number (available for WhatsApp conversations, null for widget conversations)
string
Customer name if provided (e.g., from pre-chat form), or null
object
WhatsApp sender information (only present for WhatsApp conversations, null for widget)
string
ISO 8601 timestamp when the conversation started (in the user’s configured timezone)
string
ISO 8601 timestamp when the conversation ended (in the user’s configured timezone)

Retry Behavior

If your webhook endpoint returns a non-2xx status code or the request fails, the system will retry: After 3 failed attempts, the webhook delivery is marked as failed and no further retries are attempted.

Important Notes

  • The conversation_id and assistant_id are UUIDs, not integer IDs
  • The sender field is only populated for WhatsApp conversations; it is null for web widget conversations
  • The customer_phone is only available for WhatsApp conversations
  • The customer_name comes from pre-chat form data or conversation context
  • Timestamps use the user’s configured timezone (ISO 8601 format)
  • The extracted_variables are populated from your assistant’s post-call schema evaluation
  • The input_variables contain data from pre-chat forms (web widget) or automation flows
  • The attachments array lists media (images, videos, documents) shared during the conversation, each with a downloadable url — useful for forwarding to external analysis tools. It is an empty array when no media was shared (most common on web widget conversations)