---
title: "Create Mailbox"
method: POST
path: "/mailboxes"
tags: ["Mailboxes"]
---

# Create Mailbox

`POST /mailboxes`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/mailboxes`
- Auth: HTTP bearer

Connect an existing mailbox over IMAP/SMTP.

Credentials are write-only — they are stored encrypted and never returned by
this or any other endpoint. Google/Microsoft mailboxes need the browser OAuth
flow and cannot be connected here.

Routes to the same ``CreateMailboxHandler`` the in-app "add mailbox" screen
uses, so validation and provider detection behave identically.

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- MailboxCreateRequest: Connect an existing mailbox over IMAP/SMTP. Google/Microsoft mailboxes are not connectable through this endpoint: OAuth needs a browser redirect that an API call cannot complete on its own. Connect those in the app for now.
  - `email` string, required: The mailbox address, e.g. sales@acme.com
  - `smtp_address` string, required: SMTP host, e.g. smtp.acme.com
  - `smtp_username` string, required
  - `smtp_password` string, required: Write-only. Never returned by any endpoint.
  - `imap_address` string, required: IMAP host, e.g. imap.acme.com
  - `imap_username` string, required
  - `imap_password` string, required: Write-only. Never returned by any endpoint.
  - `display_name` string, nullable
  - `smtp_port` integer
  - `imap_port` integer
  - `authentication` string
  - `enable_starttls_auto` boolean
  - `daily_limit` integer: Max sends per day for this mailbox
  - `signature_html` string, nullable
  - `signature_plain` string, nullable
  - `use_html_signature` boolean

## Response `201`

Successful Response

- ApiResponseMailboxResponse
  - `data` MailboxResponse, required: A sending mailbox. Credentials are never returned.
    - `id` integer, required
    - `email` string, nullable
    - `display_name` string, nullable
    - `connection_status` string, nullable: active | paused | disconnected | expired | ...
    - `provider` string, nullable
    - `daily_limit` integer, nullable
    - `allows_nurture` boolean, nullable
    - `warmup_enabled` boolean, nullable
    - `is_archived` boolean, nullable
    - `created_by` string, nullable
    - `created_at` string, nullable
    - `updated_at` string, nullable
  - `pagination` PaginationMeta
    - `page` integer, required: Current page number (1-indexed)
    - `limit` integer, required: Items per page
    - `total` integer, required: Total number of items
    - `has_next` boolean, required: Whether there are more pages
    - `next_cursor` string, nullable: Opaque cursor for the next page; null when there are no more items. Pass it back as the `cursor` query param to fetch the following page without computing page numbers.
    - `total_available` integer, nullable: Search endpoints only: how many records really match, when known. Can be larger than `total`, which is capped at the 10,000 results that can be paged. For company search this is a distinct-company estimate. Null when unknown; absent outside search.
    - `total_is_lower_bound` boolean, nullable: Search endpoints only: true when more records match than `total` shows (the result set is larger than the 10,000 results that can be paged). Absent outside search.
    - `notes` string[], nullable: Search endpoints only: plain-language notes about the result, e.g. that more records match than can be paged, or that a reversed `between` range was put in order.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
