flag_thread
Add or remove IMAP flags like Seen, Flagged, or Deleted on an entire email thread using its Message-ID.
Instructions
Add or remove IMAP flags across all messages in a thread, identified by RFC 5322 Message-ID header. Use when you have the raw Message-ID and want to flag an entire conversation at once. Prefer apply_thread_action with action 'mark_read', 'mark_unread', 'star', or 'unstar' when you have a local threadId from get_threads. \Seen/\Flagged/\Deleted are gated the same as mark_email_read/star_email/delete_email: each requires the matching action in PROTONMAIL_ALLOWED_ACTIONS, and setting \Deleted also requires confirmed:true when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | ||
| confirmed | No | Pass true to confirm setting \\Deleted. Required when PROTONMAIL_CONFIRM_DESTRUCTIVE is enabled. | |
| messageId | Yes | RFC 5322 Message-ID. | |
| flagsToAdd | No | ||
| acrossFolders | No | ||
| flagsToRemove | No |