---
title: "Update a mailbox"
method: PATCH
path: "/v1/mailboxes/{id}"
tags: ["mailboxes"]
---

# Update a mailbox

`PATCH /v1/mailboxes/{id}`

## Request

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

Scope: manage. Not for pending keys. display_name is the sender name
on outgoing mail; empty clears it (mail then shows the mailbox name).
The address can't be changed: passing name or address returns
422 address_permanent.

## Request body

- object
  - `display_name` string

## Response `200`

The updated mailbox.

- 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`).
- `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.
- `404`: Not found or not accessible with this credential.
- `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)
