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

# Create Inbox

> POST /v1/email/inboxes — Create a new email inbox on your company's domain.

<ParamField body="local_part" type="string" required>
  The part before the @ sign. Allowed characters: letters, numbers, dots, hyphens. Minimum 2 characters.
  Examples: `support`, `hello`, `sales-team`, `agent.notifications`
</ParamField>

<ParamField body="domain_id" type="string">
  UUID of a specific domain to create the inbox on. If omitted, the company's first active domain is used.
</ParamField>

<RequestExample>
  ```bash theme={"theme":"css-variables"}
  curl -X POST https://api.usenaive.ai/v1/email/inboxes \
    -H "Authorization: Bearer nv_sk_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "local_part": "support"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={"theme":"css-variables"}
  {
    "id": "uuid",
    "address": "support@acme-corp.ai",
    "local_part": "support",
    "domain": "acme-corp.ai",
    "status": "active",
    "created_at": "2025-01-15T10:30:00Z"
  }
  ```
</ResponseExample>

## What this does

1. Validates the `local_part` (sanitizes to lowercase, strips invalid chars)
2. Finds the target domain (provided or company's default active domain)
3. Checks that the resulting address doesn't already exist
4. Creates the inbox record
5. Returns the inbox UUID for immediate use in `POST /v1/email/send`

## Requirements

* Company must have at least one active domain
* The address must not already be taken (active)
* `local_part` minimum 2 characters after sanitization

## Error responses

| Status | Code                 | When                                                                 |
| ------ | -------------------- | -------------------------------------------------------------------- |
| 400    | `invalid_input`      | Missing `local_part`, or `local_part` too short, or no active domain |
| 404    | `resource_not_found` | Specified `domain_id` not found or not owned                         |
| 409    | `duplicate_record`   | Address already exists                                               |

## CLI

```bash theme={"theme":"css-variables"}
naive email create --local-part support
naive email create --local-part sales-team --domain-id <uuid>
```

## MCP

Tool: `naive_create_inbox`

```json theme={"theme":"css-variables"}
{
  "local_part": "support",
  "domain_id": "optional-uuid"
}
```
