Skip to main content

Tickets API

Retrieve support tickets created by your chatbots during conversations.

List Tickets

GET /api/v1/tickets

Required Scope: tickets:read

Query Parameters

ParameterTypeDefaultDescription
limitinteger20Number of records (1-100)
offsetinteger0Number of records to skip
chatbot_idUUID-Filter by chatbot
statusstring-Filter by status
prioritystring-Filter by priority
sinceISO 8601-Get tickets updated after timestamp

Example Request

curl -X GET "https://app.leezy.ai/api/v1/tickets?status=open&priority=high" \
-H "Authorization: Bearer lzy_at_your_token"

Response

{
"data": [
{
"id": "ticket_abc123",
"type": "ticket",
"attributes": {
"chatbot_id": "chatbot_xyz789",
"conversation_id": "conv_def456",
"title": "Cannot access account after password reset",
"description": "Customer tried to reset password but still cannot log in. Tried clearing cookies and different browsers.",
"category": "account_access",
"priority": "high",
"status": "open",
"customer": {
"name": "Michael Chen",
"email": "michael.chen@example.com"
},
"assigned_to": null,
"resolution_notes": null,
"resolved_at": null,
"created_at": "2024-01-15T14:22:00Z",
"updated_at": "2024-01-15T14:22:00Z"
}
}
],
"meta": {
"api_version": "2024-01-01",
"total": 15,
"limit": 20,
"offset": 0,
"has_more": false,
"count": 15
}
}

Ticket Object

FieldTypeDescription
idstringUnique ticket identifier
chatbot_idUUIDChatbot that created the ticket
conversation_idUUIDSource conversation
titlestringTicket title/subject
descriptionstringDetailed issue description
categorystringIssue category
prioritystringPriority level
statusstringCurrent status
customer.namestringCustomer name
customer.emailstringCustomer email
assigned_tostringAssigned team member
resolution_notesstringResolution details
resolved_atISO 8601Resolution timestamp
created_atISO 8601Creation timestamp
updated_atISO 8601Last update timestamp

Status Values

StatusDescription
openNewly created ticket
in_progressBeing worked on
waiting_on_customerWaiting for customer response
resolvedIssue resolved
closedTicket closed

Priority Values

PriorityDescription
lowLow priority - no immediate action needed
mediumMedium priority - address within 24 hours
highHigh priority - address within 4 hours
urgentUrgent - immediate attention required

Filtering Examples

# Get all open high-priority tickets
GET /api/v1/tickets?status=open&priority=high

# Get tickets from a specific chatbot
GET /api/v1/tickets?chatbot_id=abc123

# Poll for new tickets in the last hour
GET /api/v1/tickets?since=2024-01-15T13:00:00Z

Error Responses

StatusErrorDescription
401unauthorizedMissing or invalid token
403insufficient_scopeToken lacks tickets:read scope
403plan_requiredPaid plan required

Next Steps