Move approved mail
moveRelocates approved messages to Trash, Archive or a specified folder using an approved preview token, confirming the exact change first and returning log IDs for undo.
Instructions
Move the approved messages to Trash, Archive or a folder; only call after the user explicitly approved the preview.
Use it only with a move_to_trash, archive or move_to_folder token from preview_action that the user approved, or the continuation_token of that approval. target states the preview's target; the token pins the destination and is what the move uses, so any other target refuses before the form. Unless the operator turned it off, the user then confirms the exact change in the client's form. Moving to Trash deletes nothing, and this server never empties Trash.
Read-state changes use the preview's setting. If the approval includes creating a missing folder, it is created first (folder_creation reports it). limit caps the messages this call processes.
Returns target, log_ids (a list even for zero or one chunk), counts, run/continuation state and message IDs; verbose=true adds full rows. Pass each log_id to undo_action to move the messages back. Any untouched remainder gets a continuation, redeemed with the same target; a continuation reports a changed row in blocked_ids and leaves it untouched. An expired, used or unknown token refuses: preview again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Messages to process in this call, 1 to 200. A value above the approved total refuses and keeps the token. | |
| token | Yes | Single-use token from the preview the user approved, or the continuation_token of an earlier partial run of that approval. | |
| target | Yes | The preview's target: "Trash", "Archive" or the exact Folders/ name. Any other value refuses without consuming the token. | |
| verbose | No | true adds messages and replaces blocked_ids, missing_ids and mismatched_ids with full blocked, missing and mismatched rows. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||