Create a mailbox label
Creates a label on a mailbox and returns it with status 201.
POST
Creates a label on a mailbox and returns it with status 201. Slugs are unique within the mailbox, and a mailbox holds at most 100 labels; either limit conflicts.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
slug*stringdisplayName*stringLength
length <= 40color?|null|nullSuccess
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.createLabel({
"id": "example",
"slug": "example",
"displayName": "example"
});Example Response
{
"id": "string",
"slug": "string",
"displayName": "string",
"color": "billing",
"createdAt": "string",
"updatedAt": "string"
}