Update one or more mutable fields on an existing ticket. The endpoint accepts a partial body — only fields present in the request are written to the database; all other fields are left unchanged. The updated ticket is returned in the response. At least one ofDocumentation 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.
status, category, or ai_suggested_response must be included in the request body, otherwise the API returns 400.
Request
PATCH /api/v1/tickets/:id
Path Parameters
The numeric ID of the ticket to update. Returned by
POST /api/v1/tickets on creation.Body Parameters
Set the ticket’s lifecycle status. One of:
ai_resolved— Mark the ticket as handled by AIpending_agent— Route the ticket back to a human agent queueclosed— Mark the ticket as resolved and closed
Override the AI-assigned category with a manually specified value. Useful when an agent determines the AI mis-classified the ticket.
Replace the AI-generated response with a custom agent-authored reply.
Examples
Response (200 OK)
Returns the complete updated Ticket object reflecting all applied changes.The ticket’s numeric ID (unchanged).
The original customer problem description (unchanged).
The category after the update — either the original AI-assigned value or the new value if
category was provided in the request.The AI-generated or agent-overridden response after the update.
AI confidence score (unchanged by this endpoint).
The ticket status after the update.
ISO 8601 UTC creation timestamp (unchanged).
ISO 8601 UTC timestamp reflecting the time of this update, automatically set by the database.
Example Response
Error Responses
| HTTP Status | Condition |
|---|---|
400 Bad Request | No valid fields (status, category, or ai_suggested_response) were included in the request body. Response: {"error": "No valid fields to update"} |
500 Internal Server Error | The ticket ID does not exist (Prisma throws on a missing update target), a database error occurred, or another unhandled server-side failure. Response: {"error": "Internal server error"} |