v51

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-01121113461.4 KB
flags

Change a specific flag (unread, starred, trashed, archived, spam) for multiple messages or all messages within multiple threads. Uses request body.

post/api/v1.0/flag/

Request body

flag'unread' | 'starred' | 'trashed' | 'archived' | 'spam' required
  • unread - unread
  • starred - starred
  • trashed - trashed
  • archived - archived
  • spam - spam
valueboolean required
message_idsstring[]

List of message UUIDs to apply the flag change to.

thread_idsstring[]

List of thread UUIDs where all messages should have the flag change applied.

mailbox_idstring uuid

Mailbox UUID. Required when flag is 'unread' or 'starred'.

read_atstring date-time nullable

Timestamp up to which messages are considered read. When provided with flag='unread', sets ThreadAccess.read_at directly. null means nothing has been read (all messages unread).

starred_atstring date-time nullable

Timestamp when the thread was starred. When provided with flag='starred' and value=true, sets ThreadAccess.starred_at. null or value=false removes the starred flag.

Response

object required

Unspecified response body