---
docId: doc_111804375f914450824620bb2143f42e
title: Open a case
description: "Opens a case or returns the existing case and any missing data."
api:
  group: casos
  auth: bearer
  operations:
    - operationId: openCase
      method: POST
      path: /v1/cases
      postmanName: Open a Case
---

<script>
  import { Ways, Note } from '$lib/components';
</script>

# Open a case

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](/api-reference/cases#what-happens-to-the-conversation).

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

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
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" }
  }'
```

</Ways.Way>
<Ways.Way name="sdk">

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

</Ways.Way>
</Ways>

## Request body

```json
{
  "escalationId": "Et7hQ2mVx9LpRk3s",
  "conversationId": "Cv8hN2lP4qR6sT0u",
  "summary": "Asks to fix the tax ID on the invoice for order 48213.",
  "fields": { "order_number": "48213", "tax_id": "ACME010101AB1" }
}
```

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `escalationId` | string | ✓ | Escalation id. It does not have to be connected to an agent, but it cannot be archived |
| `conversationId` | string | ✓ | The conversation being escalated. On comments, the post id |
| `threadId` | string | - | Only on comments: the id of the comment that opens the thread |
| `summary` | string | - | What is going on, up to 4,000 characters. It is the first thing your team reads |
| `fields` | object | - | 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` |
| `priority` | string | - | `low`, `normal`, `high` or `urgent`. By default, the escalation's `defaultPriority` |
| `contactId` | string | - | The contact. By default, the conversation's |
| `agentId` | string | - | The agent. By default, the conversation's |
| `channelId` | string | - | The channel. By default, the conversation's |
| `platform` | string | - | 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.

```json
{
  "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](/api-reference/cases/get#the-case) and `conversation` those of [the `conversation` object](/api-reference/cases#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](/api-reference/cases/add-note) to the one that exists. `conversationId` says which conversation it is in.

```json
{
  "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.

```json
{
  "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.

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

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | `escalationId` 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` |
| `404` | `CONVERSATION_NOT_FOUND` | The conversation (or the thread) does not exist in this workspace |
| `404` | `ESCALATION_NOT_FOUND` | The escalation does not exist in this workspace |
| `409` | `ESCALATION_ARCHIVED` | The escalation is archived |

The errors that come up on any operation are in the [introduction](/api-reference/cases#common-errors).

<Note type="tip">

It first checks whether one is already open and then the data. That way you do not ask the contact again for data for a case that already exists.

</Note>

## 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`](/mcp/tools#cases). It does not take `contactId`, `agentId`, `channelId` or `platform`: it uses the conversation's.
