Skip to content
gist.link ↗

updateLabel

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

Rename/recolor a label. Caller must own the mailbox.

mail:mutation:updateLabel

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 {
updateLabel(uuid: String!, input: UpdateLabelInput!): Label!
}
Argument Type Required Description
uuid String! Yes —
input UpdateLabelInput! 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 UpdateLabel($uuid: String!, $input: UpdateLabelInput!) { updateLabel(uuid: $uuid, input: $input) { uuid name created_at } }",
"variables": {
"uuid": "example",
"input": {
"name": "Example",
"color": "example"
}
}
}
JSON