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.
Without delay or scheduleAt, Chat is synchronous and does not support streaming. Scheduled
turns return HTTP 202; fetch the chat after execution. See Errors and Support for
response formats and retry guidance.
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
| Method | Endpoint | Description |
|---|---|---|
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
| Resource | Role | Use |
|---|---|---|
/v1/chat | Talk as the customer | Send text or attachments to an agent immediately or on a schedule. |
/v2/conversations | Manage as the business | Inspect 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
| Resource | Use |
|---|---|
/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
- Start the thread with
agentIdand amessage, up to 10attachments, or both. - To schedule it, include
delayorscheduleAt. The HTTP202response has no agent messages. - Save both
idandconversationId:idis the canonical document andconversationIdis thechat_*thread. After the scheduled time, pollGET /v1/chat/{id}orget_chat; it may return404until the task creates the document. - Continue with the same
conversationId. Sending anotheragentIdswitches the responding agent without losing history. - Manage the thread through Conversations. Closing one exact conversation requires its unique
id, not the chat'sconversationId.
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.