Undo a logged mailbox change
undo_actionReverse a logged mailbox change—such as a move, read-state, label, or rule application—when the user asks to undo, and report any messages that cannot be restored.
Instructions
Reverse one logged mailbox change, once, at the user's request; reports messages it can no longer restore.
Use it only when the user asks to undo. It reverses a move to Trash, Archive or a folder, a read-state or label change, or an apply_rules chunk, by the log_id that call returned (one per log_ids entry) or list_actions finds. It takes no preview or token, and is audited. Draft deletion, unsubscribe, sending, folder creation, saved rules, reindex and preview records cannot be undone.
A large chunk may need several calls: partial=true with "Undo time budget reached" (and deferred, the messages not yet examined) means call again with the same original log_id; each call restores only messages not yet restored, and a finished undo refuses as already undone.
Returns this attempt's own log_id, count, messages, missing and partial, with deferred, unresolved (rows of prior attempts, by their log_id) and error when they apply. An unknown or non-undoable log_id refuses, and so does a chunk over 200 messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| log_id | Yes | The original action's log_id, 32 lowercase hexadecimal characters, from its result or list_actions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||