---
title: "Conversation Ended Webhook"
method: POST
path: "conversation-ended"
tags: ["Webhooks"]
---

# Conversation Ended Webhook

`POST conversation-ended` (webhook)

Webhook sent after a chat conversation ends containing transcript, extracted variables, and customer data

[Docs](https://docs.famulor.io/api-v1/webhooks/conversation-ended)

## Payload

- object
  - `id` integer: Numeric identifier of the conversation (the same `id` shown in the dashboard conversation URL). Use `conversation_id` (UUID) when calling the API.
  - `conversation_id` string: Unique identifier (UUID) of the conversation
  - `assistant_id` string: Unique identifier (UUID) of the assistant that handled the conversation
  - `type` 'widget' | 'whatsapp': 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
    - `status` boolean: Whether the conversation objective was achieved
    - `summary` string: Conversation summary
    - `custom_variable` union: Any custom variables you defined in the assistant configuration
      - string
      - number
      - boolean
  - `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` object[]: Array of message objects representing the full conversation, ordered oldest to newest
    - `role` string: The sender role: `user`, `assistant`, or `system` (`system` messages mark events such as a human agent taking over the chat)
    - `content` string: The message text. For media messages this is the caption or a short placeholder (e.g. `[Image]`); audio notes contain the transcribed text
    - `timestamp` string: ISO 8601 timestamp of the individual message, in the user's configured timezone. Lets you order messages and see how long a conversation spanned (useful for chats that run over several days)
    - `timestamp_unix` integer: Unix timestamp (seconds since epoch) of the individual message. Convenient for arithmetic — e.g. computing the gap between two messages without parsing the ISO string
  - `formatted_transcript` string: Human-readable formatted transcript with `AI:` and `Customer:` prefixes
  - `attachments` object[]: 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.
    - `type` 'image' | 'video' | 'audio' | 'document': The media category. Possible values: `image`, `video`, `audio`, `document`
    - `url` string: Direct URL to download the media file
    - `filename` string: Original file name of the media
  - `customer_phone` string, nullable: 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, nullable: WhatsApp sender information (only present for WhatsApp conversations, `null` for widget)
    - `phone_number` string: The WhatsApp sender phone number
    - `display_name` string: The WhatsApp sender display name
  - `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)

## Acknowledgement `200`

Bestätige den Empfang mit 2xx. Antwortet dein Endpunkt nicht mit 2xx, wiederholt Famulor die Zustellung.

---

[API](https://skmtc.dev/famulor/apis/famulor-api.md) · [All operations](https://skmtc.dev/famulor/apis/famulor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/famulor/apis/famulor-api/revisions/3b938c370721?raw)
