Mailboxes

Update a mailbox label

Updates the fields you name and keeps the rest. Use this endpoint to update a mailbox label through the Samva email API.

PATCH
/v1/mailboxes/{id}/labels/{labelId}

Updates the fields you name and keeps the rest.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$
labelId*string
Match^label_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
displayName?|null
color?|null|null

Response Body

MailboxLabel

application/json
  1. response
id*MailboxLabelId
Match^label_[0-9a-hjkmnp-tv-z]{16,24}$
slug*string
displayName*string
color*|null
createdAt*string
updatedAt*string
Example Request
import { 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"}

Related documentation