How to send webhook message when chat session has ...
# support
m
Is there a way to get end of chat report or similar webhook trigger for when chats end? I have a Post Call webhook that works with voice mode so I can get a summary and transcript of the call. But I need this for Chat sessions as well (from the chat widget for example). https://cdn.discordapp.com/attachments/1424836793576067142/1424836794129711316/Screenshot_2025-10-06_at_1.10.44_PM.png?ex=68e5662b&is=68e414ab&hm=2081fe90e1d5b5754ed92407b322bc7ede711f3100f5d5182734e9528d022387&
v
Currently, Vapi does not support an "end-of-chat" webhook or report for chat sessions. The only available chat webhooks are
chat.created
and
chat.deleted
, which you can enable in your Assistant's Server Messaging settings. Example:
Copy code
json
{
  "message": {
    "type": "chat.deleted",
    "chat": { /* Chat object */ }
  }
}
For now, use the
chat.deleted
webhook to detect when a chat is deleted, but note it does not include a summary or transcript like the voice call "end-of-call-report" does. Reference: [Vapi Chat Quickstart - Webhook Support](https://docs.vapi.ai/chat/quickstart#webhook-support) Source: - [Vapi Chat Quickstart Webhook Support](https://docs.vapi.ai/chat/quickstart#webhook-support)
c
Hi Mason Anderson, For managing conversation context, Vapi offers two methods: using
previousChatId
for linking individual chats in sequence and
sessionId
for grouping multiple chats under a persistent session. If you want to maintain a conversation context across multiple chat interactions, detailed steps and code implementations can be found in the [session management documentation](https://docs.vapi.ai/chat/session-management). To set up webhooks for tracking session lifecycles like creation and deletion, configure your webhook listeners to capture events such as
session.created
,
session.updated
, and
session.deleted
. This can be done by going to your Assistant page in the Dashboard and selecting these events under "Server Messaging" as described in the session management section. For a fully developed solution, you can utilize background messages to track additional context and actions without notifying users, as detailed in the [background messages documentation](https://docs.vapi.ai/assistants/background-messages). If you are looking for an equivalent to an
end_of_call_report
for chat sessions, while there might not be an exact equivalent, leveraging the
session.deleted
webhook can serve a similar purpose to know when a chat session has ended. This can help you extract the chat transcript and other session details needed for logging or reporting. For more detailed implementation, you can refer to specific use cases in our documentation, like the [non-streaming chat guide](https://docs.vapi.ai/chat/non-streaming) for handling batch processes or simple UIs, or further explore how to handle complex multi-step conversations. If you need additional insights or assistance, feel free to ask, and I'll be happy to help.
3 Views