Skip to main content

conversation.closed

Insighto fires conversation.closed when a conversation reaches a final state — call ended, chat window closed, user said goodbye and the assistant finished wrapping up. Use it to push transcripts into your CRM, run post-call analytics, trigger follow-up emails, archive recordings.

When it fires

  • A voice call ends (caller hung up, AMD voicemail drop, max-duration timeout, transfer completed).
  • A chat conversation is explicitly closed by the assistant, a human agent, or after the configured inactivity window.

It does not fire for every assistant turn — only on close.

Delivery

You configure the destination URL under Settings → Webhooks → Add webhook with event type conversation.closed.

Payload shape

The envelope is consistent across all Insighto webhooks:

{
"id": "evt_01HXXXX...",
"object": "event",
"event": "conversation.closed",
"created_at": "2026-05-14T10:21:33Z",
"data": {
"conversation_id": "conv_01HX...",
"assistant_id": "asst_01HX...",
"widget_id": "wid_01HX...",
"device_type": "web",
"contact_id": "cnt_01HX...",
"chat_count": 12,
"first_message": "Hi, do you have this dress in size 8?",
"transcript": [
{ "role": "user", "content": "Hi, do you have this dress in size 8?", "ts": "2026-05-14T10:18:01Z" },
{ "role": "assistant", "content": "Yes — both navy and cream are in stock. Want the link?", "ts": "2026-05-14T10:18:04Z" }
],
"attributes": {
"utm_source": "instagram_ads",
"lead_score": 78
}
}
}

Data fields

FieldWhat it is
conversation_idUnique conversation ID. Use this to fetch full details via the conversations API.
assistant_idWhich assistant handled it.
widget_idWhich widget surface (web chat, phone, WhatsApp, etc.).
device_typeweb, phone, whatsapp, messenger, instagram, telegram, sms.
contact_idThe contact the conversation is attached to.
chat_countNumber of messages in the conversation.
first_messageThe user's first message — handy for quick triage.
transcriptArray of message objects (role + content + timestamp).
attributesFree-form JSON your widget or workflows stashed on the conversation (UTM tags, custom flags, etc.).

Important: no HMAC, no retries

Two things to plan for:

  • No HMAC signature. Insighto does not sign the request body. If the source IP isn't verifiable for you, treat the URL itself as the secret — use a long random path component and IP-allowlist Insighto's egress IPs.
  • No retries. If your endpoint returns 5xx or times out, the event is dropped. Make your receiver fault-tolerant (queue the body to your own retry store before processing).

Where to next