# Tickets
Tickets represent support conversations between your organization and a customer. Each ticket holds a thread of messages, status, category and the related Customer and Debt Account. Tickets created from the customer portal are tagged with the source collect. Tickets submitted without authentication (for example, from a public contact form) are tagged with the source guest.
The Tickets API is read-only. To react to ticket lifecycle events in real time, subscribe to the ticket.create and ticket.update webhook events.
# List Tickets
GET https://<org-uuid>.production.tratta.io/api/v1/tickets
curl https://<org-uuid>.production.tratta.io/api/v1/tickets \
-H "Authorization: Bearer eyJ0eXA3asdk..."# Parameters
status optional|string|array|in:open,in_progress,resolved
Filter tickets by status. Accepts a single value or an array of values.
source optional|string|array|in:collect,guest
Filter tickets by source. collect tickets are submitted by authenticated customers. guest tickets are submitted without authentication. Accepts a single value or an array of values.
category optional|string|array|in:other,trouble-logging-in,change-payment-plan-info,need-info-about-my-account,need-call-support
Filter tickets by category. Accepts a single value or an array of values.
limit optional|integer|between:1,100
Number of results per page. Defaults to 15. Maximum 100.
page optional|integer
Page number for pagination.
# Returns
A json with data property that contains array of ticket objects.
Results are ordered by last_activity_at descending. The messages array is omitted from list results.
{
"id": "ccd912ca-134b-4743-9ab8-1561d6143caa",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"category": "other",
"subject": "Need help updating my payment plan",
"status": "open",
"source": "collect",
"is_read_by_customer": true,
"is_read_by_organization": false,
"last_activity_at": "2024-01-15 10:30:00",
"resolved_at": null,
"created_at": "2024-01-15 10:30:00",
"updated_at": "2024-01-15 10:30:00",
"customer": {
"id": "customer-uuid",
"name": "John Doe",
"email": "john.doe@example.com",
"external_id": "CUST-123"
},
"debt_account": {
"id": "debt-account-uuid",
"external_id": "ACC-12345",
"status": "active",
"current_balance": 10000
},
"assigned_user": {
"name": "Support Agent",
"email": "agent@example.com"
},
"messages": [
{
"id": 1,
"type": "message",
"body": "Hello, I need help updating my payment plan.",
"is_secure": false,
"source": "web",
"sender": {
"type": "customer",
"id": "customer-uuid",
"name": "John Doe"
},
"created_at": "2024-01-15 10:30:00"
},
{
"id": 2,
"type": "message",
"body": "Sure, let me take a look at your account.",
"is_secure": false,
"source": "web",
"sender": {
"type": "member",
"id": 42,
"name": "Support Agent"
},
"created_at": "2024-01-15 10:35:00"
}
]
}
# Get Ticket
GET https://<org-uuid>.production.tratta.io/api/v1/tickets/{id}
curl https://<org-uuid>.production.tratta.io/api/v1/tickets/{id} \
-H "Authorization: Bearer eyJ0eXA3asdk..."# Parameters
id required|string
UUID of the ticket.
# Returns
A json with data property that contains created ticket object.
The ticket is returned with its full message thread, including each message's sender.
{
"id": "ccd912ca-134b-4743-9ab8-1561d6143caa",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"category": "other",
"subject": "Need help updating my payment plan",
"status": "open",
"source": "collect",
"is_read_by_customer": true,
"is_read_by_organization": false,
"last_activity_at": "2024-01-15 10:30:00",
"resolved_at": null,
"created_at": "2024-01-15 10:30:00",
"updated_at": "2024-01-15 10:30:00",
"customer": {
"id": "customer-uuid",
"name": "John Doe",
"email": "john.doe@example.com",
"external_id": "CUST-123"
},
"debt_account": {
"id": "debt-account-uuid",
"external_id": "ACC-12345",
"status": "active",
"current_balance": 10000
},
"assigned_user": {
"name": "Support Agent",
"email": "agent@example.com"
},
"messages": [
{
"id": 1,
"type": "message",
"body": "Hello, I need help updating my payment plan.",
"is_secure": false,
"source": "web",
"sender": {
"type": "customer",
"id": "customer-uuid",
"name": "John Doe"
},
"created_at": "2024-01-15 10:30:00"
},
{
"id": 2,
"type": "message",
"body": "Sure, let me take a look at your account.",
"is_secure": false,
"source": "web",
"sender": {
"type": "member",
"id": 42,
"name": "Support Agent"
},
"created_at": "2024-01-15 10:35:00"
}
]
}