VoiceDock Docs
ApiChats

List chat messages

List chat messages for a contact, newest first. Use this for dashboards or manual inspection; use `/chats/context` when feeding history to an LLM or voice agent.

GET
/chats

List chat messages for a contact, newest first. Use this for dashboards or manual inspection; use /chats/context when feeding history to an LLM or voice agent.

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard.

In: header

Query Parameters

contact_id*string

External contact identifier (phone, session id, email, …)

channel?string

Filter by channel (whatsapp, web, sms, email, …)

agent_id?string

Filter by associated agent

Formatuuid
limit?integer

Maximum number of messages (max 500)

Default100
Rangevalue <= 500
offset?integer

Number of messages to skip

Default0

Response Body

application/json

application/json

curl -X GET "https://example.com/chats?contact_id=string"
{
  "messages": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
      "contact_id": "+31612345678",
      "channel": "whatsapp",
      "role": "user",
      "content": "string",
      "metadata": {
        "provider_message_id": "wamid.ABC",
        "attachments": []
      },
      "created_at": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "total": 42,
    "limit": 100,
    "offset": 0
  }
}
{
  "error": "Invalid API key",
  "message": "string"
}