Skip to main content
POST
/
platform-api
/
v1
/
chats
/
list
List tickets
curl --request POST \
  --url https://app.sagepilot.ai/platform-api/v1/chats/list \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "page_size": 123,
  "cursor": "<string>",
  "include_total": true,
  "status": "<string>",
  "priority": "<string>",
  "assignee_type": "<string>",
  "assignee": "<string>",
  "channel_kind": "<string>",
  "channel": "<string>",
  "unread_status": "<string>",
  "view": "<string>",
  "tags": "<string>",
  "excluded_tags": "<string>",
  "queue_status": "<string>",
  "team": "<string>",
  "no_assignee": "<string>",
  "inferred_csat_score": "<string>",
  "user_csat_score": "<string>",
  "custom_fields": {},
  "custom_fields.<field_id>": "<string>",
  "date_range": "<string>",
  "date_filter_field": "<string>",
  "sort_by_field": "<string>",
  "sort_order": "<string>"
}
'
{
  "records": [
    {
      "id": "9b7110ad-69b6-4476-a448-e99b4054ad9c",
      "workspace_id": "ab1360ce-ef91-4397-8fbd-3ed77ef80e08",
      "status": "closed",
      "sub_status": null,
      "priority": "",
      "last_message_created_at": "2026-05-28T18:03:11.500000+00:00",
      "pilot_id": "e3638c66-4100-4a13-b6ad-461f41847e46",
      "agent_id": null,
      "created_at": "2026-05-28T18:02:54.777168+00:00",
      "updated_at": "2026-05-29T06:32:37.091082+00:00",
      "chat_escalated_at": null,
      "assignee_type": "pilot",
      "code": "1141",
      "unread_status": true,
      "total_unread_messages": 1,
      "subject": null,
      "summary": null,
      "channel_id": "195a338d-2dfb-4653-9e4c-87e988efa818",
      "custom_info": null,
      "total_agent_messages": 0,
      "total_pilot_messages": 1,
      "total_user_messages": 1,
      "inferred_csat_score": null,
      "user_csat_score": null,
      "is_spam": false,
      "latest_entry_sort_column": "2026-05-28T18:03:11.500000+00:00",
      "substatus_expiry_time": null,
      "team_id": null,
      "team_name": null,
      "queue_status": null,
      "queued_at": null,
      "dequeued_at": null,
      "closed_at": "2026-05-29T06:32:37.091082+00:00",
      "chat_custom_fields": [],
      "first_agent_response_at": null,
      "chat_tags": [],
      "customers": {
        "id": "5307a68f-7188-4bbb-8e38-d96f52a096c3",
        "name": "Surender Singh",
        "company": "sagepilot.ai",
        "email": "[email protected]",
        "phone": null,
        "created_at": "2026-02-15T22:41:15.158760+00:00",
        "instagram_username": null,
        "custom_fields": {}
      },
      "channels": {
        "kind": "playground",
        "id": "195a338d-2dfb-4653-9e4c-87e988efa818",
        "name": "New Playground Channel",
        "config": {
          "is_sagepilot_provider": null,
          "provider": null
        }
      },
      "pilots": {
        "name": "Jarvis",
        "ui": {
          "logo": "https://bummer.in/cdn/shop/files/mm_logo.png?crop=center&height=32&v=1759729936&width=32",
          "name": "Jarvis"
        }
      },
      "agent_profile": null,
      "messages": {
        "content": "The result of that calculation is approximately 23,258,354,226.06. Is there anything else I can help you with today?",
        "role": "pilot",
        "created_at": "2026-05-28T18:03:11.500000+00:00"
      }
    }
  ],
  "cursor": "2026-05-28T18:03:11.500000+00:00_9b7110ad-69b6-4476-a448-e99b4054ad9c",
  "total": null
}
{
  "records": [
    {
      "id": "9b7110ad-69b6-4476-a448-e99b4054ad9c",
      "workspace_id": "ab1360ce-ef91-4397-8fbd-3ed77ef80e08",
      "status": "closed",
      "sub_status": null,
      "priority": "",
      "last_message_created_at": "2026-05-28T18:03:11.500000+00:00",
      "pilot_id": "e3638c66-4100-4a13-b6ad-461f41847e46",
      "agent_id": null,
      "created_at": "2026-05-28T18:02:54.777168+00:00",
      "updated_at": "2026-05-29T06:32:37.091082+00:00",
      "chat_escalated_at": null,
      "assignee_type": "pilot",
      "code": "1141",
      "unread_status": true,
      "total_unread_messages": 1,
      "subject": null,
      "summary": null,
      "channel_id": "195a338d-2dfb-4653-9e4c-87e988efa818",
      "custom_info": null,
      "total_agent_messages": 0,
      "total_pilot_messages": 1,
      "total_user_messages": 1,
      "inferred_csat_score": null,
      "user_csat_score": null,
      "is_spam": false,
      "latest_entry_sort_column": "2026-05-28T18:03:11.500000+00:00",
      "substatus_expiry_time": null,
      "team_id": null,
      "team_name": null,
      "queue_status": null,
      "queued_at": null,
      "dequeued_at": null,
      "closed_at": "2026-05-29T06:32:37.091082+00:00",
      "chat_custom_fields": [],
      "first_agent_response_at": null,
      "chat_tags": [],
      "customers": {
        "id": "5307a68f-7188-4bbb-8e38-d96f52a096c3",
        "name": "Surender Singh",
        "company": "sagepilot.ai",
        "email": "[email protected]",
        "phone": null,
        "created_at": "2026-02-15T22:41:15.158760+00:00",
        "instagram_username": null,
        "custom_fields": {}
      },
      "channels": {
        "kind": "playground",
        "id": "195a338d-2dfb-4653-9e4c-87e988efa818",
        "name": "New Playground Channel",
        "config": {
          "is_sagepilot_provider": null,
          "provider": null
        }
      },
      "pilots": {
        "name": "Jarvis",
        "ui": {
          "logo": "https://bummer.in/cdn/shop/files/mm_logo.png?crop=center&height=32&v=1759729936&width=32",
          "name": "Jarvis"
        }
      },
      "agent_profile": null,
      "messages": {
        "content": "The result of that calculation is approximately 23,258,354,226.06. Is there anything else I can help you with today?",
        "role": "pilot",
        "created_at": "2026-05-28T18:03:11.500000+00:00"
      }
    }
  ],
  "cursor": "2026-05-28T18:03:11.500000+00:00_9b7110ad-69b6-4476-a448-e99b4054ad9c",
  "total": null
}
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

