Skip to content
gist.link ↗

addSenderRule

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

Add an allow/block sender rule (full address or bare domain, subdomains included). With mailbox_uuid it is personal; without, org-wide (ROLE_ADMIN). Blocked senders go straight to Trash; allowed senders bypass spam filtering.

mail:mutation:addSenderRule

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 {
addSenderRule(input: SenderRuleInput!): SenderRule!
}
Argument Type Required Description
input SenderRuleInput! Yes —

SenderRule! — 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 AddSenderRule($input: SenderRuleInput!) { addSenderRule(input: $input) { uuid type created_at } }",
"variables": {
"input": {
"type": "example",
"pattern": "example"
}
}
}
JSON