<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/online-api/tickets/get-ticket

# Get Ticket

`GET https://online.99digital.co.il/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}`

Get one ticket of a conversation.

The ticket must belong to the conversation in the path. See
[List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) for what a ticket is.

| Setting | Value |
| --- | --- |
| **Method** | `GET` |
| **Path** | `/api/v1/accounts/{account_id}/conversations/{conversation_id}/tickets/{ticket_id}` |

**Permissions:**

- User token: any agent who can see the conversation — see
  [Who can see a conversation](https://docs.99digital.co.il/online-api/conversations/conversation-basics#who-can-see-a-conversation).
- Agent-bot token: not allowed.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | integer | Yes | Account ID. |
| `conversation_id` | integer | Yes | Conversation display ID. |
| `ticket_id` | integer | Yes | Ticket ID (must belong to this conversation). |

**Example request**

```bash
curl -X GET 'https://online.99digital.co.il/api/v1/accounts/12/conversations/1501/tickets/901' \
  -H 'api_access_token: <YOUR_API_ACCESS_TOKEN>'
```

**Example response** (`200 OK`)

```json
{
  "id": 901,
  "channel_name": "Channel::Api",
  "initiated_by": "user",
  "resolved_at": "2026-11-12T08:20:00.000Z",
  "ticket_status": "closed",
  "total_time": 600,
  "created_at": "2026-11-12T08:10:00.000Z",
  "updated_at": "2026-11-12T08:20:00.004Z",
  "account_id": 12,
  "contact_id": 801,
  "conversation_id": 1501,
  "inbox_id": 31,
  "resolved_agent_id": 51,
  "resolved_by_id": 51,
  "custom_attributes": {}
}
```

**Error responses**: `404 {"error": "Resource could not be found"}`.

## Authentication

`api_access_token` in the header — Your access token. A user token is in the dashboard under **Profile settings → Access Token**, and grants exactly what that agent's role allows. An agent-bot token may call only the endpoints marked for agent bots. See [Getting Started](https://docs.99digital.co.il/online-api/getting-started#authentication).

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `account_id` | path | integer | Yes | The numeric ID of your account: the number after `/app/accounts/` in the dashboard URL. Example: `12`. |
| `conversation_id` | path | integer | Yes | The numeric ID of the conversation: its display ID, which is the `id` in conversation responses and the number in the dashboard URL. Example: `1501`. |
| `ticket_id` | path | integer | Yes | The numeric ID of the ticket. The ticket must belong to the conversation. Example: `903`. |

## Responses

### 200 — The ticket.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `id` | integer | The numeric ID of the ticket. |
| `ticket_status` | string | Whether the ticket is open or closed. One of: `open` — The ticket is open — the conversation has not been resolved since the ticket opened; `closed` — The ticket was closed, because the conversation was resolved. |
| `initiated_by` | string | Who started the conversation. One of: `user` — The contact; `agent` — An agent; `agent_bot` — An agent bot. |
| `channel_name` | string | The channel type of the inbox, for example `Channel::Api` or `Channel::Whatsapp`. |
| `created_at` | string | When the ticket opened (ISO 8601). |
| `updated_at` | string | The last update (ISO 8601). |
| `resolved_at` | string \| null | When the ticket was closed (ISO 8601), or `null`. |
| `total_time` | integer \| null | Seconds from opening to closing, or `null` while open. |
| `resolved_by_id` | integer \| null | The ID of the agent who resolved the conversation, or `null` (for example when a bot or an automation closed it). |
| `resolved_agent_id` | integer \| null | The same as `resolved_by_id`. |
| `custom_attributes` | object | Your data for this ticket, as key-value pairs (for example a case type or a refund amount). |
| `account_id` | integer | The numeric ID of the account. |
| `contact_id` | integer | The numeric ID of the contact. |
| `inbox_id` | integer | The numeric ID of the inbox. |
| `conversation_id` | integer | The conversation. [List Tickets](https://docs.99digital.co.il/online-api/tickets/list-tickets) and [Get Ticket](https://docs.99digital.co.il/online-api/tickets/get-ticket) return its display ID; the other ticket endpoints return its internal ID. |

#### Example: Open ticket

The conversation's current ticket.

```json
{
  "id": 903,
  "channel_name": "Channel::Api",
  "initiated_by": "user",
  "resolved_at": null,
  "ticket_status": "open",
  "total_time": null,
  "created_at": "2026-11-12T08:40:00.000Z",
  "updated_at": "2026-11-12T08:40:00.000Z",
  "account_id": 12,
  "contact_id": 801,
  "conversation_id": 1501,
  "inbox_id": 31,
  "resolved_agent_id": null,
  "resolved_by_id": null,
  "custom_attributes": {}
}
```

#### Example: Closed ticket

A ticket that was closed when an agent resolved the conversation.

```json
{
  "id": 901,
  "channel_name": "Channel::Api",
  "initiated_by": "user",
  "resolved_at": "2026-11-12T08:20:00.000Z",
  "ticket_status": "closed",
  "total_time": 600,
  "created_at": "2026-11-12T08:10:00.000Z",
  "updated_at": "2026-11-12T08:20:00.004Z",
  "account_id": 12,
  "contact_id": 801,
  "conversation_id": 1501,
  "inbox_id": 31,
  "resolved_agent_id": 51,
  "resolved_by_id": 51,
  "custom_attributes": {}
}
```

### 401 — The access token is missing or wrong, or its user does not belong to this account.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message. |

#### Example: Invalid token

The api_access_token header is missing or wrong.

```json
{
  "error": "Invalid Access Token"
}
```

#### Example: Another account

A valid token, for a user who is not in this account.

```json
{
  "error": "You are not authorized to access this account"
}
```

### 403 — The token's role does not have the permission this endpoint needs, or the endpoint is not open to agent-bot tokens. See [Authorization](https://docs.99digital.co.il/online-api/getting-started#authorization).

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message. |

#### Example: No permission

The role lacks the permission.

```json
{
  "error": "You are not authorized to do this action"
}
```

#### Example: Agent bot

An agent-bot token on an endpoint that is not open to bots.

```json
{
  "error": "Access to this endpoint is not authorized for bots"
}
```

### 404 — The resource does not exist in this account.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `error` | string | The error message. |

#### Example

```json
{
  "error": "Resource could not be found"
}
```
