Mark approved mail read or unread
set_read_stateMarks approved messages as read or unread by setting or clearing Seen; requires an approved preview token and changes only the Seen state.
Instructions
Mark the approved messages read or unread by setting or clearing Seen; only call after the user explicitly approved the preview.
Use it only with a mark_read (state="read") or mark_unread (state="unread") token from preview_action that the user approved, or the continuation_token of that approval; the wrong state refuses before the form. Unless the operator turned it off, the user then confirms the exact change in the client's form. Only Seen changes. limit caps the messages this call processes.
Returns 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, which restores each message's prior state. Any untouched remainder gets a continuation, redeemed with the same state; 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. | |
| state | Yes | read redeems a mark_read preview and unread a mark_unread preview. The other value refuses without consuming 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. | |
| 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 | |||