Skip to content
gist.link ↗

moveEmails

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

Move messages between folders (archive, trash, spam, back to inbox…).

mail:mutation:moveEmails

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 {
moveEmails(uuids: [String!]!, folder: Folder!): [Email!]!
}
Argument Type Required Description
uuids [String!]! Yes —
folder Folder! 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 MoveEmails($uuids: [String!]!, $folder: Folder!) { moveEmails(uuids: $uuids, folder: $folder) { uuid status subject created_at } }",
"variables": {
"uuids": [
"example"
],
"folder": "INBOX"
}
}
JSON