Skip to main content
Required scopes: support_tickets_read

Arguments

[ID!]
Tickets assigned to any of these team members, at most 100. assigneeIds, assigneeTypes and includeUnassigned match as one OR.
Tickets with any of these kinds of assignee. Matches with assigneeIds and includeUnassigned as one OR.
On any of these channels.
Only tickets closed after this instant.
Only tickets closed before this instant.
The column groups to include, in this order. Omitted: every column, in the help desk table’s order. The always-included columns keep their places.
Only tickets created after this instant.
Only tickets created before this instant.
ID
The customer’s id or legacy id. Requires customers_read. A customer the store doesn’t have matches no tickets; a malformed id fails with BAD_USER_INPUT.Requires: customers_read
[ID!]
Has none of these tags, at most 100.
[ID!]
Tickets to leave out of a filtered export, at most 1000, as the help desk does for “all matching except these”. Ignored with ticketIds.
String
A key you choose, up to 100 characters, that makes a retry safe. For 24 hours, while no other export of the store has started since, repeating the start with the same key returns the export it started instead of starting another. The same key with different arguments throws IDEMPOTENCY_KEY_REUSED (422).
[String!]
Tickets that came in on any of these store inbox addresses, at most 100. Matched without case.
Boolean
Also match tickets with no assignee. Matches with assigneeIds and assigneeTypes as one OR.
Only tickets whose last customer message is after this instant.
Only tickets whose last customer message is before this instant.
Only tickets whose last message from the team, the AI agent or an automation is after this instant.
Only tickets whose last message from the team, the AI agent or an automation is before this instant.
Only tickets whose last message, from the customer or the team, is after this instant.
Only tickets whose last message, from the customer or the team, is before this instant.
[ID!]
Tickets with an internal note that @mentions any of these team members, at most 100.
ID
Tickets this customer takes part in on any thread, the match the help desk’s customer ticket list makes; customerId matches only the ticket’s main customer. That list also leaves out spam and the AI agent’s tickets, which this filter doesn’t. The customer’s id or legacy id. Requires customers_read.Requires: customers_read
String
The inbox search: message and subject words, the customer’s name, email or phone, order numbers. At most 200 characters. Matches customer details with only support_tickets_read, as the inbox does.
Where query looks. Omitted or empty: everywhere, including the AI summary.
[String!]
Tickets that contain every one of these keywords, at most 10 of 200 characters each. Searches what query does except order numbers, and matches customer details with only support_tickets_read.
Where searchContains looks. Omitted or empty: everywhere it can.
Int
Tickets with more than this many messages from team members, counting the tickets merged into them, as the help desk’s Sent view counts them. Internal notes count, so a ticket whose only team activity is a note has one; messages from the AI agent, auto-replies, chat flows and the system don’t. The Sent view also leaves out spam, which this filter doesn’t; excludedTagIds can. 0 or more.
Any of these. Omitted or empty: every status but ARCHIVED, as the help desk lists tickets; name ARCHIVED to include archived tickets.
[ID!]
Has any of these tags, at most 100.
[ID!]
Export exactly these tickets, at most 1000, and ignore the filters, as the help desk does for tickets picked by hand. An id the store doesn’t have, or a ticket supportTickets never lists, is left out.
Boolean
True: tickets with a customer message the team has not read yet. False: the others, including tickets the customer never wrote on.

Returns

A CSV of the store’s tickets, one row per ticket with its messages in a JSON column, written in the background. It holds the tickets supportTickets lists for the same filters. The file is deleted 8 days after the export starts; after that the export reads FAILED with RESULT_EXPIRED.

Errors

Besides the errors any request can return, this operation fails with these codes in extensions.code.

Example