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 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 within untakenDiscardHours (72 h by default), it is discarded on its own after a notice halfway through the period; it can also close as expired because of maxOpenDays or inactivity.
  • People by ID or email: in assigneeIds, userId and ?assigneeId= you can send the user ID or the email of any member of the workspace. With an API key, accept requires userId.
  • Webhooks: subscribe to case.created, case.updated, case.assigned, case.note.created and case.closed (Payloads).

What happens to the conversation

  • When you open: the owners are added to owners. If the escalation has keepReplying: false, the conversation moves to assistance (agent paused). While a case is open, the conversation does not expire.
  • When you take: whoever takes it joins owners and the conversation moves to supervised (handled by a person).
  • When you close the last open one: if it was in assistance, it goes back to automatic; if it was in supervised, it goes back to automatic with returnToAgent: true. When you decline (discarded) a direct message that goes back to automatic, 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

MethodEndpointWhat it does
GET/v1/casesList cases with filters
POST/v1/casesOpen 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}/acceptTake a case
POST/v1/cases/{caseId}/closeClose or decline a case
POST/v1/cases/{caseId}/notesAdd a note to the log
GET/v1/cases/{caseId}/eventsRead 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).