Skip to content
gist.link ↗

createLabel

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

Create a custom label in one of the caller’s mailboxes.

mail:mutation:createLabel

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

type Mutation {
createLabel(input: CreateLabelInput!): Label!
}
Argument Type Required Description
input CreateLabelInput! 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": "mutation CreateLabel($input: CreateLabelInput!) { createLabel(input: $input) { uuid name created_at } }",
"variables": {
"input": {
"mailbox_uuid": "example",
"name": "Example"
}
}
}
JSON