Cases
Handle conversations that need your team’s help. Find a case, take it to handle it and close it when finished.
Each case is opened from an escalation. It includes a case number, priority, assignees, collected data and a log of what happens. The API uses clients for contacts.
Example
# 1. Open a case (201 if it opens; 200 for duplicate_open, missing_fields or manual_not_allowed)
curl -X POST https://api.platic.ai/v1/cases \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"escalationId": "'"$ESCALATION_ID"'", "conversationId": "'"$CONVERSATION_ID"'", "fields": {"invoice": "A-1043"}}'
# 2. Take the case
curl -X POST https://api.platic.ai/v1/cases/$CASE_ID/accept \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"userId": "ana@example.com"}'
# 3. Close it and give the conversation back to the agent
curl -X POST https://api.platic.ai/v1/cases/$CASE_ID/close \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "resolved", "returnToAgent": true}' // 1. Open a case in a conversation
const opened = await platic.cases.create({
escalationId,
conversationId,
fields: { invoice: "A-1043" },
});
if (opened.result === "opened") {
// 2. Take it (the conversation becomes supervised) and add a note
await platic.cases.accept(opened.case.id, { userId: "ana@example.com" });
await platic.cases.addNote(opened.case.id, { text: "The charge was verified." });
// 3. Close it and give the conversation back to the agent
await platic.cases.close(opened.case.id, { reason: "resolved", returnToAgent: true });
} What you need to know
- Lifecycle (
open->closed): a contact has at most one open case per escalation. A closed case is not reopened. If nobody takes it withinuntakenDiscardHours(72 h by default), it is discarded on its own after a notice halfway through the period; it can also close asexpiredbecause ofmaxOpenDaysor inactivity. - People by ID or email: in
assigneeIds,userIdand?assigneeId=you can send the user ID or the email of any member of the workspace. With an API key,acceptrequiresuserId. - Webhooks: subscribe to
case.created,case.updated,case.assigned,case.note.createdandcase.closed(Payloads).
What happens to the conversation
- When you open: the owners are added to
owners. If the escalation haskeepReplying: false, the conversation moves toassistance(agent paused). While a case is open, the conversation does not expire. - When you take: whoever takes it joins
ownersand the conversation moves tosupervised(handled by a person). - When you close the last open one: if it was in
assistance, it goes back toautomatic; if it was insupervised, it goes back toautomaticwithreturnToAgent: true. When you decline (discarded) a direct message that goes back toautomatic, the agent picks up right then.
Opening, taking and closing return conversation (conversationId, threadId, openCount, operationBefore, operation, operationChanged, ownersAdded, ownersAddedEmails and post on comments) so you know how it ended up without rereading it.
Endpoints
| Method | Endpoint | What it does |
|---|---|---|
GET | /v1/cases | List cases with filters |
POST | /v1/cases | Open a case |
GET | /v1/cases/{caseId} | Get a case with its log |
PATCH | /v1/cases/{caseId} | Change priority, owners, data or summary |
POST | /v1/cases/{caseId}/accept | Take a case |
POST | /v1/cases/{caseId}/close | Close or decline a case |
POST | /v1/cases/{caseId}/notes | Add a note to the log |
GET | /v1/cases/{caseId}/events | Read only the log |
Requires the Conversations permission. All the error codes (CASE_NOT_FOUND, CASE_CLOSED, ESCALATION_ARCHIVED, CONFLICT) are in Errors and the AI tools are in Cases MCP.
The cases summary
Conversations, posts and threads include a cases object with open, openCount, openIds, topPriority, oldestOpenAt, releasedAt, untakenCount and attention. To search conversations by cases, use escalationId and caseStatus in list conversations (V1).