---
title: "Ticket Action"
method: POST
path: "/api/context-agent/ticket_action"
tags: ["context-agent"]
---

# Ticket Action

`POST /api/context-agent/ticket_action`

## Request

- Base URL: `https://app.getdot.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.getdot.ai/api/context-agent/ticket_action`
- Auth: one of:
  - API key in header `X-API-KEY`
  - API key in cookie `Authorization`
  - OAuth 2 (password, token URL `/api/auth/token`)

The context agent's single ticket verb (see agent_docs/tickets.md).

Auth is the agent's long-lived api:full token via Depends(get_current_user); the
org boundary is enforced by org-scoped storage, so chat_id/ticket_id from another
org are invisible. The agent *declares* the outcome here — the host never infers
a ticket from a diff.

## Request body

- TicketActionRequest: Body for POST /ticket_action. The agent ends a propose run with exactly one action: list (dedup), publish (a new ticket), or duplicate (bump an existing one). chat_id is the agent's own session, baked into its helper from $CHAT_ID — the LLM never types an id; ticket_id (for duplicate) comes straight from a prior list.
  - `action` string, required
  - `chat_id` string, nullable
  - `kind` string, nullable
  - `title` string, nullable
  - `summary` string, nullable
  - `evidence_chat_ids` string[], nullable
  - `ticket_id` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getdot/apis/dot-api-2.md) · [All operations](https://skmtc.dev/getdot/apis/dot-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/getdot/apis/dot-api-2/revisions/d26fe7163a7f?raw)
