# Update inbox display name or metadata

**`PATCH https://myagentmail.com/v1/inboxes/{id}`**

Group: Inboxes
Operation ID: `updateInbox`

Username, domain, and canonical identity are immutable. Use `POST /v1/inboxes/{id}/addresses` to change the outbound From.

## Path parameters

- `id` (string, required) — Inbox UUID

## Request body

Content-Type: `application/json`

```json
{
  "displayName": "string",
  "metadata": {}
}
```

## Responses

### 200 — Updated

```json
{
  "updated": false,
  "id": "00000000-0000-0000-0000-000000000000"
}
```

## Code samples

### TypeScript

```typescript
import { MyAgentMail } from "myagentmail";

const client = new MyAgentMail({ apiKey: process.env.MYAGENTMAIL_API_KEY! });

// PATCH /v1/inboxes/{id}
const result = await client.request("patch", "/v1/inboxes/{id}", { params: { id: "00000000-0000-0000-0000-000000000000" } }, { body: {
  "displayName": "string",
  "metadata": {}
} });
```

### curl

```bash
curl -X PATCH 'https://myagentmail.com/v1/inboxes/00000000-0000-0000-0000-000000000000' \
  -H 'X-API-Key: $MYAGENTMAIL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "displayName": "string",
  "metadata": {}
}'
```

### Python

```python
import os, requests

r = requests.patch(
    "https://myagentmail.com/v1/inboxes/00000000-0000-0000-0000-000000000000",
    headers={"X-API-Key": os.environ["MYAGENTMAIL_API_KEY"]},
    json={
        "displayName": "string",
        "metadata": {}
    },
)
r.raise_for_status()
print(r.json())
```
