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.

Retrieve a list of all support tickets stored in the database. Results are always ordered by created_at descending so the most recently created tickets appear first. Use the optional status query parameter to scope the results to a specific lifecycle stage — useful for building agent queues or dashboard views.

Request

GET /api/v1/tickets

Query Parameters

status
string
Filter the results to tickets whose status matches this value. Valid values:
  • ai_resolved — Tickets the AI handled with confidence ≥ 0.7
  • pending_agent — Tickets awaiting human agent review
  • closed — Tickets that have been closed
Omit this parameter entirely to return all tickets regardless of status.

Examples

# Get all tickets (no filter)
curl http://localhost:3001/api/v1/tickets

# Get only tickets pending human review
curl "http://localhost:3001/api/v1/tickets?status=pending_agent"

# Get AI-resolved tickets
curl "http://localhost:3001/api/v1/tickets?status=ai_resolved"

Response (200 OK)

Returns a JSON array of Ticket objects directly (not wrapped in an object). The array is empty ([]) when no tickets match the filter. Results are sorted by created_at descending — newest tickets appear first. Each element of the array contains the following fields:
id
number
Auto-incremented ticket ID.
user_description
string
The original customer problem description.
category
string | null
AI-assigned category: Billing, Technical, Shipping, Returns, Account, or Other.
ai_suggested_response
string | null
AI-generated response enriched with knowledge base articles and graph entity context.
confidence_score
number | null
AI confidence score between 0.0 and 1.0.
status
string
Current ticket status: ai_resolved, pending_agent, or closed.
created_at
string
ISO 8601 UTC creation timestamp.
updated_at
string
ISO 8601 UTC last-updated timestamp.

Example Response

[
  {
    "id": 43,
    "user_description": "My order has been stuck in transit for 10 days",
    "category": "Shipping",
    "ai_suggested_response": "We apologize for the delay. Please allow 2–3 business days for carrier updates...\n\nRelated articles:\n- Tracking your order: Visit the tracking portal at...",
    "confidence_score": 0.91,
    "status": "ai_resolved",
    "created_at": "2024-01-15T11:00:00.000Z",
    "updated_at": "2024-01-15T11:00:00.000Z"
  },
  {
    "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...",
    "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
500 Internal Server ErrorA database query error or other unhandled server-side failure. Response: {"error": "Internal server error"}

Build docs developers (and LLMs) love