Skip to content
gist.link ↗

sendEmail

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

Queue a message for delivery (all sending is asynchronous; the returned Email has status QUEUED, later SENT or FAILED). Humans send from a mailbox they own (mailbox_uuid, or their only mailbox by default); the message is threaded into thread_uuid when replying and lands in the SENT folder. Sending a draft: pass draft_uuid. Machine callers (IAM grant mail:mutation:sendEmail) pass from instead — any address on a domain the organization has verified in settings.

mail:mutation:sendEmail

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 {
sendEmail(input: SendEmailInput!): Email!
}
Argument Type Required Description
input SendEmailInput! Yes —

Email! — 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 SendEmail($input: SendEmailInput!) { sendEmail(input: $input) { uuid status subject created_at } }",
"variables": {
"input": {
"to": [
{
"address": "example"
}
],
"subject": "example"
}
}
}
JSON