Outlook
Email Delete
Move an email to Trash.
Endpoint
Parameters
| Name | Type | Required | Note |
|---|---|---|---|
| emailstring · optional | string | optional | The other party's email address (e.g. the sender's address if you are the recipient), used to locate their most recent message when `messageId` is not supplied. The email is moved to the TRASH folder, not permanently deleted. |
| senderstring · optional | string | optional | The connected email account whose mailbox holds the email: its address ("you@company.com"), its provider-prefixed identifier ("GOOGLE_OAUTH:you@company.com"), or its connected account id. Must be a connected account in the workspace. |
| 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 move to Trash — as returned by email-list. 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",
"failed"
],
"type": "string"
},
"providerId": {
"type": "string"
}
},
"additionalProperties": false
}