Update a mailbox label
Updates the fields you name and keeps the rest. Request: PATCH /v1/mailboxes/{id}/labels/{labelId}. Scope: mailboxes:manage.
PATCH
Updates the fields you name and keeps the rest.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$labelId*stringMatch
^label_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
displayName?|nullcolor?|null|nullMailboxLabel
application/json- response
id*MailboxLabelIdMatch
^label_[0-9a-hjkmnp-tv-z]{16,24}$slug*stringdisplayName*stringcolor*|nullcreatedAt*stringupdatedAt*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.mailboxes.updateLabel({
"id": "example",
"labelId": "example"
});Example Response
{
"id": "string",
"slug": "string",
"displayName": "string",
"color": "billing",
"createdAt": "string",
"updatedAt": "string"
}