---
title: "Create a mailbox"
method: POST
path: "/v1/mailboxes"
tags: ["mailboxes"]
---

# Create a mailbox

`POST /v1/mailboxes`

## Request

- Base URL: `https://botmail.pro`
- URL: `https://botmail.pro/v1/mailboxes`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `bm_session`

Scope: manage. Claimed (human) accounts only, with an unrestricted
credential. 402 plan_limit at the plan's mailbox limit; 422
invalid_name / name_reserved / short_name / invalid_domain /
invalid_display_name; 409 name_taken / name_held / name_retired.

## Request body

- object
  - `name` string, required: 1-32 chars: a-z, 0-9, '.', '-', '_'; starts and ends with a letter or digit. 4 or fewer chars need a paid plan.
  - `domain` string: A Botmail domain. Defaults to the primary domain.
  - `display_name` string

## Response `201`

Created.

- Mailbox
  - `id` string, required
  - `name` string, required
  - `display_name` string, required
  - `status` 'pending' | 'active' | 'suspended', required
  - `address` string, email, required: Primary address.
  - `addresses` string[], required: Every address, primary first (paid plans get the name on all domains).
  - `created_at` string, date-time, required

## Other responses

- `400`: Invalid request (`bad_request` or a more specific code).
- `401`: Missing or invalid credentials (`unauthorized`, `invalid_token`).
- `402`: Plan limit or payment needed (`plan_limit`, `payment_required`). Upgrade, then retry.
- `403`: The credential can't do this (`forbidden`, `csrf`, `account_inactive`, …). Missing scopes are listed in `details.required_scope`; pending keys get a hint to wait for the claim.
- `409`: Conflicts with current state.
- `422`: Well-formed but rejected; see `code` and `hint`.

---

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