Skip to main content
PATCH
Update Thread Labels
Adds or removes labels on a whole thread and returns thread_id with the resulting labels. Applies to every message in the thread at once; the per-message twin is patch_agentmail_inbox_message. Writes to the shared AgentMail workspace: Every AIsa caller shares one AgentMail account, so this reaches inboxes other callers created, and what you write here is visible and editable by the next caller.

Example

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer authentication

Path Parameters

inbox_id
string
required

The ID of the inbox.

thread_id
string
required

ID of thread.

Body

application/json
add_labels
string[]

Labels to add to thread. Cannot be system labels.

remove_labels
string[]

Labels to remove from thread. Cannot be system labels. Takes priority over add_labels (in the event of duplicate labels passed in).

Response

Response with status 200

thread_id
string
required

ID of thread.

labels
string[]
required

Labels of thread.