Skip to content
gist.link ↗

mailboxStats

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

Per-folder unread counts for the sidebar badges. Scope to one mailbox with mailbox_uuid; omit it to aggregate across every mailbox assigned to the caller.

mail:query:mailboxStats

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 {
mailboxStats(mailbox_uuid: String): [FolderStat!]!
}
Argument Type Required Description
mailbox_uuid String No —

[FolderStat!]! — 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 MailboxStats($mailbox_uuid: String) { mailboxStats(mailbox_uuid: $mailbox_uuid) { folder unread_count } }",
"variables": {
"mailbox_uuid": "example"
}
}
JSON