# Create Inbox

`POST https://api.inboxjot.com/v1/inboxes`

Creates an inbox that receives mail at an address on a receiving domain or on the shared address. Needs the Starter plan or higher. Needs a Full key. A key limited to one domain answers 403. Send an optional `Idempotency-Key` header to retry safely. See Idempotency.

Set `destination` to `forward` and `forward_to` to an address to send each message on to it. Inboxjot emails that address a confirmation link, and `forward_status` stays `pending` until someone there clicks it. Mail that arrives before then waits with the status `waiting` and goes out once the link is clicked. Each forward is a new email from the inbox address and counts as one sent email. Spam and viruses are held, not forwarded.

## Body Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The inbox name, 1 to 100 characters. |
| `local_part` | string | Yes | The part before the @, or `*` to catch every address on the host. |
| `domain_id` | string \| null | No | A receiving domain of the workspace. Leave it out or send `null` for the shared address. |
| `destination` | string | Yes | `webhook` posts each message to `webhook_endpoint_id`. `api` only stores it. `forward` sends it on to `forward_to`. |
| `webhook_endpoint_id` | string \| null | No | The webhook for a `webhook` inbox. |
| `forward_to` | string \| null | No | The address a `forward` inbox sends mail to. Inboxjot emails it a link, and mail waits until someone there confirms. |

## Response

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | No | The inbox id. |
| `name` | string | No | The inbox name. |
| `local_part` | string | No | The part before the @, or `*` for every address on the host. |
| `domain_id` | string \| null | No | The receiving domain, or `null` for the shared address. |
| `address` | string | No | The full address, such as `support@inbound.acme.dev`. |
| `host` | string | No | The host after the @. |
| `destination` | string | No | `webhook` posts each message to one webhook. `api` only stores it. `forward` sends it on to `forward_to`. |
| `webhook_endpoint` | object \| null | No | The webhook for `webhook` inboxes. |
| `webhook_endpoint.id` | string | No | The webhook id. |
| `webhook_endpoint.name` | string \| null | No | The webhook name, or `null` when the token cannot read webhooks. |
| `webhook_endpoint.url` | string \| null | No | The URL it posts to, or `null` when the token cannot read webhooks. |
| `forward_to` | string \| null | No | The address a `forward` inbox sends mail to, or `null`. |
| `forward_status` | string \| null | No | `pending` until someone at `forward_to` clicks the confirmation link, then `confirmed`. `null` for other inboxes. |
| `status` | string | No | `receiving`, `paused` while new mail waits in the inbox, or `pending` while a forward waits for confirmation. |
| `paused_at` | string \| null | No | When receiving was paused, or `null`. |
| `paused_by` | object \| null | No | The member who paused it. `null` when an API key paused it or it is not paused. |
| `paused_by.id` | string | No | The user id. |
| `paused_by.name` | string | No | The user name. |
| `stats` | object | No | Counts over the last 30 days. |
| `stats.received` | integer | No | Messages received in the last 30 days. |
| `stats.failed` | integer | No | Messages whose webhook failed. |
| `stats.held` | integer | No | Messages held as spam or a virus. |
| `stats.last_message_at` | string \| null | No | When the last message arrived. |
| `stats.received_last_day` | integer | No | Messages received in the last 24 hours. |
| `stats.delivered_last_day` | integer | No | Messages from the last 24 hours that reached the app. |
| `stats.spam_last_day` | integer | No | Messages from the last 24 hours held as spam. |
| `stats.avg_delivery_ms` | integer \| null | No | The mean time from receipt to delivery over the last 24 hours, in milliseconds. `null` when no message was delivered. |
| `created_at` | string | No | When it was created. |
| `updated_at` | string | No | When it last changed. |

## Request

cURL:

```bash
curl -X POST https://api.inboxjot.com/v1/inboxes \
  -H "Authorization: Bearer $INBOXJOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support",
    "local_part": "support",
    "domain_id": "dom_06d2mfk8r1xq7v3hn5kd2",
    "destination": "webhook",
    "webhook_endpoint_id": "whk_06d2mfk8r2bc5yn1qz8gh"
  }'
```

## Responses

| Status | Description |
| --- | --- |
| 201 | Created the inbox. |
| 400 | A field is invalid, the domain does not receive mail, or the webhook is not in this workspace. |
| 401 | The API key is missing, revoked or expired. |
| 403 | The workspace is on the Hobby plan, or the key is a Sending key. |
| 409 | Another inbox already uses this address. |
| 413 | The body is larger than 2 MB. |
| 415 | The Content-Type header is not application/json. |
| 422 | The Idempotency-Key was already used with a different request. |
| 429 | Too many requests for this key. Wait for the seconds in the Retry-After header. |
| 500 | Something failed on our side. Retry later. |

201:

```json
{
  "id": "inb_06d2mfk8r6pn2tc8yw3hd",
  "name": "Support",
  "local_part": "support",
  "domain_id": "dom_06d2mfk8r1xq7v3hn5kd2",
  "address": "support@inbound.acme.dev",
  "host": "inbound.acme.dev",
  "destination": "webhook",
  "webhook_endpoint": {
    "id": "whk_06d2mfk8r2bc5yn1qz8gh",
    "name": "Helpdesk",
    "url": "https://acme.dev/hooks/mail"
  },
  "forward_to": null,
  "forward_status": null,
  "status": "receiving",
  "paused_at": null,
  "paused_by": null,
  "stats": {
    "received": 0,
    "failed": 0,
    "held": 0,
    "last_message_at": null,
    "received_last_day": 0,
    "delivered_last_day": 0,
    "spam_last_day": 0,
    "avg_delivery_ms": null
  },
  "created_at": "2026-11-02T10:12:00.000Z",
  "updated_at": "2026-11-02T10:12:00.000Z"
}
```

400:

```json
{
  "name": "validation_error",
  "status": 400,
  "message": "The request body is not valid JSON",
  "errors": [
    {
      "message": "The request body is not valid JSON",
      "location": "body"
    }
  ],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

401:

```json
{
  "name": "unauthorized",
  "status": 401,
  "message": "Unauthorized",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

403:

```json
{
  "name": "forbidden",
  "status": 403,
  "message": "This key cannot be used from 203.0.113.7",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

409:

```json
{
  "name": "concurrent_idempotent_requests",
  "status": 409,
  "message": "A request with this idempotency key is still in progress. Try again later.",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

413:

```json
{
  "name": "payload_too_large",
  "status": 413,
  "message": "The request body is too large",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

415:

```json
{
  "name": "unsupported_media_type",
  "status": 415,
  "message": "The Content-Type must be application/json",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

422:

```json
{
  "name": "invalid_idempotent_request",
  "status": 422,
  "message": "This idempotency key was already used with a different request",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

429:

```json
{
  "name": "rate_limit_exceeded",
  "status": 429,
  "message": "Too many attempts. Try again later.",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```

500:

```json
{
  "name": "unknown_error",
  "status": 500,
  "message": "Something went wrong. Please try again later.",
  "errors": [],
  "request_id": "5f0c6a2e-8d1b-4c7a-9e3f-2b6d4a1c8e90"
}
```