AuthenticationScopeDataset grant
API client v2tickets:readtickets

Body

page_size
integer
default:"10"
Number of records to return. The minimum is 1 and the maximum is 100.
cursor
string
Cursor from the previous response. Pass this value to fetch the next page.
include_total
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.
status
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.
priority
string
Comma-separated priorities to include, such as high,medium.
assignee_type
string
Comma-separated assignee types, such as agent or pilot.
assignee
string
Comma-separated human agent or AI agent UUIDs. Use current where the API request is associated with a user context. See Resource IDs.
channel_kind
string
Comma-separated channel kinds, such as email,whatsapp.
channel
string
Comma-separated channel UUIDs. Find channel IDs in Settings > API Details > Channels. See Resource IDs.
unread_status
string
Comma-separated boolean values, such as true or false.
view
string
Built-in or custom view code. Built-in values include needs_attention, awaiting_reply, needs_first_human_reply, and mentions.
tags
string
Comma-separated tag IDs to include.
excluded_tags
string
Comma-separated tag IDs to exclude.
queue_status
string
Comma-separated queue statuses.
team
string
Comma-separated team UUIDs. See Resource IDs.
no_assignee
string
Use true to return tickets without an assigned agent or AI agent.
inferred_csat_score
string
Comma-separated inferred CSAT score values.
user_csat_score
string
Comma-separated user-submitted CSAT score values.
custom_fields
object
Object mapping custom field IDs to filter values. For multiple accepted values on one field, pass a comma-separated string.
custom_fields.<field_id>
string
Custom field value filter for the given Sagepilot custom field ID.
date_range
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.
date_filter_field
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.
sort_by_field
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.
sort_order
string
default:"desc"
Sort direction. Use asc or desc.

Response

records
object[]
required
Paginated ticket summaries.
records[].id
string
Ticket ID.
records[].code
string
Human-readable ticket code.
records[].status
string
Ticket status.
records[].sub_status
string
Ticket sub-status, when present.
records[].priority
string
Ticket priority.
records[].subject
string
Ticket subject.
records[].summary
string
Ticket summary.
records[].assignee_type
string
Current assignee type, such as agent or pilot.
records[].agent_id
string
Assigned human agent ID, when applicable.
records[].pilot_id
string
Assigned AI agent ID, when applicable.
records[].team_id
string
Assigned team ID, when applicable.
records[].team_name
string
Assigned team name, when available.
records[].channel_id
string
Channel ID for the ticket.
records[].unread_status
boolean
Whether the ticket has unread messages.
records[].total_unread_messages
integer
Number of unread messages on the ticket.
records[].total_agent_messages
integer
Number of human agent messages on the ticket.
records[].total_pilot_messages
integer
Number of AI agent messages on the ticket.
records[].total_user_messages
integer
Number of customer messages on the ticket.
records[].queue_status
string
Queue status, when the ticket is queued.
records[].created_at
string
Ticket creation timestamp.
records[].updated_at
string
Ticket update timestamp.
records[].last_message_created_at
string
Timestamp of the latest message attached to the ticket.
records[].closed_at
string
Ticket close timestamp, when closed.
records[].customers
object
Customer summary for the ticket.
records[].channels
object
Channel summary for the ticket.
records[].messages
object
Latest message summary for the ticket.
records[].pilots
object
AI agent summary, when assigned.
records[].agent_profile
object
Human agent profile summary, when assigned.
records[].chat_tags
object[]
Tags attached to the ticket.
records[].chat_custom_fields
object[]
Custom field values attached to the ticket.
cursor
string
Cursor for the next page. This is null when there is no next page.
total
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.