Tickets API
Retrieve support tickets created by your chatbots during conversations.
List Tickets
GET /api/v1/tickets
Required Scope: tickets:read
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Number of records (1-100) |
offset | integer | 0 | Number of records to skip |
chatbot_id | UUID | - | Filter by chatbot |
status | string | - | Filter by status |
priority | string | - | Filter by priority |
since | ISO 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
| Field | Type | Description |
|---|---|---|
id | string | Unique ticket identifier |
chatbot_id | UUID | Chatbot that created the ticket |
conversation_id | UUID | Source conversation |
title | string | Ticket title/subject |
description | string | Detailed issue description |
category | string | Issue category |
priority | string | Priority level |
status | string | Current status |
customer.name | string | Customer name |
customer.email | string | Customer email |
assigned_to | string | Assigned team member |
resolution_notes | string | Resolution details |
resolved_at | ISO 8601 | Resolution timestamp |
created_at | ISO 8601 | Creation timestamp |
updated_at | ISO 8601 | Last update timestamp |
Status Values
| Status | Description |
|---|---|
open | Newly created ticket |
in_progress | Being worked on |
waiting_on_customer | Waiting for customer response |
resolved | Issue resolved |
closed | Ticket closed |
Priority Values
| Priority | Description |
|---|---|
low | Low priority - no immediate action needed |
medium | Medium priority - address within 24 hours |
high | High priority - address within 4 hours |
urgent | Urgent - 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
| Status | Error | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid token |
| 403 | insufficient_scope | Token lacks tickets:read scope |
| 403 | plan_required | Paid plan required |
Next Steps
- Webhooks - Get real-time
ticket.createdevents - Zapier Integration - Route tickets to your helpdesk