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

# Tickets API

> Create, list, reply to, and close support tickets through the Orbitel Shield public API.

The Tickets API lets you manage support tickets programmatically. You can list existing tickets, view ticket details and messages, open new tickets, add replies, close tickets, and download attachments. All ticket endpoints are account scoped and return JSON responses, except for attachment downloads which return the raw file.

For an overview of authentication, rate limits, and conventions, see the [API overview](https://docs.orbitelshield.com/api-reference/overview.md). For error details, see [Errors](https://docs.orbitelshield.com/api-reference/errors.md).

## Authentication and base URL

All requests require a bearer token in the `Authorization` header. Replace `$ORBITEL_API_KEY` with your actual API key.

```bash theme={null}
-H "Authorization: Bearer $ORBITEL_API_KEY"
```

The base URL for all endpoints is:

```text theme={null}
https://portal.orbitelshield.com/api/v1/public
```

JSON request bodies must include:

```bash theme={null}
-H "Content-Type: application/json"
```

## Rate limits and permissions

Ticket read operations require the `tickets:read` scope. Write operations require the `tickets:write` scope.

The global rate limit is 120 requests per minute, including at most 30 write requests. See the [API overview](https://docs.orbitelshield.com/api-reference/overview.md) for details.

## List tickets

Retrieve a paginated list of tickets for your account.

```bash theme={null}
GET /tickets
```

### Query parameters

| Parameter | Type | Description |
| - | - | - |
| `page` | number | Page number for pagination. |
| `perPage` | number | Number of tickets per page. |
| `status` | string | Filter by status. Allowed values: `all`, `active`, `closed`. |
| `q` | string | Search query string. |

### Example request

```bash theme={null}
curl --request GET \
  --url "https://portal.orbitelshield.com/api/v1/public/tickets?page=1&perPage=20&status=active&q=packet+loss" \
  --header "Authorization: Bearer $ORBITEL_API_KEY"
```

## Get a ticket

Retrieve the full details of a specific ticket, including its messages.

```bash theme={null}
GET /tickets/{id}
```

### Path parameters

| Parameter | Type | Description |
| - | - | - |
| `id` | string | 26-character ticket identifier. |

### Example request

```bash theme={null}
curl --request GET \
  --url "https://portal.orbitelshield.com/api/v1/public/tickets/{id}" \
  --header "Authorization: Bearer $ORBITEL_API_KEY"
```

## List departments

Retrieve the list of departments where you can open tickets.

```bash theme={null}
GET /tickets/departments
```

### Example request

```bash theme={null}
curl --request GET \
  --url "https://portal.orbitelshield.com/api/v1/public/tickets/departments" \
  --header "Authorization: Bearer $ORBITEL_API_KEY"
```

## List linkable services

Retrieve the list of services that can be linked to tickets.

```bash theme={null}
GET /tickets/services
```

### Example request

```bash theme={null}
curl --request GET \
  --url "https://portal.orbitelshield.com/api/v1/public/tickets/services" \
  --header "Authorization: Bearer $ORBITEL_API_KEY"
```

## Download attachment

Download a ticket attachment. This is the only ticket endpoint that does not return a JSON response. The response format depends on the uploaded file type.

```bash theme={null}
GET /tickets/{id}/attachments/{attachmentId}
```

### Path parameters

| Parameter | Type | Description |
| - | - | - |
| `id` | string | 26-character ticket identifier. |
| `attachmentId` | string | 26-character attachment identifier. |

### Example request

```bash theme={null}
curl --request GET \
  --url "https://portal.orbitelshield.com/api/v1/public/tickets/{id}/attachments/{attachmentId}" \
  --header "Authorization: Bearer $ORBITEL_API_KEY" \
  --output "attachment.bin"
```

> [!WARNING]
>
> Attachments can only be added through the Orbitel Shield panel, not through the API.

## Create a ticket

Open a new support ticket.

```bash theme={null}
POST /tickets
```

### Request body

| Field | Type | Description |
| - | - | - |
| `departmentId` | string | 26-character department identifier. |
| `serviceId` | string \| null | 26-character service identifier to link, or `null`. |
| `subject` | string | Ticket subject line. |
| `message` | string | Initial message body. |
| `priority` | string | Ticket priority. |

### Example request

```bash theme={null}
curl --request POST \
  --url "https://portal.orbitelshield.com/api/v1/public/tickets" \
  --header "Authorization: Bearer $ORBITEL_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "departmentId": "{departmentId}",
    "serviceId": null,
    "subject": "Packet loss on 198.51.100.0/24",
    "message": "Since 14:00 UTC we see loss on the tunnel.",
    "priority": "high"
  }'
```

## Reply to a ticket

Add a reply to an existing ticket.

```bash theme={null}
POST /tickets/{id}/replies
```

### Path parameters

| Parameter | Type | Description |
| - | - | - |
| `id` | string | 26-character ticket identifier. |

### Request body

| Field | Type | Description |
| - | - | - |
| `message` | string | Reply message body. |

### Example request

```bash theme={null}
curl --request POST \
  --url "https://portal.orbitelshield.com/api/v1/public/tickets/{id}/replies" \
  --header "Authorization: Bearer $ORBITEL_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "message": "Thanks, it is stable again."
  }'
```

## Close a ticket

Close an existing ticket.

```bash theme={null}
POST /tickets/{id}/close
```

### Path parameters

| Parameter | Type | Description |
| - | - | - |
| `id` | string | 26-character ticket identifier. |

### Example request

```bash theme={null}
curl --request POST \
  --url "https://portal.orbitelshield.com/api/v1/public/tickets/{id}/close" \
  --header "Authorization: Bearer $ORBITEL_API_KEY" \
  --header "Content-Type: application/json"
```

## Related endpoints

> [card] [Services and invoices](https://docs.orbitelshield.com/api-reference/services-invoices.md)
>
> Read services, invoices, and payments.

> [card] [Protection](https://docs.orbitelshield.com/api-reference/protection.md)
>
> Read protected services, traffic, and attack records.

> [card] [Protection changes](https://docs.orbitelshield.com/api-reference/protection-changes.md)
>
> Change prefixes and tunnels, or push the current network configuration.

> [card] [Webhook signatures](https://docs.orbitelshield.com/api-reference/webhooks.md)
>
> Verify signed attack alert deliveries.


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