---
title: "Create a mailbox label"
method: POST
path: "/v1/mailboxes/{id}/labels"
tags: ["Mailboxes"]
---

# Create a mailbox label

`POST /v1/mailboxes/{id}/labels`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/mailboxes/{id}/labels`
- Auth: API key in header `x-api-key`

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.

## Path parameters

- `id` string, required

## Request body

- CreateMailboxLabelPayload
  - `slug` string, required
  - `displayName` string, required
  - `color` 'billing' | 'domain' | 'agent' | 'routing' | 'important' | 'neutral', nullable

## Response `201`

Success

- MailboxLabel
  - `id` string, required
  - `slug` string, required
  - `displayName` string, required
  - `color` 'billing' | 'domain' | 'agent' | 'routing' | 'important' | 'neutral', nullable, required
  - `createdAt` string, required
  - `updatedAt` string, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `409`: ConflictError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

[API](https://skmtc.dev/samva/apis/samva-api.md) · [All operations](https://skmtc.dev/samva/apis/samva-api/llms.txt) · [OpenAPI document](https://skmtc.dev/samva/apis/samva-api/revisions/a99408542cc3?raw)
