Skip to content
Docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

Conversations

Read an agent's conversations and messages through the Chatvox API.

Conversations include your customers’ chats with an agent: from your website widget, Public Chat, WhatsApp, and the API. Your teammates’ chats inside Chatvox and Playground previews aren’t included.

The conversation object

Field Type Description
id string The conversation’s ID.
agent_id string The agent it belongs to.
contact_id string or null The contact, if the visitor was identified.
title string The conversation’s title.
state string Who is handling it. See Conversation states.
source string Where it happened: embed (web widget), public_link (Public Chat), whatsapp, or api.
external_user_id string or null Your user ID, if you sent one with the first API message.
last_message_preview string or null The start of the latest message.
last_active_at string When the conversation was last active.
created_at string When it started.
messages array Only when you get a single conversation, or list with include=messages.

Conversation states

state Meaning
ai_active The AI agent is answering.
handoff_requested The visitor or agent asked for a person, and the team hasn’t picked it up yet. Website, Public Chat, and WhatsApp only.
human_active A teammate is handling the conversation. The AI doesn’t reply.
resolved A teammate resolved the conversation.

List conversations

GET /api/v1/agents/{agent}/conversations

Returns a paginated list, most recently active first. Messages aren’t included unless you ask for them.

Query parameters

All are optional, and can be combined.

Parameter Description
external_user_id Only the API conversations you started with this user ID.
source Only one channel: embed, public_link, whatsapp, or api.
active_since An ISO 8601 time, such as 2026-11-01T00:00:00Z. Only conversations with activity at or after it.
include messages adds each conversation’s messages.
page, per_page Pagination, up to 100 per page.

An unknown source or include, or an unreadable active_since, returns 422 with code validation_failed. The links in the response keep your parameters, so you can follow links.next.

Filter by your user ID

curl "https://my.chatvox.co/api/v1/agents/AGENT_ID/conversations?external_user_id=user-42" \
  -H "Authorization: Bearer cvx_your_key"

Include messages

With include=messages, each conversation has a messages array, the same as getting a single conversation: visible messages, oldest first.

curl "https://my.chatvox.co/api/v1/agents/AGENT_ID/conversations?include=messages&per_page=50" \
  -H "Authorization: Bearer cvx_your_key"

Export or sync conversations

To copy every conversation into your own system, page through the list with include=messages until links.next is null. On later runs, pass the time your previous run started as active_since, to fetch only conversations with new messages since then:

curl "https://my.chatvox.co/api/v1/agents/AGENT_ID/conversations?include=messages&active_since=2026-11-17T09:00:00Z&per_page=100" \
  -H "Authorization: Bearer cvx_your_key"

Store conversations by id and replace them on each run, since a conversation you already have comes back with its new messages. The list is ordered by most recent activity, so a conversation that gets a new message while you page can move to the first page; the next run picks it up.

Get a conversation

GET /api/v1/agents/{agent}/conversations/{conversation}

Returns the conversation with its visible messages, oldest first:

{
  "id": "01a121f0-6be6-700e-bda0-9860a935556f",
  "state": "ai_active",
  "source": "api",
  "…": "…",
  "messages": [
    { "id": 725, "role": "user", "origin": "visitor", "content": "What are your plans?", "created_at": "…" },
    { "id": 726, "role": "assistant", "origin": "ai", "content": "We have four plans…", "created_at": "…" }
  ]
}

The message object

Field Type Description
id integer The message’s ID.
role string user for the customer, assistant for replies.
origin string Who wrote it: visitor, ai, teammate, or system.
content string The message text, in Markdown for replies.
created_at string When it was sent.

Internal steps, such as action calls, aren’t included. Internal notes your team adds in the Helpdesk are never returned.