> For the complete documentation index, see [llms.txt](https://docs.cekat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cekat.ai/api-documentation/tickets/list-tickets.md).

# List tickets

Lists tickets with search, filters and sorting. Each ticket includes its template, products and conversation.

```json
{"openapi":"3.0.3","info":{"title":"Cekat Open API","version":"1.0.0"},"tags":[{"name":"Tickets","description":"Create, list and update support tickets and the products attached to them.\n\nBefore creating tickets, call `GET /api/ticket_settings` to get your ticket boards (each board's `id` is the `board_id`) and their status IDs, and `GET /api/ticket_templates` to get the templates for each board and their fields.\n\nPriority is a number: `0` Low, `1` Medium, `2` High, `3` Urgent. Status is a status `id` from the board's `statuses`, or `done`.\n"}],"servers":[{"url":"https://api.cekat.ai","description":"Production"}],"security":[{"CekatApiKey":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"CekatApiKey":{"type":"apiKey","in":"header","name":"api_key","description":"Your business's Cekat API key, from **Settings → Developers & API** in the Cekat dashboard (https://chat.cekat.ai/developers?section=apikeys). Available on the Business and Enterprise plans."},"BearerAuth":{"type":"http","scheme":"bearer","description":"The same Cekat API key, sent as `Authorization: Bearer YOUR_API_KEY`. Accepted only by endpoints under `/api/...`."}},"schemas":{"Ticket":{"type":"object","description":"A ticket. List responses also include the template, products and conversation. Additional fields may be present.","additionalProperties":true,"properties":{"id":{"type":"string","format":"uuid"},"public_ticket_id":{"type":"integer","description":"The ticket number shown in Cekat."},"board_id":{"type":"string","format":"uuid"},"ticket_template_id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string","description":"A status ID from the board's `statuses`, or `done`."},"priority":{"type":"integer","enum":[0,1,2,3],"description":"0 Low, 1 Medium, 2 High, 3 Urgent."},"field_values":{"type":"array","items":{"$ref":"#/components/schemas/TicketFieldValue"}},"assigned_to":{"type":"array","description":"Agent IDs assigned to the ticket.","items":{"type":"string"}},"attachments":{"type":"array","items":{"type":"string"}},"conversation_id":{"type":"string","format":"uuid","nullable":true},"created_by":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"TicketFieldValue":{"type":"object","properties":{"field_name":{"type":"string","description":"The field's name from the ticket template."},"field_value":{"description":"The value. Its format depends on the field type."}}},"PageLimitPagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total_data":{"type":"integer"},"total_pages":{"type":"integer"}}},"ApiError":{"type":"object","description":"Error body returned by the `/api/...` endpoints.","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"statusCode":{"type":"integer"},"error":{"type":"object","properties":{"message":{"type":"string"}}},"correlationId":{"type":"string","description":"Request ID. Include it when contacting Cekat support."}}},"RateLimitError":{"type":"object","properties":{"message":{"type":"string"}}}},"responses":{"ApiUnauthorized":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"TooManyRequests":{"description":"Rate limit exceeded. Wait and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}},"paths":{"/api/tickets/list":{"post":{"tags":["Tickets"],"operationId":"ListTickets","summary":"List tickets","description":"Lists tickets with search, filters and sorting. Each ticket includes its template, products and conversation.","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"board_id":{"type":"string","format":"uuid","description":"Only tickets on this board."},"search":{"type":"string","description":"Matches the ticket title."},"filters":{"type":"object","properties":{"status":{"type":"array","description":"Status IDs, and/or `done`.","items":{"type":"string"}},"priority":{"type":"array","items":{"type":"integer"}},"assigned_to":{"type":"array","description":"Agent IDs. Matches tickets assigned to all of them.","items":{"type":"string"}},"created_by":{"type":"array","items":{"type":"string"}},"conversation_id":{"type":"string","format":"uuid"},"session_id":{"type":"string"},"contact_id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"created_start_date":{"type":"string","format":"date-time"},"created_end_date":{"type":"string","format":"date-time"}}},"sorts":{"type":"object","properties":{"field":{"type":"string","enum":["created_at","updated_at","title","priority","status"]},"direction":{"type":"string","enum":["asc","desc"]}}},"page":{"type":"integer","minimum":1,"default":1},"limit":{"type":"integer","minimum":1,"maximum":1000,"default":100}}}}}},"responses":{"200":{"description":"A page of tickets.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"metadata":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/PageLimitPagination"}}}}}}}},"400":{"description":"`page`, `limit` or `sorts` is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"$ref":"#/components/responses/ApiUnauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}}}}
```
