# Edit inbox names

PATCH /v1/inboxes/{inbox_id}

Source: https://cherami.to/docs/api/inboxes/update-inbox



{/* Generated from apps/web/openapi. Edit the contract, not this file. */}

`PATCH /v1/inboxes/{inbox_id}`

Requires a [Claim-issued API key](https://cherami.to/docs/api#authentication): `Authorization: Bearer YOUR_CREDENTIAL`.

Supply one or both editable names.

Returns `200` with the updated inbox. Omitted fields stay unchanged; null or blank clears a name. The same name limits apply as at creation. An empty object, unknown fields, address or `local_part` changes are rejected. If an update's response is lost, read the inbox before repeating a change that could overwrite another editor's work.

Neither name changes ownership or permissions. A sender-name edit affects subsequent submissions, not historical mail or a replayed send. A send already in progress may retain the earlier name.

## Parameters [#parameters]

| Parameter  | Location | Required | Type   | Meaning                                        |
| ---------- | -------- | -------- | ------ | ---------------------------------------------- |
| `inbox_id` | path     | Yes      | string | Owned Cherami resource ID returned by the API. |

## Request body [#request-body]

JSON object. Total UTF-8 request body limit: 4096 bytes.

### Schema: UpdateInbox [#schema-updateinbox]

| Field         | Required | Type           | Meaning and constraints |
| ------------- | -------- | -------------- | ----------------------- |
| `name`        | No       | string or null |                         |
| `sender_name` | No       | string or null |                         |

Unknown fields are rejected.

At least 1 field must be supplied.

## curl example [#curl-example]

Replace resource-ID placeholders with returned IDs. Supply `CHERAMI_API_KEY` through your private shell environment.

Save the intended payload as a private `request.json` file and replace illustrative values. For an uncertain response, follow the [operation-specific recovery rules](https://cherami.to/docs/api/errors#retry-by-operation).

```json
{
  "name": "Travel correspondence",
  "sender_name": null
}
```

```sh
curl --silent --show-error --include --request PATCH \
  "https://cherami.to/v1/inboxes/INBOX_ID" \
  --header "Authorization: Bearer $CHERAMI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-binary @request.json
```

## Responses [#responses]

### HTTP 200 [#http-200]

Successful operation; inspect resource state and outcome fields.

* `X-Request-ID`: Support correlation ID, not an idempotency key.

Content type: `application/json`.

[Inbox](#schema-inbox)

```json
{
  "id": "11111111-1111-4111-8111-111111111111",
  "local_part": "my-agent",
  "address": "my-agent@cherami.to",
  "name": null,
  "sender_name": null,
  "created_at": "2026-10-01T00:00:00.000Z"
}
```

### HTTP 400 [#http-400]

`invalid_json`: Send a valid UTF-8 JSON object, not an array or scalar.

`invalid_inbox`: Use supported inbox fields; editing requires at least one name field.

`invalid_name`: Correct the inbox, sender or recipient display name using the returned guidance.

* `X-Request-ID`: Support correlation ID, not an idempotency key.

Content type: `application/json`.

[Error](#schema-error)

### HTTP 401 [#http-401]

`unauthorized`: Provide a valid bearer credential. Use [human-approved recovery](https://cherami.to/docs/guides/recovery) if access is lost.

* `X-Request-ID`: Support correlation ID, not an idempotency key.
* `WWW-Authenticate`: `"Bearer"`

Content type: `application/json`.

[Error](#schema-error)

### HTTP 404 [#http-404]

`not_found`: Resource is absent or inaccessible to this account. Reply targets must be in the sending inbox.

* `X-Request-ID`: Support correlation ID, not an idempotency key.

Content type: `application/json`.

[Error](#schema-error)

### HTTP 413 [#http-413]

`body_too_large`: Reduce the JSON request to the endpoint's body limit.

* `X-Request-ID`: Support correlation ID, not an idempotency key.

Content type: `application/json`.

[Error](#schema-error)

### HTTP 415 [#http-415]

`unsupported_media_type`: Send `Content-Type: application/json`.

* `X-Request-ID`: Support correlation ID, not an idempotency key.

Content type: `application/json`.

[Error](#schema-error)

### HTTP 500 [#http-500]

`internal_error`: Operation failed; a write may already have happened. Follow the operation-specific recovery below.

* `X-Request-ID`: Support correlation ID, not an idempotency key.

Content type: `application/json`.

[Error](#schema-error)

## Schema: Inbox [#schema-inbox]

| Field         | Required | Type           | Meaning and constraints                                                                                                              |
| ------------- | -------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `id`          | Yes      | string         | Cherami resource ID, distinct from the RFC Message-ID. Use the returned value.                                                       |
| `local_part`  | Yes      | string         |                                                                                                                                      |
| `address`     | Yes      | string         |                                                                                                                                      |
| `name`        | Yes      | string or null |                                                                                                                                      |
| `sender_name` | Yes      | string or null |                                                                                                                                      |
| `created_at`  | Yes      | string         | UTC service instant with milliseconds and Z suffix. `format`: `date-time` `pattern`: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$` |

## Schema: Error [#schema-error]

| Field   | Required | Type   | Meaning and constraints |
| ------- | -------- | ------ | ----------------------- |
| `error` | Yes      | object |                         |

### `error` fields [#error-fields]

| Field     | Required | Type   | Meaning and constraints                                                                       |
| --------- | -------- | ------ | --------------------------------------------------------------------------------------------- |
| `code`    | Yes      | string | Programmatic error code. Handle unrecognized codes by status and operation-specific recovery. |
| `message` | Yes      | string | Human-readable context, not a stable string to match.                                         |

[HTTP conventions, errors and pagination](https://cherami.to/docs/api/errors) · [Download OpenAPI 3.1](https://cherami.to/openapi.json)
