---
title: "Get a ticket + messages"
method: GET
path: "/api/tickets/{id}"
tags: ["support"]
---

# Get a ticket + messages

`GET /api/tickets/{id}`

## Request

- Base URL: `https://api.depixapp.com`
- URL: `https://api.depixapp.com/api/tickets/{id}`
- Auth: none required

Full ticket detail with its message thread. 404 also covers a ticket owned by another principal (ownership is never disclosed). NO scope required.

## Path parameters

- `id` string, required

## Response `200`

Ticket detail.

- TicketGetResponse: Ticket detail with its full message thread.
  - `ticket` Ticket, required: A support ticket (summary view).
    - `id` string, required: Ticket id (tkt_*).
    - `opener_type` 'human' | 'agent', required: Who opened the ticket, snapshotted from the account type at creation.
    - `status` union, required: Ticket lifecycle status — the enum below is the complete, closed set. `closed` is terminal (an auto-closed ticket may be reopened by replying within 7 days). Terminal states (safe to stop polling): closed.
      - 'awaiting_reply': The ball is with support — a reply from support is pending. NEVER auto-closes.
      - 'answered': Support replied; awaiting the user. Auto-closes after 2 business days of no user reply.
      - 'closed': TERMINAL — closed by the user, support, or the 2-business-day auto-close sweep.
    - `subject` string, required: Ticket subject (4–120 chars).
    - `category` 'bug' | 'question' | 'account' | 'payment' | 'other', required: Ticket category.
    - `created_at` string, required: Creation timestamp (RFC 3339 UTC).
    - `last_activity_at` string, required: Timestamp of the last user/admin message (RFC 3339 UTC). System messages do not bump it.
    - `closed_reason` string, nullable, required: Why the ticket closed: 'user', 'admin' or 'auto' — null while open.
    - `closed_at` string, nullable, required: Close timestamp (RFC 3339 UTC) — null while open. Anchors the 7-day reopen window for auto-closed tickets.
    - `rating` integer, nullable, required: Satisfaction score the ticket owner gave (0 = worst, 10 = best) — null until rated. Only a closed ticket can be rated, and only once.
    - `rated_at` string, nullable, required: When the rating was submitted (RFC 3339 UTC) — null until rated.
  - `messages` TicketMessage[], required: All messages, oldest first.
    - `id` string, required: Message id.
    - `sender` 'user' | 'admin' | 'system', required: Who sent the message.
    - `body` string, required: Message body.
    - `created_at` string, required: Message timestamp (RFC 3339 UTC).
    - `attachment` TicketAttachment: Metadata of a file attached to a message. The bytes are forwarded to the support team (not stored or served back) — only the name and type are exposed.
      - `name` string, required: Original filename (sanitized).
      - `mime` string, nullable, required: Content type (image/png, image/jpeg, image/webp, application/pdf, text/plain or application/json).

## Other responses

- `401`: Missing/invalid credentials. `invalid_api_key` for a failed sk_* lookup (revoked/expired/unknown); `invalid_token` for a bad or missing JWT/Authorization header.
- `404`: Ticket not found — includes rows owned by another account (ownership is never disclosed).
- `429`: Rate limited (per-IP, per-key or per-merchant window). Retry after `retry_after` seconds (also in the Retry-After header).

---

[API](https://skmtc.dev/depixapp/apis/depix-api.md) · [All operations](https://skmtc.dev/depixapp/apis/depix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/depixapp/apis/depix-api/revisions/04094536dd0f?raw)
