Add or remove an approved label
labelApplies or removes a user-approved tag on selected messages after preview approval, using a single-use token and optional per-call limit; returns undo IDs and continuation state.
Instructions
Add the approved label to the approved messages, or remove it; only call after the user explicitly approved the preview.
Use it only with an add_label (op="add") or remove_label (op="remove") token from preview_action that the user approved, or the continuation_token of that approval; the wrong op refuses before the form. The token pins the label, so this takes no label argument. Unless the operator turned it off, the user then confirms the exact change in the client's form. 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. Any untouched remainder gets a continuation, redeemed with the same op; 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 |
|---|---|---|---|
| op | Yes | add redeems an add_label preview and remove a remove_label preview. The other value refuses without consuming the token. | |
| 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. | |
| 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 | |||