Skip to content
gist.link ↗

unsubscribe

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

Unsubscribe from the sender of a received message. Performs an RFC 8058 one-click unsubscribe server-side when the message supports it; otherwise returns the link / mailto for the client to complete manually.

mail:mutation:unsubscribe

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 {
unsubscribe(email_uuid: String!): UnsubscribeResult!
}
Argument Type Required Description
email_uuid String! Yes —

UnsubscribeResult! — 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 Unsubscribe($email_uuid: String!) { unsubscribe(email_uuid: $email_uuid) { status url mailto } }",
"variables": {
"email_uuid": "ada@example.com"
}
}
JSON