# Update a mailbox (/api-reference/mailboxes/updateMailbox)

## Update a mailbox

`PATCH https://app.alienmail.io/api/v1/mailboxes/{id}`

Changes a mailbox's sender name, its daily sending limit, or turns it off and on. Only what you send changes. Server settings, logins and passwords can't be changed through the API: reconnect the mailbox in Alienmail.

Requires the `SMTP_UPDATE` permission.

Authentication: `Authorization: Bearer <your API key>`

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | integer | yes | The mailbox id, from the mailbox list. |

### Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string | no | The sender name recipients see. |
| `dailyLimit` | integer | no | Most emails this mailbox sends per day, 1 to 2000. |
| `active` | boolean | no | `false` stops sending from this mailbox; `true` turns it back on. |

Example:

```json
{
  "name": "Ada from Analytical Engines",
  "dailyLimit": 50,
  "active": true
}
```

### Responses

**200**: The updated mailbox.

```json
{
  "id": 7,
  "email": "ada@analyticalengines.com",
  "name": "Ada from Analytical Engines",
  "provider": "google",
  "active": true,
  "connected": true,
  "rateLimited": false,
  "dailyLimit": 50,
  "sentToday": 12,
  "createdAt": "2026-11-13T09:30:00.000Z",
  "updatedAt": "2026-11-13T09:30:00.000Z"
}
```

**400**: The request is invalid: `fields` names the fields to fix. Code `invalid_json` when the body is not valid JSON.

**401**: The API key is missing, wrong or revoked, its creator left the workspace or was suspended, or the workspace is archived or deleted.

**403**: The API key's role lacks the permission this endpoint needs.

**404**: The campaign, lead or mailbox was not found in your workspace.

**409**: The campaign, lead or mailbox is in a state that does not allow this. `message` says why.

**415**: The body is not JSON: send it with `Content-Type: application/json`.

**429**: More than 120 requests in a minute with this key, or a workspace limit on adding and removing leads.

Errors look like `{ "error": { "code": "not_found", "message": "Campaign not found" } }`. See the Errors page.