Skip to content
gist.link ↗

labels

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

Custom labels of one of the caller’s mailboxes.

mail:query:labels

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 {
labels(mailbox_uuid: String!): [Label!]!
}
Argument Type Required Description
mailbox_uuid String! Yes —

[Label!]! — 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 Labels($mailbox_uuid: String!) { labels(mailbox_uuid: $mailbox_uuid) { uuid name created_at } }",
"variables": {
"mailbox_uuid": "example"
}
}
JSON