Add thread labels
Adds the given mailbox labels to the thread, keeping the labels it already has, and returns where the thread stands.
POST
Adds the given mailbox labels to the thread, keeping the labels it already has, and returns where the thread stands. Every id must be one of the mailbox's labels.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$threadId*stringMatch
^thread_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
labels*array<>Items
1 <= itemsMailboxThreadState
application/json- response
id*MailboxThreadIdMatch
^thread_[0-9a-hjkmnp-tv-z]{16,24}$folder*MailboxThreadFolderValue in
"inbox""assigned""pending""sent""archived""trash"priority*MailboxThreadPriorityValue in
"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.addThreadLabels({
"id": "example",
"threadId": "example",
"labels": [
"example"
]
});Example Response
{
"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"
}
}