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

# Create inbox

> Create a new email inbox. Optionally set a sender display name.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/inboxes
openapi: 3.0.3
info:
  title: OpenMail API
  description: >-
    Email infrastructure API for AI agents. Create inboxes, send and receive
    email, and get real-time notifications via webhooks.
  version: 1.0.0
  license:
    name: Proprietary
servers:
  - url: https://api.openmail.sh
security:
  - bearerAuth: []
tags:
  - name: pods
    description: Isolated sub-accounts for your end users or tenants
  - name: inboxes
    description: Email inboxes and their webhook configuration
  - name: messages
    description: Sending and listing messages
  - name: threads
    description: Conversation threads and read status
  - name: attachments
    description: Downloading and extracting text from attachments
paths:
  /v1/inboxes:
    post:
      tags:
        - inboxes
      summary: Create inbox
      description: Create a new email inbox. Optionally set a sender display name.
      operationId: createInbox
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                mailboxName:
                  type: string
                  minLength: 3
                  maxLength: 30
                  description: 'Inbox local part (default: random)'
                displayName:
                  type: string
                  maxLength: 200
                  description: Sender display name shown in the From header
                domain:
                  type: string
                  description: >-
                    Domain for the inbox address. Defaults to your account
                    domain (e.g. `openmail.sh`). Pass a verified custom domain
                    you own to create the inbox on it (e.g.
                    `agent-mail.example.com`). The domain must already be added
                    and verified for your account; the account default never
                    switches automatically.
                webhookUrl:
                  type: string
                  minLength: 0
                  description: >-
                    URL to receive signed webhook events for this inbox (e.g.
                    inbound mail). Overrides the account-level webhook for this
                    inbox only. A signing secret is generated and returned once
                    in the response body.
                podId:
                  type: string
                  description: >-
                    Pod to create the inbox in. Accepts the pod ID or your own
                    `clientId`. Omit to place the inbox in your account's
                    default pod.
      responses:
        '201':
          description: Inbox created
          content:
            application/json:
              schema:
                description: Inbox created
                allOf:
                  - $ref: '#/components/schemas/Inbox'
        '400':
          description: >-
            Invalid mailbox name, `domain` is not verified or not available in
            the selected pod, or `podId` does not match a pod in your account
          content:
            application/json:
              schema:
                description: >-
                  Invalid mailbox name, `domain` is not verified or not
                  available in the selected pod, or `podId` does not match a pod
                  in your account
                allOf:
                  - $ref: '#/components/schemas/Error'
        '402':
          description: >-
            Pro plan: inbox creation is paused because the account's monthly
            spend limit was reached
          content:
            application/json:
              schema:
                description: >-
                  Pro plan: inbox creation is paused because the account's
                  monthly spend limit was reached
                allOf:
                  - $ref: '#/components/schemas/Error'
        '409':
          description: Address already in use
          content:
            application/json:
              schema:
                description: Address already in use
                allOf:
                  - $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Plan inbox limit reached, or `webhookUrl` failed validation
            (`invalid_webhook_url`)
          content:
            application/json:
              schema:
                description: >-
                  Plan inbox limit reached, or `webhookUrl` failed validation
                  (`invalid_webhook_url`)
                allOf:
                  - $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (100 inbox creations/day)
          content:
            application/json:
              schema:
                description: Rate limit exceeded (100 inbox creations/day)
                allOf:
                  - $ref: '#/components/schemas/Error'
components:
  schemas:
    Inbox:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          description: OpenMail inbox ID
        podId:
          type: string
          description: >-
            ID of the pod this inbox belongs to. Inboxes created without an
            explicit pod land in your account's default pod.
        address:
          type: string
          format: email
          description: Full email address
        displayName:
          type: string
          description: Sender display name
          nullable: true
        webhookUrl:
          type: string
          description: >-
            URL that receives signed webhook events for this inbox, if set.
            Overrides the account-level webhook for this inbox only.
          nullable: true
        webhookSecret:
          type: string
          description: >-
            Signing secret for this inbox's webhook. Only present in the
            response when the secret is generated or rotated (on create, on
            first setting a webhook URL, or via the rotate-secret endpoint) — it
            is never returned afterward.
          nullable: true
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      additionalProperties: true
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````