Skip to main content
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

conversation_id
string
Unique identifier (UUID) of the conversation
assistant_id
string
Unique identifier (UUID) of the assistant that handled the conversation
type
string
The type of conversation. Possible values: widget, whatsapp
message_count
integer
Total number of messages exchanged in the conversation
status
string
Status of the conversation. Value: ended
extracted_variables
object
Variables extracted by AI based on your assistant’s post-call schema configuration
input_variables
object
Variables that were passed to the assistant at the start of the conversation (e.g., from pre-chat form fields or automation flows)
transcript
array
Array of message objects representing the full conversation
formatted_transcript
string
Human-readable formatted transcript with AI: and Customer: prefixes
customer_phone
string
Customer phone number (available for WhatsApp conversations, null for widget conversations)
customer_name
string
Customer name if provided (e.g., from pre-chat form), or null
sender
object
WhatsApp sender information (only present for WhatsApp conversations, null for widget)
created_at
string
ISO 8601 timestamp when the conversation started (in the user’s configured timezone)
ended_at
string
ISO 8601 timestamp when the conversation ended (in the user’s configured timezone)
{
  "conversation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "assistant_id": "f9e8d7c6-b5a4-3210-fedc-ba9876543210",
  "type": "widget",
  "message_count": 8,
  "status": "ended",
  "extracted_variables": {
    "status": true,
    "summary": "Customer asked about pricing plans and was interested in the Pro plan"
  },
  "input_variables": {
    "name": "John Doe",
    "email": "john@example.com"
  },
  "transcript": [
    {
      "role": "assistant",
      "content": "Hi! How can I help you today?"
    },
    {
      "role": "user",
      "content": "I have a question about your service."
    },
    {
      "role": "assistant",
      "content": "Of course! I'd be happy to help. What would you like to know?"
    },
    {
      "role": "user",
      "content": "What are your pricing plans?"
    }
  ],
  "formatted_transcript": "AI: Hi! How can I help you today?\nCustomer: I have a question about your service.\nAI: Of course! I'd be happy to help. What would you like to know?\nCustomer: What are your pricing plans?",
  "customer_phone": null,
  "customer_name": "John Doe",
  "sender": null,
  "created_at": "2026-02-23T09:30:00+01:00",
  "ended_at": "2026-02-23T10:00:00+01:00"
}

Retry Behavior

If your webhook endpoint returns a non-2xx status code or the request fails, the system will retry:
AttemptDelay
1st retry30 seconds
2nd retry60 seconds
3rd retry120 seconds
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 will be 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