API Reference
Tickets
List Tickets
Retrieve a paginated list of tickets in the current workspace.
GET /api/tickets
Query Parameters
| Parameter | Type | Description |
|---|---|---|
per_page |
integer | Results per page (default: 25, max: 100) |
sort |
string | Sort field: created_at, updated_at, last_activity_at. Prefix with - for descending (default: -updated_at) |
filter[status] |
string | Comma separated statuses: open, closed, spam |
filter[channel_ids] |
string | Comma separated channel IDs |
filter[tag_ids] |
string | Comma separated tag IDs |
filter[search] |
string | Search term for subject and message content |
filter[assigned_to_me] |
boolean | Only tickets assigned to the authenticated user |
filter[unassigned] |
boolean | Only unassigned tickets |
Example Request
curl "https://app.therethere.com/api/tickets?filter[status]=open&sort=-updated_at&per_page=10" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Example Response
{
"data": [
{
"id": 42,
"ulid": "01HX9F3K2M...",
"subject": "Cannot reset my password",
"status": "open",
"channel": { "id": 1, "name": "Support", "type": "email", "color": "#3b82f6" },
"assignee": {
"id": 5,
"name": "Jane Smith",
"email": "jane@example.com",
"avatar_url": null,
"timezone": "UTC"
},
"contact": {
"id": 12,
"ulid": "01HX9F3K2N...",
"name": "John Doe",
"email": "john@customer.com",
"avatar_url": null
},
"tags": [{ "id": 3, "ulid": "01HX9F3K2P...", "name": "urgent", "color": "red" }],
"latest_message_preview": "I tried clicking the link but...",
"summary": null,
"created_at": "2025-06-01T10:30:00+00:00",
"updated_at": "2025-06-02T14:15:00+00:00"
}
],
"links": { "first": "...", "last": "...", "prev": null, "next": "..." },
"meta": { "current_page": 1, "last_page": 5, "per_page": 10, "total": 48 }
}
Get Ticket
Retrieve a single ticket with its messages and activity log.
GET /api/tickets/{id}
Example Request
curl https://app.therethere.com/api/tickets/42 \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Example Response
{
"ticket": {
"id": 42,
"ulid": "01HX9F3K2M...",
"subject": "Cannot reset my password",
"status": "open",
"channel": { "id": 1, "name": "Support", "type": "email", "color": "#3b82f6" },
"assignee": null,
"contact": {
"id": 12,
"ulid": "01HX9F3K2N...",
"name": "John Doe",
"email": "john@customer.com",
"avatar_url": null
},
"tags": [],
"latest_message_preview": "I tried clicking the link but...",
"summary": null,
"created_at": "2025-06-01T10:30:00+00:00",
"updated_at": "2025-06-02T14:15:00+00:00",
"messages": [
{
"id": 101,
"ulid": "01HX9F3K2Q...",
"type": "inbound",
"body_html": "<p>I tried clicking the link but it expired.</p>",
"sender": {
"id": 12,
"type": "contact",
"name": "John Doe",
"email": "john@customer.com",
"avatar_url": null
},
"attachments": [],
"is_forward": false,
"created_at": "2025-06-01T10:30:00+00:00"
}
],
"activities": [
{
"type": "status_changed",
"user": { "id": 5, "name": "Jane Smith" },
"created_at": "2025-06-02T14:15:00+00:00"
}
]
}
}
Update Ticket Status
PUT /api/tickets/{id}/status
{ "status": "closed" }
Valid status values: open, closed, spam.
Update Ticket Assignee
PUT /api/tickets/{id}/assignee
{ "user_id": 5 }
Pass null for user_id to unassign.