Skip to main content

Get my tickets

myTickets returns the pending tickets waiting on the caller: approvals to decide and fulfillment tasks to complete. It needs no role, because it only ever answers for the identity the request runs as.

query MyTickets($first: Int, $after: String, $sortDirection: SortDirection) {
myTickets(first: $first, after: $after, sortDirection: $sortDirection) {
data {
id
type
status
created_at
due_at
assignment_type
beneficiary_data {
id
display_name
email
}
requestedResource {
id
name
}
request {
id
request_number
justification
}
}
pageInfo {
hasNextPage
nextCursor
}
}
}

Variables:

{ "first": 20, "sortDirection": "DESC" }
{
"data": {
"myTickets": {
"data": [
{
"id": "019d1f37-3663-753f-a215-c7460111901f",
"type": "APPROVAL",
"status": "PENDING",
"created_at": "2026-11-03T09:14:22.000Z",
"due_at": "2026-11-06T09:14:22.000Z",
"assignment_type": "GROUP",
"beneficiary_data": {
"id": "019d1f36-b056-78ef-97dd-f6c707ac44be",
"display_name": "Bao Tran",
"email": "bao.tran@acme.example"
},
"requestedResource": {
"id": "019d1f36-c27d-7276-b4f4-59953442554f",
"name": "Ledger Admin"
},
"request": {
"id": "019d1f36-df55-70f4-84d0-9aa44f8f5524",
"request_number": 1203,
"justification": "Covering the quarter-end close for the finance team"
}
}
],
"pageInfo": { "hasNextPage": false, "nextCursor": null }
}
}
}

Which tickets you get​

A ticket is in the list when its status is PENDING and one of these is true:

  • It is assigned to the caller.
  • It is assigned to a group the caller belongs to, directly or through a nested group.
  • It is assigned to someone who has an active delegation to the caller.

assignment_type is USER or GROUP, and assignedToIdentity or assignedToGroup holds the assignee. Decided and cancelled tickets leave the list.

With an API key, the caller is the key's service account, so myTickets returns the tickets assigned to that service account or to its groups. It does not return another person's tickets. To read tickets across the organization, use tickets, which needs the ticket.read permission and takes a filter.

Arguments​

ArgumentDoes
first, afterPage size and cursor. Without first, a page holds 50 tickets.
sortDirectionDESC (the default) returns the newest tickets first, and ASC the oldest.
searchBeneficiaryKeeps tickets whose beneficiary's display name contains the text, ignoring case.
searchRequestNumberKeeps tickets whose request number starts with the digits given.

Page forward by sending after with the nextCursor you received, until hasNextPage is false. The list has no total: count by paging, or show the number of tickets you have loaded.

  • myClaimedTickets returns the pending tickets the caller has claimed.
  • ticket(id: ...) returns one ticket the caller may see.
  • ticketsByRequest(requestId: ...) returns the tickets of one request.

Requests, tickets and the inbox explains how tickets relate to requests.