--- title: Get A Ticket (LLM) description: GET /tickets/:idOrNumber - fetch one ticket and its public messages. --- # GET /tickets/{idOrNumber} Fetch one ticket on the token's desk plus its public messages. Scope: `tickets:read`. Full URL: `https://.headoni.app/api/v1/tickets/{idOrNumber}` Auth header: `Authorization: Bearer hd_` ## Path Parameter | param | type | notes | | --- | --- | --- | | idOrNumber | string (digits) | the per-desk ticket `number` (tried first) or the ticket `id`. Must be all digits, else `400 invalid_id`. | ## Example Request ```bash curl https://acme.headoni.app/api/v1/tickets/1247 \ -H "Authorization: Bearer hd_your_secret_here" ``` ## Success Response Status `200`. ```json { "ticket": { "id": "1490375649312800768", "number": 1247, "subject": "Login broken on staging", "priority": "high", "status": { "id": "1490300000000000001", "label": "Open", "internalType": "open" }, "requester": { "email": "alice@example.com", "name": "Alice" }, "department": { "id": "1490200000000000001", "name": "Support" }, "ticketType": { "id": "1490100000000000001", "name": "Question" }, "createdAt": "2026-06-04T15:21:09.000Z", "updatedAt": "2026-06-04T15:40:11.000Z", "messages": [ { "id": "1490375649312800769", "authorKind": "end_user", "bodyMd": "I loop back to /sign-in after typing my email.", "createdAt": "2026-06-04T15:21:09.000Z" } ] } } ``` ## Field Reference - `id` string, `number` integer, timestamps ISO 8601 UTC. - `priority`: `low` | `normal` | `high` | `urgent`. - `status.internalType`: `open` | `awaiting_reply` | `resolved` | `closed`. - `requester.email` and `requester.name` may be null if the user record lacks them. - `messages[]`: PUBLIC messages only, ordered oldest first. Each has `id`, `authorKind`, `bodyMd`, `createdAt`. - `authorKind`: `agent` | `end_user` | `system` | `automation`. ## Errors | status | error | cause | | --- | --- | --- | | 400 | invalid_id | path was not all digits | | 401 | unauthenticated | missing or invalid token | | 403 | insufficient_scope | token lacks `tickets:read` | | 404 | ticket_not_found | no such ticket on this desk |