Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/yocxy2/2a/llms.txt

Use this file to discover all available pages before exploring further.

Fetch a single support ticket by its auto-incremented numeric ID. Use this endpoint to display full ticket details in the Admin Dashboard, poll for status changes after creation, or retrieve the AI-generated response for display to the customer.

Request

GET /api/v1/tickets/:id

Path Parameters

id
number
required
The ticket’s numeric ID. This is the id value returned when the ticket was created via POST /api/v1/tickets. Must be a valid integer — non-integer values will result in a database lookup for NaN and typically return 404.

Example

curl http://localhost:3001/api/v1/tickets/42

Response (200 OK)

Returns a single Ticket object.
id
number
Auto-incremented ticket ID.
user_description
string
The original customer problem description submitted at creation time.
category
string | null
AI-assigned support category. One of: Billing, Technical, Shipping, Returns, Account, or Other. null if classification has not yet run.
ai_suggested_response
string | null
GPT-4o-mini response enriched with knowledge base article snippets and GraphRAG entity context. null if classification has not yet run.
confidence_score
number | null
AI classification confidence between 0.0 and 1.0. Tickets with score ≥ 0.7 are auto-resolved.
status
string
Current lifecycle status: ai_resolved, pending_agent, or closed.
created_at
string
ISO 8601 UTC timestamp recording when the ticket was first created.
updated_at
string
ISO 8601 UTC timestamp of the most recent update to this ticket.

Example Response

{
  "id": 42,
  "user_description": "I cannot access my account after changing my email address",
  "category": "Account",
  "ai_suggested_response": "To regain access, please use the password reset flow...\n\nRelated articles:\n- Reset your password: Click 'Forgot Password' on the login page...\n\nRelated entities: email, account, password reset",
  "confidence_score": 0.88,
  "status": "ai_resolved",
  "created_at": "2024-01-15T10:30:00.000Z",
  "updated_at": "2024-01-15T10:30:00.000Z"
}

Error Responses

HTTP StatusCondition
404 Not FoundNo ticket with the given ID exists in the database. Response: {"error": "Ticket not found"}
500 Internal Server ErrorA database error or other unhandled server-side failure occurred. Response: {"error": "Internal server error"}

Build docs developers (and LLMs) love