PATCH/inboxes/{inbox_id}/threads/{thread_id}

Update an inbox thread

Updates a thread’s read state, folder, or labels. Supply at least one of read, folder, add_label_ids, or remove_label_ids; changes apply in that order and are not atomic, so earlier changes may remain applied if a later label operation fails.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 4 body fields
inbox_idstringrequired
The UUID of the inbox containing the thread. An email address is not accepted.
thread_idstringrequired
The UUID of the thread to update.

Thread changes. Provide at least one of read, folder, add_label_ids, or remove_label_ids; changes are applied in that order and are not atomic.

readbooleanrequired
Marks every email in the thread read or unread.
folderstringoptional
Moves the thread to this folder. `sent` is assigned automatically and cannot be set.
Allowed:inboxarchivespamtrash
add_label_idsarray<string>optional
Label IDs to apply to the thread. Between 1 and 10 IDs. A label ID that does not exist in the inbox returns a 404.
remove_label_idsarray<string>optional
Label IDs to remove from the thread. Between 1 and 10 IDs. The labels themselves are kept. A label ID that does not exist in the inbox returns a 404.

1 status code
200Returns the updated thread summary, including its ID, subject, folder, labels, and read state.
objectstringrequired
The object type.
idstringrequired
The ID of the thread.
subjectstringrequired
The subject of the thread.
folderstringrequired
The folder the thread is in.
Allowed:inboxarchivespamsenttrash
labelsarray<object>required
The labels attached to the thread.
readbooleanrequired
True only when every email in the thread is read.

Error handling

The inbox_id path parameter and thread_id path parameter must be UUIDs identifying the target inbox and thread. Supply at least one of read, folder, add_label_ids, or remove_label_ids; folder must be inbox, archive, spam, or trash, and each label array must contain 1 to 10 UUIDs. Do not include the same label ID in both add_label_ids and remove_label_ids, and use label IDs that exist in the inbox.