ApiChats

Append a chat message (deprecated)

POST
/chats

Deprecated — these endpoints will be removed on or after 5 January 2027.

Chats stores messages and nothing else: it does not generate a reply, it does not run your assistant, and no other part of the platform reads what you put here. The reply you store is one your own application already produced, so this is a database you have to authenticate to rather than a capability you gain.

Keep your messages in your own storage instead. To give a voice call the history of an earlier chat, return it as system context in your response to the assistant-request webhook, which already reaches you on every inbound call.

Store a single chat message for a contact.

Chats are a lightweight, developer-first storage primitive. VoiceDock keeps the messages — your application keeps the LLM logic, tools, and channel wiring (Meta Cloud API, widget, SMS gateway, etc.).

Messages are append-only; update by inserting a new message and delete individually via DELETE /chats/{id}.

Authorization

BearerAuth
AuthorizationBearer <token>

API key authentication. Get your key from the dashboard.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/chats" \  -H "Content-Type: application/json" \  -d '{    "contact_id": "string",    "channel": "string",    "role": "user",    "content": "string"  }'
{
  "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"
}
{
  "error": "Invalid API key",
  "message": "string"
}
{
  "error": "Invalid API key",
  "message": "string"
}

Get conversation context for a contact (deprecated) GET

**Deprecated — these endpoints will be removed on or after 5 January 2027.** Chats stores messages and nothing else: it does not generate a reply, it does not run your assistant, and no other part of the platform reads what you put here. The reply you store is one your own application already produced, so this is a database you have to authenticate to rather than a capability you gain. Keep your messages in your own storage instead. To give a voice call the history of an earlier chat, return it as system context in your response to the assistant-request webhook, which already reaches you on every inbound call. Return the last N messages for a contact in chronological order (oldest → newest). The response contains two views: - `messages`: raw message rows ready to map into an LLM chat array. - `formatted`: a single string (`ROLE: content` per line) convenient to append to a voice agent's system prompt for cross-channel continuity.

Delete a chat message (deprecated) DELETE

**Deprecated — these endpoints will be removed on or after 5 January 2027.** Chats stores messages and nothing else: it does not generate a reply, it does not run your assistant, and no other part of the platform reads what you put here. The reply you store is one your own application already produced, so this is a database you have to authenticate to rather than a capability you gain. Keep your messages in your own storage instead. To give a voice call the history of an earlier chat, return it as system context in your response to the assistant-request webhook, which already reaches you on every inbound call. Permanently delete a single chat message. Scoped to your organization.