Update a mailbox thread
Updates the fields you name and keeps the rest. Request: PATCH /v1/mailboxes/{id}/threads/{threadId}. Scope: mailboxes:update.
Updates the fields you name and keeps the rest. folder, priority, and closed are shared with everyone on the mailbox; done, read, starred, and snoozedUntil are the caller's own. The Done list includes the caller's Done and shared closed conversations; changing done does not reopen Close. Personal mailboxes refuse closed; archive them with folder: archived. Neither Done nor Close publishes webhook or event-stream events. A new live message clears Done for all readers and reopens Close. Labels are not updated here: use POST and DELETE on /v1/mailboxes/{id}/threads/{threadId}/labels. Returns where the thread stands, not its messages: read those with GET .../threads/{threadId}.
apiKeyx-api-key<token>id*string^mbx_[0-9a-hjkmnp-tv-z]{16,24}$threadId*string^thread_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
folder?|nullpriority?|nulldone?boolean|nullclosed?boolean|nullread?boolean|nullstarred?boolean|nullsnoozedUntil?string|null|nullMailboxThreadState
application/json- response
id*MailboxThreadId^thread_[0-9a-hjkmnp-tv-z]{16,24}$folder*MailboxThreadFolder"inbox""assigned""pending""sent""archived""trash"priority*MailboxThreadPriority"low""normal""high""urgent"labels*array<>read*booleanstarred*booleansnoozedUntil*string|nulldoneAt*string|nullclosedAt*string|nullclosedBy*|nullimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.mailboxes.updateThread({
"id": "example",
"threadId": "example"
});{
"id": "string",
"folder": "inbox",
"priority": "low",
"labels": [
"string"
],
"read": true,
"starred": true,
"snoozedUntil": "string",
"doneAt": "string",
"closedAt": "string",
"closedBy": {
"kind": "user",
"id": "string",
"displayName": "string"
}
}