Open a case

SDK platic.cases.create()

Request help for a conversation by sending escalationId and conversationId. A new case is open, with a case number and the escalation’s assignees. The conversation changes according to those settings.

Check result: a contact can have only one open case per escalation, and required information may be missing.

Example

await platic.cases.create({
  escalationId: "escalation_123",
  conversationId: "conversation_123",
  fields: { invoice: "A-1043" },
});

Request body

{
  "escalationId": "Et7hQ2mVx9LpRk3s",
  "conversationId": "Cv8hN2lP4qR6sT0u",
  "summary": "Asks to fix the tax ID on the invoice for order 48213.",
  "fields": { "order_number": "48213", "tax_id": "ACME010101AB1" }
}
ParameterTypeRequiredDescription
escalationIdstring✓Escalation id. It does not have to be connected to an agent, but it cannot be archived
conversationIdstring✓The conversation being escalated. On comments, the post id
threadIdstring-Only on comments: the id of the comment that opens the thread
summarystring-What is going on, up to 4,000 characters. It is the first thing your team reads
fieldsobject-The escalation's data, by key. Each value is text of up to 1,000 characters. Those the escalation does not define are ignored. A field linked to a contact field (customFieldId) that you do not send is filled in with the contact's value; the one you send is saved on the contact according to the escalation's sync
prioritystring-low, normal, high or urgent. By default, the escalation's defaultPriority
contactIdstring-The contact. By default, the conversation's
agentIdstring-The agent. By default, the conversation's
channelIdstring-The channel. By default, the conversation's
platformstring-The platform. By default, the conversation's

Response

A new case returns 201. Other results return 200 without saving changes; use result to distinguish them.

opened: it was opened

201 Created with the case and how the conversation ended up.

{
  "status": "success",
  "data": {
    "result": "opened",
    "replayed": false,
    "case": {
      "id": "Es4kP9wLx2QmZ7bN1cVd",
      "workspaceId": "Wk5rT8yUi2OpAs4d",
      "number": 143,
      "folio": "INV-0143",
      "escalationId": "Et7hQ2mVx9LpRk3s",
      "escalationSnapshot": {
        "name": "Invoice error",
        "prefix": "INV",
        "color": "#2563EB",
        "keepReplying": false,
        "canClose": false,
        "waitMessage": null,
        "inactivityCloseHours": null,
        "untakenDiscardHours": 72,
        "allowManual": true
      },
      "status": "open",
      "priority": "normal",
      "summary": "Asks to fix the tax ID on the invoice for order 48213.",
      "fields": {"order_number": "48213", "tax_id": "ACME010101AB1"},
      "contactId": "Ct3fG5hJ7kL9mN1p",
      "conversationId": "Cv8hN2lP4qR6sT0u",
      "channelId": "Ch2wE4rT6yU8iO0p",
      "platform": "whatsapp",
      "relatedConversationIds": [],
      "postId": null,
      "threadId": null,
      "agentId": "Ag6bV8nM1qW3eR5t",
      "openedBy": {"kind": "api", "id": "Ak7Pz2Lm9Qx4Wc6e"},
      "assigneeIds": ["Us9fG3hJ6kL2mN8b"],
      "acceptedBy": null,
      "acceptedAt": null,
      "lastActivityAt": "2026-11-12T15:04:00.000Z",
      "maxOpenAt": "2026-11-26T15:04:00.000Z",
      "autoCloseAt": null,
      "discardAt": "2026-11-15T15:04:00.000Z",
      "discardWarnAt": "2026-11-14T03:04:00.000Z",
      "discardWarnedAt": null,
      "closedAt": null,
      "closedBy": null,
      "closeReason": null,
      "closeNote": null,
      "createdAt": "2026-11-12T15:04:00.000Z",
      "updatedAt": "2026-11-12T15:04:00.000Z",
      "assigneeEmails": ["billing@acme.com"],
      "acceptedByEmail": null
    },
    "conversation": {
      "conversationId": "Cv8hN2lP4qR6sT0u",
      "threadId": null,
      "openCount": 1,
      "operationBefore": "automatic",
      "operation": "assistance",
      "operationChanged": true,
      "ownersAdded": ["Us9fG3hJ6kL2mN8b"],
      "ownersAddedEmails": ["billing@acme.com"],
      "post": null
    }
  }
}

case has the fields in get a case and conversation those of the conversation object.

duplicate_open: one was already open

200 OK. The contact already has an open case of that escalation, in this conversation or in another of theirs. No other is opened: if there is something new, add a note to the one that exists. conversationId says which conversation it is in.

{
  "status": "success",
  "data": {
    "result": "duplicate_open",
    "caseId": "Es4kP9wLx2QmZ7bN1cVd",
    "folio": "INV-0143",
    "conversationId": "Cv3jK5lM7nP9qR1s"
  }
}

missing_fields: data is missing

200 OK. Required data of the escalation is missing, in the escalation's order. Those linked to a contact field were already looked up on the contact. Collect the data and send the complete request again.

{
  "status": "success",
  "data": {
    "result": "missing_fields",
    "missingFields": [
      { "key": "tax_id", "label": "Correct tax ID" }
    ]
  }
}

manual_not_allowed: only the agent escalates

200 OK. The escalation has allowManual: false: only the agent uses it. Nothing is opened.

{
  "status": "success",
  "data": {
    "result": "manual_not_allowed",
    "escalationId": "Et7hQ2mVx9LpRk3s"
  }
}

Errors

Statusdetails.codeWhen
400INVALID_REQUESTescalationId or conversationId is missing, a field is not valid or an unknown one is sent. Also when the conversation does not say who the contact is and you did not send contactId
404CONVERSATION_NOT_FOUNDThe conversation (or the thread) does not exist in this workspace
404ESCALATION_NOT_FOUNDThe escalation does not exist in this workspace
409ESCALATION_ARCHIVEDThe escalation is archived

The errors that come up on any operation are in the introduction.

Notes

  • The case is in the name of the credential: openedBy is the API key or the person of the OAuth token.
  • The priority you send only applies through the API. The agent always uses the escalation's defaultPriority.
  • The owners get the notice in Platica, as when the agent escalates.
  • If the conversation changed, the conversation.operation.updated and conversation.owners.updated webhooks also arrive with source api.case.opened.
  • From an AI agent, the tool is open_case. It does not take contactId, agentId, channelId or platform: it uses the conversation's.