> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lupin.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Inboxes

> API-first email accounts for agents.

# Inboxes

`GET /v0/emails/inboxes` · `POST /v0/emails/inboxes` · `GET|PATCH|DELETE /v0/emails/inboxes/:inbox_id`
(project twins under `/v0/projects/:project_id/emails/inboxes…`).

## Create

```json theme={null}
{ "username": "support", "domain": "mail.example.com",
  "display_name": "Support", "client_id": "crm-1", "metadata": { "team": "care" } }
```

`username` is optional (random if omitted). `domain` must be a verified domain
you own (or a subdomain of one with subdomains enabled), else the default
domain. `client_id` makes creation idempotent.

## Update

`PATCH` accepts `display_name` and/or `metadata`. Metadata **merges**:
included keys overwrite, `null` removes one key, `null` for the whole object
clears it. Empty `{}` is rejected; at least one field is required.

```json theme={null}
{ "metadata": { "team": null, "region": "eu" } }
```

## Object

```json theme={null}
{ "inbox_id": "in_…", "project_id": "pod_…", "email": "support@mail.example.com",
  "display_name": "Support", "client_id": "crm-1", "metadata": {},
  "created_at": "…", "updated_at": "…" }
```

Deleting an inbox cascades to its threads and messages.
