Chat

Chat tools act as the client speaking with an agent. To manage owners, status, tags, or send messages from the business side, use the Conversations and Messages tools.

See the complete contract in the Chat API . REST failures are returned as MCP execution errors; see MCP Errors .

ToolREST endpointAnnotations
list_chatsGET /v1/chatread-only, idempotent
get_chatGET /v1/chat/{id}read-only, idempotent
send_chat_messagePOST /v1/chatwrite, non-destructive

list_chats

Lists every chat with source: "api_chat" from authorized workspaces, without filtering by the user who created it.

FieldTypeDefaultDescription
clientIdstringFilter by attributed client.
agentIdstringFilter by principal agent.
limit1-20050Maximum results.
offset≥ 00Pagination offset.

Each result includes the full Conversations summary without messages: id, conversationId, clientId, agentId, canSendDirectMessage, workspaceId, channelId, contactName, phoneNumber, topic, platform, source, status, operation, messageCount, owners, tags, creationDate, and lastUpdate. canSendDirectMessage is always true for these internal chats.


get_chat

Retrieves a chat's state and normalized message history.

FieldTypeRequiredDescription
idstringyesUnique, canonical document ID.

As a deprecated fallback, id also accepts the chat_* conversationId. The flat response includes the full summary above plus messages; access requires an authorized workspace and source: "api_chat".


send_chat_message

Starts or continues an immediate or scheduled conversation with an agent.

FieldTypeRequiredDescription
messagestringyes¹Client text.
attachmentsobject[]yes¹Up to 10 image/file URLs, each smaller than 20 MB.
conversationIdstringwhen continuingExisting chat_*.
agentIdstringwhen creatingInitial agent; while continuing it can switch responders.
additionalInstructionsstringnoInstructions applied only to this turn.
clientobjectnoAttributed client; when omitted on creation, uses the API-key user.
delayintegernoDelay from 3000 to 86400000 ms. Cannot be combined with scheduleAt.
scheduleAtstringnoFuture ISO 8601 date, up to 1 year ahead. Cannot be combined with delay.

¹ Send message, attachments, or both. Each attachment requires url and mimeType; filename is optional.

A closed conversation is automatically reactivated when another message is sent. Without conversationId, every call creates a new thread with another chat_<uuid>, even for the same client. clientId never substitutes for conversationId.

{
  "name": "send_chat_message",
  "arguments": {
    "agentId": "agent_123",
    "message": "Help me review my policy",
    "attachments": [
      {
        "url": "https://cdn.example.com/policy.pdf",
        "mimeType": "application/pdf",
        "filename": "policy.pdf"
      }
    ],
    "client": {
      "email": "ana@example.com",
      "customFields": {
        "policy_number": "GNP-123"
      }
    }
  }
}

To schedule the turn:

{
  "name": "send_chat_message",
  "arguments": {
    "agentId": "agent_123",
    "message": "Prepare a summary before the meeting",
    "scheduleAt": "2026-08-01T15:00:00-06:00"
  }
}

attachments, client, and additionalInstructions can also be included in a scheduled turn.

Immediate response

{
  "id": "conversation_doc_01JCHAT",
  "conversationId": "chat_01JCHAT23456789",
  "clientId": "client_123",
  "agentId": "agent_123",
  "status": "completed",
  "requestMessageId": "msg_user_01JCHAT98765432",
  "messages": [],
  "reactivated": false,
  "agentChanged": false,
  "timestamp": "2026-07-20T18:30:00.000Z"
}

Scheduled response

With delay or scheduleAt, the tool creates a fire-and-forget Cloud Task and returns the HTTP 202 result:

{
  "id": "conversation_doc_01JCHAT",
  "conversationId": "chat_01JCHAT23456789",
  "clientId": "client_123",
  "agentId": "agent_123",
  "status": "scheduled",
  "requestMessageId": "msg_user_01JCHAT98765432",
  "messages": [],
  "schedule": {
    "taskId": "task_01JTASK23456789",
    "scheduleAt": "2026-08-01T21:00:00.000Z"
  },
  "timestamp": "2026-07-20T18:30:00.000Z"
}

schedule.scheduleAt is always normalized to UTC. When scheduling with delay, schedule also includes delayMs.

The result does not include an agent response. After scheduleAt, call get_chat with id. The id is preassigned, but the document may return 404 until the task runs.

A new conversation may not appear until the task runs.