# Tickets endpoints (Client API: account)

> 11 FeatherPanel Client API: account endpoints from user/tickets.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/user/tickets/

Defined in [`backend/app/routes/user/tickets.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php). Authentication used here: **Signed-in user**. Read [Authentication](https://featherpanel.com/docs/api/authentication/) for how to send credentials and [Rate limits and errors](https://featherpanel.com/docs/api/rate-limits-and-errors/) for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

## Endpoints

### GET `/api/user/tickets`

- Auth: Signed-in user
- Default rate limit: 30 / minute (`user-tickets`)
- Route name: `user-tickets`
- Controller: [`TicketsController::index`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L27)

**Get user tickets** Retrieve all tickets created by the authenticated user with pagination and optional filtering.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `page` | query | integer | no | Page number for pagination |
| `limit` | query | integer | no | Number of records per page |
| `search` | query | string | no | Search term to filter tickets |
| `status_id` | query | integer | no | Filter by status ID |
| `category_id` | query | integer | no | Filter by category ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `tickets` | object\[\] |  |
| `pagination` | object |  |

```bash
curl -X GET "$PANEL_URL/api/user/tickets" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Tickets retrieved successfully · `401` Unauthorized

### PUT `/api/user/tickets`

- Auth: Signed-in user
- Route name: `user-tickets-create`
- Controller: [`TicketsController::create`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L40)

**Create ticket** Create a new support ticket with optional server link and attachments.

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | string | no | Ticket title |
| `description` | string | no | Ticket description |
| `category_id` | integer | no | Category ID |
| `priority_id` | integer | no | Priority ID |
| `server_id` | integer | no | Optional server ID |

```bash
curl -X PUT "$PANEL_URL/api/user/tickets" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"title":"","description":"","category_id":0,"priority_id":0,"server_id":0}'
```

Plugin events: [`featherpanel:ticket:created`](https://featherpanel.com/docs/plugins/events/ticket/#ticket-created)

Responses: `201` Ticket created successfully · `400` Bad request - Invalid data

### GET `/api/user/tickets/categories`

- Auth: Signed-in user
- Default rate limit: 60 / minute (`user-tickets`)
- Route name: `user-tickets-categories`
- Controller: [`TicketsController::getCategories`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L51)

**Get ticket categories** Retrieve all available ticket categories.

```bash
curl -X GET "$PANEL_URL/api/user/tickets/categories" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Categories retrieved successfully

### GET `/api/user/tickets/priorities`

- Auth: Signed-in user
- Default rate limit: 60 / minute (`user-tickets`)
- Route name: `user-tickets-priorities`
- Controller: [`TicketsController::getPriorities`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L64)

**Get ticket priorities** Retrieve all available ticket priorities.

```bash
curl -X GET "$PANEL_URL/api/user/tickets/priorities" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Priorities retrieved successfully

### GET `/api/user/tickets/statuses`

- Auth: Signed-in user
- Route name: `user-tickets-statuses`
- Controller: [`TicketsController::getStatuses`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L77)

**Get ticket statuses** Retrieve all available ticket statuses.

```bash
curl -X GET "$PANEL_URL/api/user/tickets/statuses" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Statuses retrieved successfully

### GET `/api/user/tickets/servers`

- Auth: Signed-in user
- Default rate limit: 60 / minute (`user-tickets`)
- Route name: `user-tickets-servers`
- Controller: [`TicketsController::getServers`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L88)

**Get user servers** Retrieve all servers owned by the user for ticket linking.

```bash
curl -X GET "$PANEL_URL/api/user/tickets/servers" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Servers retrieved successfully

### POST `/api/user/tickets/{uuid}/reply`

- Auth: Signed-in user
- Route name: `user-tickets-reply`
- Controller: [`TicketsController::reply`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L101)

**Reply to ticket** Add a reply message to a ticket.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string (uuid) | yes | Ticket UUID |

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string | no | Reply message |

```bash
curl -X POST "$PANEL_URL/api/user/tickets/$UUID/reply" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"message":""}'
```

Plugin events: [`featherpanel:ticket:message:created`](https://featherpanel.com/docs/plugins/events/ticket/#ticket-message-created)

Responses: `201` Reply sent successfully · `403` Access denied

### POST `/api/user/tickets/{uuid}/attachments`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-tickets`)
- Route name: `user-tickets-upload-attachment`
- Controller: [`TicketsController::uploadAttachment`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L117)

**Upload attachment** Upload an attachment file for a ticket or message.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string (uuid) | yes | Ticket UUID |

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | string (binary) | yes | File to upload |
| `message_id` | integer | no | Optional message ID to attach to |

```bash
curl -X POST "$PANEL_URL/api/user/tickets/$UUID/attachments" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -F "file=@./file" \
  -F "message_id="
```

Responses: `201` Attachment uploaded successfully · `400` Bad request

### DELETE `/api/user/tickets/{uuid}/messages/{id}`

- Auth: Signed-in user
- Route name: `user-tickets-delete-message`
- Controller: [`TicketsController::deleteMessage`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L135)

**Delete a ticket message** Delete a message from a ticket. Users can only delete their own messages.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string (uuid) | yes | Ticket UUID |
| `id` | path | integer | yes | Message ID |

```bash
curl -X DELETE "$PANEL_URL/api/user/tickets/$UUID/messages/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:ticket:message:deleted`](https://featherpanel.com/docs/plugins/events/ticket/#ticket-message-deleted)

Responses: `200` Message deleted successfully · `403` Access denied - user does not own this message · `404` Ticket or message not found

### DELETE `/api/user/tickets/{uuid}`

- Auth: Signed-in user
- Route name: `user-tickets-delete`
- Controller: [`TicketsController::delete`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L155)

**Delete a ticket** Delete a ticket and all its associated messages and attachments. Users can only delete their own tickets.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string (uuid) | yes | Ticket UUID |

```bash
curl -X DELETE "$PANEL_URL/api/user/tickets/$UUID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:ticket:deleted`](https://featherpanel.com/docs/plugins/events/ticket/#ticket-deleted)

Responses: `200` Ticket deleted successfully · `403` Access denied - user does not own this ticket · `404` Ticket not found

### GET `/api/user/tickets/{uuid}`

- Auth: Signed-in user
- Default rate limit: 30 / minute (`user-tickets`)
- Route name: `user-tickets-show`
- Controller: [`TicketsController::show`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/TicketsController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/tickets.php#L171)

**Get ticket details** Retrieve detailed information about a specific ticket including messages and attachments.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `uuid` | path | string (uuid) | yes | Ticket UUID |

```bash
curl -X GET "$PANEL_URL/api/user/tickets/$UUID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Ticket retrieved successfully · `403` Access denied - ticket belongs to another user · `404` Ticket not found
