Unsubscribe as approved
unsubscribeUnsubscribe from approved mailing lists using a single-use token from a preview you confirmed. Stops future sender mail via sender requests or saved drafts; never sends mail.
Instructions
Unsubscribe from the mailing lists an approved preview names; only call after the user explicitly approved the preview.
Use it only with a token from preview_action(action="unsubscribe") that the user approved; it takes no other argument. Unless the operator turned it off, the user then confirms the exact change in the client's form. To stop seeing mail without contacting the sender, preview a move to a folder or a folder rule instead.
HTTPS unsubscribe requests reach the senders' servers and cannot be undone; uncertain outcomes require review. A mailto target saves an unsent draft in Drafts, listed in drafts; unsubscribe never sends mail. With sending off, send_preview_error says so: the user can send that draft from Proton Mail.
Returns one log_id for this action, even with multiple unsubscribe targets, with count, messages (per-target outcomes), status, partial and token_consumed; mailto targets add drafts. partial=true means the call was interrupted: check list_actions and the Proton app before retrying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Single-use token from the preview the user approved. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||