Skip to main content
POST
List tickets
Use this endpoint to list ticket summaries for a workspace. The response is paginated and includes the latest message, customer, channel, tag, custom-field, assignee, and queue summary fields used by the Sagepilot ticket list. If you omit the request body, Sagepilot treats it as {} and applies the default pagination and sorting behavior.

Required access

Body

integer
default:"10"
Number of records to return. The minimum is 1 and the maximum is 100.
string
Cursor from the previous response. Pass this value to fetch the next page.
boolean
default:"true"
Whether to include the total matching record count. Set to false for faster cursor syncs when you only need records and cursor.
string
Ticket status filter. Use all or omit the field to avoid status filtering. Supported view-style values include open, reopened, investigating, snoozed, waiting_on_customer, and closed.
string
Comma-separated priorities to include, such as high,medium.
string
Comma-separated assignee types, such as agent or pilot.
string
Comma-separated human agent or AI agent UUIDs. Use current where the API request is associated with a user context. See Resource IDs.
string
Comma-separated channel kinds, such as email,whatsapp.
string
Comma-separated channel UUIDs. Find channel IDs in Settings > API Details > Channels. See Resource IDs.
string
Comma-separated boolean values, such as true or false.
string
Built-in or custom view code. Built-in values include needs_attention, awaiting_reply, needs_first_human_reply, and mentions.
string
Comma-separated tag IDs to include.
string
Comma-separated tag IDs to exclude.
string
Comma-separated queue statuses.
string
Comma-separated team UUIDs. See Resource IDs.
string
Use true to return tickets without an assigned agent or AI agent.
string
Comma-separated inferred CSAT score values.
string
Comma-separated user-submitted CSAT score values.
object
Object mapping custom field IDs to filter values. For multiple accepted values on one field, pass a comma-separated string.
string
Custom field value filter for the given Sagepilot custom field ID.
string
Date preset or explicit range. Supported values include today, yesterday, last_7_days, last_30_days, start|end, start|, or a start-only ISO timestamp.
string
default:"last_message_created_at"
Date field used with date_range. Supported values are created_at, last_message_created_at, chat_escalated_at, closed_at, and updated_at.
string
default:"last_message_created_at"
Field used for ordering and cursor generation. Supported values are created_at, last_message_created_at, chat_escalated_at, closed_at, and updated_at.
string
default:"desc"
Sort direction. Use asc or desc.

Response

object[]
required
Paginated ticket summaries.
string
Ticket ID.
string
Human-readable ticket code.
string
Ticket status.
string
Ticket sub-status, when present.
string
Ticket priority.
string
Ticket subject.
string
Ticket summary.
string
Current assignee type, such as agent or pilot.
string
Assigned human agent ID, when applicable.
string
Assigned AI agent ID, when applicable.
string
Assigned team ID, when applicable.
string
Assigned team name, when available.
string
Channel ID for the ticket.
boolean
Whether the ticket has unread messages.
integer
Number of unread messages on the ticket.
integer
Number of human agent messages on the ticket.
integer
Number of AI agent messages on the ticket.
integer
Number of customer messages on the ticket.
string
Queue status, when the ticket is queued.
string
Ticket creation timestamp.
string
Ticket update timestamp.
string
Timestamp of the latest message attached to the ticket.
string
Ticket close timestamp, when closed.
object
Customer summary for the ticket.
object
Channel summary for the ticket.
object
Latest message summary for the ticket.
object
AI agent summary, when assigned.
object
Human agent profile summary, when assigned.
object[]
Tags attached to the ticket.
object[]
Custom field values attached to the ticket.
string
Cursor for the next page. This is null when there is no next page.
integer
Total matching records when include_total is true; otherwise null.

Notes

  • Use API client v2 credentials with tickets:read scope and the tickets dataset grant. See API client v2.
  • Multi-value filters are comma-separated strings.
  • Use assignee with assignee_type to filter by human agents or AI agents.