Chat

The Chat API lets your application talk directly with a Platica agent. You can wait for the response in the same HTTP cycle or schedule the turn for later.

Available endpoints

MethodEndpointDescription
POST/v1/chat Start a conversation or send its next turn
GET/v1/chat List the workspace's chats
GET/v1/chat/{id} Get a chat with its message history

Chat versus Conversations

Both resources operate on the same threads, but with different responsibilities:

ResourceRoleUse
/v1/chat Talk as the customerSend text or attachments to an agent immediately or on a schedule.
/v1/conversations Manage as the businessInspect the inbox, assign owners, close, reopen, and audit threads.

Chats created through this API also appear in the Conversations listings. To close a chat, use PATCH /v1/conversations/{id} with the appropriate status.

Chat versus Messages

Although both resources exchange text, they solve different use cases:

ResourceUse
/v1/chat Your application talks to an agent immediately or schedules the turn.
/v1/messages Your business intervenes in an existing conversation or sends an instruction to the agent.

Use Chat for in-product experiences, agent testing, or backend-to-backend integrations. Use Messages when you need to contact a customer through a connected channel or intervene in a chat as the business.

Conversation lifecycle

  1. Start the thread with agentId and a message, up to 10 attachments, or both.
  2. To schedule it, include delay or scheduleAt. The HTTP 202 response has no agent messages.
  3. Save both id and conversationId: id is the canonical document and conversationId is the chat_* thread. After the scheduled time, poll GET /v1/chat/{id} or get_chat; it may return 404 until the task creates the document.
  4. Continue with the same conversationId. Sending another agentId switches the responding agent without losing history.
  5. Manage the thread through Conversations . Closing one exact conversation requires its unique id, not the chat's conversationId.

A closed or expired chat keeps its history and reactivates automatically when it receives another message with the same conversationId. To start another thread, call POST /v1/chat without a conversationId. Each new request creates another chat_<uuid> conversationId, even when it uses the same clientId.