Skip to content
gist.link ↗

threads

Query Mail API — POST https://mail.api.gist.link/graphql

Threads in the caller’s mailboxes, newest activity first. Scope to one mailbox with mailbox_uuid; omit it to aggregate across every mailbox assigned to the caller.

mail:query:threads

The calling IAM key must hold this permission (or a wildcard that covers it: mail:query:* or mail:*) and the access token must have been minted with audience=mail. See Permissions.

type Query {
threads(mailbox_uuid: String, filter: ThreadFilter, first: Int, after: String): ThreadConnection!
}
Argument Type Required Description
mailbox_uuid String No —
filter ThreadFilter No —
first Int No —
after String No —

ThreadConnection! — see the Mail types reference.

Terminal window
curl https://mail.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query Threads($mailbox_uuid: String, $filter: ThreadFilter, $first: Int, $after: String) { threads(mailbox_uuid: $mailbox_uuid, filter: $filter, first: $first, after: $after) { edges { cursor node { uuid subject created_at } } } }",
"variables": {
"mailbox_uuid": "example",
"filter": {
"folder": "INBOX",
"label_uuid": "example",
"search": "example"
},
"first": 10,
"after": "cursor"
}
}
JSON