Skip to main content
PATCH
cURL

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Path Parameters

threadId
string
required

Conversation to relabel — every message in it is updated

Body

application/json

Add and/or remove labels across a whole conversation in one atomic write. Supply at least one of addLabels/removeLabels. Use this rather than looping over PATCH /messages/{id}/labels: a loop that fails partway leaves the thread in two folders at once.

addLabels
string[]

Labels to add to every message in the thread. Adding read removes unread and vice versa, per message, exactly as the single-message route does.

Maximum array length: 50
Required string length: 1 - 64
removeLabels
string[]

Labels to remove from every message in the thread.

Maximum array length: 50
Required string length: 1 - 64

Response

200 - application/json

OK

Result of relabelling a conversation

threadId
string
required

The conversation that was relabelled

updatedCount
integer
required

How many messages were written. Zero means the thread does not exist or is not yours — it is never a silent success.