> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decimal.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Escalation API

> Hand a Chat API conversation to your helpdesk as a ticket.

When a customer needs a person, escalate their [Chat API](https://docs.decimal.app/api-reference/chat/overview.md) conversation. Decimal opens a ticket in your helpdesk with the transcript and an AI summary, and returns its ID.

| Endpoint | Scope |
| - | - |
| [Escalate to ticketing integration](https://docs.decimal.app/api-reference/escalation/escalate-to-ticketing-integration.md) | `chat:escalate` |

## Before you escalate

* Connect the helpdesk first: [Plain](https://docs.decimal.app/integrations/plain.md), [Pylon](https://docs.decimal.app/integrations/pylon.md), [Linear](https://docs.decimal.app/integrations/linear.md), [Zendesk](https://docs.decimal.app/integrations/zendesk.md), or [Salesforce](https://docs.decimal.app/integrations/salesforce.md).
* The conversation must be `completed`.
* Each conversation can be escalated once. A second call returns `409` with code `conflict`.

## Request

`integration`, `email`, and `name` are required. The email and name are the customer's, and go on the ticket.

```bash theme={null}
curl -X POST https://api.getdecimal.ai/v0/chat/abc123/escalate \
  -H "Authorization: Bearer sk-de-..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 0b8e2f4a-..." \
  -d '{
    "integration": "zendesk",
    "email": "jane@example.com",
    "name": "Jane Doe",
    "additional_fields": { "priority": "high", "tags": ["api"] }
  }'
```

Leave out `title` and `summary` and Decimal writes them from the conversation.

`additional_fields` depends on the helpdesk:

| Integration | Fields |
| - | - |
| `plain` | `label_type_ids`, `priority` (number) |
| `pylon` | `tags`, `priority` (`urgent`, `high`, `medium`, `low`), `escalation_type` (`internal`, `email`), `support_email_address` |
| `linear` | `team_id`, `project_id`, `label_ids`, `priority` (number) |
| `zendesk` | `tags`, `priority` (`urgent`, `high`, `normal`, `low`) |
| `salesforce` | `priority` (a value from your Case Priority picklist) |

## Response

```json theme={null}
{
  "success": true,
  "integration": "zendesk",
  "ticket_id": "48213",
  "ticket_url": "https://example.zendesk.com/agent/tickets/48213"
}
```

`ticket_url` isn't returned for every helpdesk. Store `ticket_id` to look the ticket up later with the [Tickets API](https://docs.decimal.app/api-reference/tickets/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.