Chat

Use the Chat API to talk directly with a Platica agent from your application. Receive the answer in the same HTTP request or schedule the turn for later.

Every answer is { "status": "success", "data": … }. The turn's state (completed or scheduled) is data.status, and the list carries nextPageToken to request the next page with pageToken. Each request works in one workspace: with a multi-workspace credential send ?workspace=<id>, otherwise the answer is 400.

Available endpoints

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

Chat versus Conversations

ResourceRoleUse
/v1/chatTalk as the customerSend text or attachments to an agent immediately or on a schedule.
/v2/conversationsManage as the businessInspect the inbox, pause or resume the agent, assign, tag, finish, archive, reopen and audit threads.

Chats created through this API also appear in the Conversations listings. To close a chat, finish or archive it with its id.

Chat versus Messages

ResourceUse
/v1/chatYour application talks to an agent immediately or schedules the turn.
/v1/messagesYour 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.