Gmail
Email Archive
Archive one email in a connected Gmail/Outlook account.
Endpoint
Parameters
| Name | Type | Required | Note |
|---|---|---|---|
| emailstring · optional | string | optional | The other party's email address, used to locate their most recent message when `messageId` is not supplied. |
| senderstring · optional | string | optional | The connected email account in this workspace whose mailbox holds the email. Accepts its address ("you@company.com"), its provider-prefixed identifier ("GOOGLE_OAUTH:you@company.com"), or the connected account id from a trigger payload (its `account_id`). NOTE: this is the account you are acting AS — not the address the mail happened to be delivered to, which may be an alias that is not itself connected. |
| emailIdstring · optional | string | optional | Alias for `messageId`. |
| accountIdstring · optional | string | optional | Alias for `sender` — the connected account id. |
| messageIdstring · optional | string | optional | Id of the exact email to archive — as returned by email-list, or the `chat_id` of an email_received trigger payload. PREFER THIS whenever you have it: it targets one specific message, so `email` is then unnecessary. |
Response schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"status",
"providerId"
],
"properties": {
"note": {
"type": "string"
},
"status": {
"enum": [
"success"
],
"type": "string"
},
"providerId": {
"type": "string"
}
},
"additionalProperties": false
}