---
title: "Open a support ticket"
method: POST
path: "/api/tickets"
tags: ["support"]
---

# Open a support ticket

`POST /api/tickets`

## Request

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

Opens a support ticket (human or agent — one channel). Send a Bearer JWT or an sk_ API key; NO scope is required. The body becomes the first message. Up to 5 open tickets per account (1 for suspended accounts). Poll GET /api/tickets/{id} for the reply (support answers within 1 business day — check in minutes, not seconds). For API questions, the docs/llms.txt usually answer instantly.

## Request body

- TicketCreateRequest: Open a new support ticket. The body becomes the first user message.
  - `subject` string, required: Short subject (4–120 chars).
  - `body` string, required: Message body (1–4000 chars).
  - `category` 'bug' | 'question' | 'account' | 'payment' | 'other': Optional category (defaults to 'other'). Does not route anything today; used for triage.

## Response `201`

Ticket created.

- TicketResponse: A single ticket wrapped in `ticket`.
  - `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.

## Other responses

- `400`: Validation failure — the legacy per-field `response.errors[]` sibling is preserved.
- `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.
- `429`: Rate limited, or the open-ticket cap was reached (`ticket_open_cap`: max 5 open tickets, 1 for suspended accounts).

---

[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)
