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

# Open a Ticket

> Open a support ticket, or add to the requester's open ticket.

Create a support ticket from your own system. The requester is matched to a lead by phone or email. If the requester already has an open ticket, your message is added to it instead of opening a second one.

## Request Body

**phone** `string`

Requester phone number, in any common format. It is normalized to E.164. At least one of `phone` or `email` is required.

**email** `string`

Requester email. It is trimmed and lowercased.

**subject** `string`

Ticket subject. A `subject` or a `description` is required.

**description** `string`

The ticket text. `body` is accepted as an alias.

**name** `string`

Requester name.

**externalId** `string`

Your own reference for this ticket.

## Response

**success** `boolean`

Indicates if the request was successful.

**created** `boolean`

`true` when a new ticket was opened, `false` when the message was added to an existing one.

**duplicate** `boolean`

Whether the message was recognized as a duplicate.

**data** `object`

**data properties**

**ticketId** `string`

The ticket ID.

**status** `string`

Current ticket status.

**channel** `string`

`api` for tickets opened through this endpoint.

**leadId** `string | null`

The matched lead, or `null` when the requester is not a lead.

```bash cURL theme={null}
curl -X POST https://client-backend.oktivo.com/api/v1/crm/tickets \
  -H "Authorization: Bearer okt_YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane@example.com",
    "subject": "Refund not received",
    "description": "I returned the order 10 days ago."
  }'
```

```json 201 Created theme={null}
{
  "success": true,
  "created": true,
  "duplicate": false,
  "data": {
    "ticketId": "TKT-1042",
    "status": "open",
    "channel": "api",
    "leadId": "lead_9a8b7c"
  },
  "requestId": "3f1c2c0e-6a41-4e0b-9f0e-1f2d6f1b8a77",
  "timestamp": "2026-03-02T04:05:00.000Z"
}
```

```json 400 Validation Error theme={null}
{
  "success": false,
  "message": "A phone or email is required to open a ticket",
  "code": "BAD_REQUEST",
  "requestId": "3f1c2c0e-6a41-4e0b-9f0e-1f2d6f1b8a77",
  "errorInfo": {
    "code": "BAD_REQUEST",
    "message": "A phone or email is required to open a ticket"
  }
}
```

> [!NOTE]
>
> This endpoint accepts an **API Token** (`okt_...`) or **JWT**. The ticket is always opened in the token owner's account. Your plan must include the **Tickets** feature (the `crm_api` feature alone is not enough). It is limited to 120 requests/minute per account. A `201` means a new ticket was opened and a `200` means the message was added to an existing one.


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