Create an escalation

SDK platic.escalations.create()

Create a rule for requesting help by sending name, description and prefix. Use description to explain when the agent should use it. Then connect it to the agent so it can use the rule.

You can open cases through the API as soon as it exists, unless allowManual is false.

Example

await platic.escalations.create({
  name: "Billing",
  description: "The customer disputes a charge",
  prefix: "BIL",
});

Request body

{
  "name": "Invoice error",
  "description": "The customer says their invoice has a wrong detail (tax ID, company name or amount) and asks to fix it.",
  "prefix": "INV",
  "color": "#2563EB",
  "fields": [
    { "key": "order_number", "label": "Order number", "kind": "text", "required": true },
    { "key": "tax_id", "label": "Correct tax ID", "kind": "text", "required": true },
    { "key": "email", "label": "Email for the invoice", "kind": "email", "customFieldId": "billing_email" }
  ],
  "assignment": { "mode": "contact_owner", "userIds": ["billing@acme.com"] },
  "agent": {
    "keepReplying": false,
    "waitMessage": "I passed your case to the billing team. They will write to you as soon as they can."
  }
}
ParameterTypeRequiredDescription
namestring✓Name of the escalation, from 1 to 80 characters
descriptionstring✓When it is escalated, from 1 to 2,000 characters. The agent reads it to decide whether to use this escalation: write it as you would explain the situation to a person
prefixstring✓2 to 4 letters. It is saved in uppercase and goes at the start of the case number (INV-0143)
colorstring-Color in #RRGGBB. Default, #64748B
fieldsarray-Up to 20 data points to collect before opening the case. See below. Default, none
defaultPrioritystring-low, normal, high or urgent. Default, normal
assignmentobject-Who handles the case. The case always goes to the contact's owners (the owners of the conversation, the contact and the agent); the escalation only adds people. Default, { "mode": "contact_owner" }
assignment.modestring✓contact_owner: the contact's owners plus the people in userIds. fixed is deprecated: it is accepted for compatibility, requires at least one person in userIds and assigns the same as contact_owner
assignment.userIdsarray-Up to 50 people the escalation adds to the contact's owners: user id or email of a member. Default, none
agentobject-What the agent does while the case is open
agent.keepReplyingboolean-true: it keeps answering. false: it pauses and the conversation moves to assistance. Default, true
agent.canCloseboolean-true: the agent can close the case, only as resolved. Default, false
agent.waitMessagestring | null-Only with keepReplying: false: what the agent tells the contact when escalating with this escalation, up to 500 characters. Without keepReplying: false it answers 400
lifecycleobject-Deadlines for closing or discarding cases
lifecycle.inactivityCloseHoursnumber | null-From 1 to 720 hours without activity (neither on the case nor on the conversation) after which it closes on its own as expired. Default, null (off)
lifecycle.maxOpenDaysnumber-From 1 to 90 days. When they pass it closes on its own as expired. Default, 14
lifecycle.untakenDiscardHoursnumber | null-Period to discard the case automatically if nobody takes it: 24, 48, 72 (3 days, default) or 168 (7 days). Halfway through the period the owners are warned. null turns it off
allowManualboolean-true: a person or the API can also open cases of this escalation by hand. false: only the agent uses it, and open a case answers manual_not_allowed. Default, true

Each element of fields:

ParameterTypeRequiredDescription
keystring✓Key of the data point in snake_case: starts with a lowercase letter, up to 40 characters. It does not repeat within the escalation
labelstring✓What the data point is called, from 1 to 80 characters. It is what the agent asks for
kindstring✓text, email, number, phone or date
requiredboolean-true: the case is not opened without this data point. Default, false
customFieldIdstring | null-The id of a contact custom field. If the contact already has it, the data point is filled in with that value and not asked for again; what is collected is saved on the contact according to sync. Without it, the data point is not linked
syncstring-With customFieldId: fill_empty saves the data on the contact only if its field is empty; overwrite always replaces it. Default, fill_empty

Response

201 Created with the escalation, its defaults already set.

{
  "status": "success",
  "data": {
    "id": "Et7hQ2mVx9LpRk3s",
    "workspaceId": "Wk5rT8yUi2OpAs4d",
    "name": "Invoice error",
    "description": "The customer says their invoice has a wrong detail (tax ID, company name or amount) and asks to fix it.",
    "prefix": "INV",
    "color": "#2563EB",
    "fields": [
      {"key": "order_number", "label": "Order number", "kind": "text", "required": true, "customFieldId": null, "sync": "fill_empty"},
      {"key": "tax_id", "label": "Correct tax ID", "kind": "text", "required": true, "customFieldId": null, "sync": "fill_empty"},
      {"key": "email", "label": "Email for the invoice", "kind": "email", "required": false, "customFieldId": "billing_email", "sync": "fill_empty"}
    ],
    "defaultPriority": "normal",
    "assignment": {
      "mode": "contact_owner",
      "userIds": ["Us9fG3hJ6kL2mN8b"],
      "userEmails": ["billing@acme.com"]
    },
    "agent": {
      "keepReplying": false,
      "canClose": false,
      "waitMessage": "I passed your case to the billing team. They will write to you as soon as they can."
    },
    "lifecycle": {"inactivityCloseHours": null, "maxOpenDays": 14, "untakenDiscardHours": 72},
    "allowManual": true,
    "status": "active",
    "createdAt": "2026-11-10T16:20:00.000Z",
    "createdBy": {"kind": "api", "id": "Ak7Pz2Lm9Qx4Wc6e"},
    "updatedAt": "2026-11-10T16:20:00.000Z",
    "updatedBy": {"kind": "api", "id": "Ak7Pz2Lm9Qx4Wc6e"},
    "archivedAt": null
  }
}

data is the escalation, with the fields in get an escalation.

Errors

Statusdetails.codeWhen
400INVALID_REQUESTA required field is missing, one is not valid or the body has an unknown one. Also: a repeated key, a person who is not a member of the workspace or agent.waitMessage without agent.keepReplying: false. details.issues says what
400CUSTOM_FIELD_NOT_FOUNDA data point has a customFieldId that does not exist in the workspace. details.issues says which
400CUSTOM_FIELD_INCOMPATIBLEThe data point's kind does not match the custom field's type: for example, an email data point linked to a number field. details.issues says which
403FORBIDDENWith an OAuth token, the person is not an owner or administrator of the workspace

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

Notes