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

# Create a managed mailbox



## OpenAPI

````yaml https://inbound.new/openapi.json post /api/e2/mailboxes
openapi: 3.1.0
info:
  title: Inbound Email API
  description: >+

    # Inbound API


    The Inbound API allows you to manage email infrastructure programmatically -
    domains, email addresses, webhooks, and more.


    ## Authentication


    All API requests require a Bearer token in the Authorization header:


    ```bash

    curl -H "Authorization: Bearer YOUR_API_KEY" \
      https://inbound.new/api/e2/domains
    ```


    ## Base URL


    ```

    https://inbound.new/api/e2

    ```


    ## Quick Start


    1. **Create a domain** - Register your domain with Inbound

    2. **Configure DNS** - Add the provided DNS records to your domain

    3. **Create an email address** - Set up addresses to receive emails

    4. **Create an endpoint** - Configure where emails are delivered (webhook,
    forwarding, etc.)

  version: 2.0.0
servers:
  - url: https://inbound.new
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Webhooks
    description: Webhooks sent by Inbound to your configured endpoints when events occur.
  - name: Emails
    description: >-
      Send, list, and manage emails. Supports immediate sending, scheduling,
      replies, and retry functionality.
  - name: Mail
    description: >-
      Inbox and thread views for received emails. Filter by domain, address, or
      search.
  - name: Domains
    description: >-
      Manage domains for sending and receiving emails. Domains must be verified
      via DNS before use.
  - name: Endpoints
    description: >-
      Configure where incoming emails are delivered - webhooks, email
      forwarding, or custom handlers.
  - name: Email Addresses
    description: Create and manage email addresses on your verified domains.
  - name: Attachments
    description: Download email attachments using authenticated requests.
paths:
  /api/e2/mailboxes:
    post:
      tags:
        - Mailboxes
      summary: Create a managed mailbox
      operationId: postApiE2Mailboxes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                protocols:
                  nullable: true
                  anyOf:
                    - additionalProperties: false
                      type: object
                      properties:
                        imap:
                          type: boolean
                        smtp:
                          type: boolean
                        api:
                          type: boolean
                    - type: 'null'
                allowedIps:
                  nullable: true
                  anyOf:
                    - maxItems: 100
                      type: array
                      items:
                        minLength: 1
                        maxLength: 64
                        type: string
                    - type: 'null'
                storageQuotaBytes:
                  nullable: true
                  anyOf:
                    - minimum: 1
                      maximum: 9007199254740991
                      anyOf:
                        - format: integer
                          default: 0
                          type: string
                        - minimum: 1
                          maximum: 9007199254740991
                          type: integer
                    - type: 'null'
                dailySendLimit:
                  nullable: true
                  anyOf:
                    - minimum: 0
                      maximum: 1000000
                      anyOf:
                        - format: integer
                          default: 0
                          type: string
                        - minimum: 0
                          maximum: 1000000
                          type: integer
                    - type: 'null'
                selfService:
                  nullable: true
                  anyOf:
                    - additionalProperties: false
                      type: object
                      properties:
                        filters:
                          type: boolean
                        spam:
                          type: boolean
                        password:
                          type: boolean
                        activity:
                          type: boolean
                    - type: 'null'
                name:
                  minLength: 1
                  maxLength: 255
                  type: string
                loginAddress:
                  minLength: 3
                  maxLength: 255
                  type: string
                type:
                  type: string
                  enum:
                    - mailbox
                    - smtp
                accessMode:
                  type: string
                  enum:
                    - read
                    - read_write
                sendingMode:
                  type: string
                  enum:
                    - identity
                    - scoped_domains
                sendingName:
                  nullable: true
                  anyOf:
                    - maxLength: 255
                      type: string
                    - type: 'null'
                sendingAddress:
                  nullable: true
                  anyOf:
                    - maxLength: 255
                      type: string
                    - type: 'null'
                scopes:
                  minItems: 1
                  maxItems: 100
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - domain
                          - address
                      domainId:
                        minLength: 1
                        maxLength: 255
                        type: string
                      address:
                        minLength: 3
                        maxLength: 255
                        type: string
                    required:
                      - type
                      - domainId
              required:
                - name
                - loginAddress
                - type
                - accessMode
                - sendingMode
                - sendingName
                - sendingAddress
                - scopes
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                protocols:
                  nullable: true
                  anyOf:
                    - additionalProperties: false
                      type: object
                      properties:
                        imap:
                          type: boolean
                        smtp:
                          type: boolean
                        api:
                          type: boolean
                    - type: 'null'
                allowedIps:
                  nullable: true
                  anyOf:
                    - maxItems: 100
                      type: array
                      items:
                        minLength: 1
                        maxLength: 64
                        type: string
                    - type: 'null'
                storageQuotaBytes:
                  nullable: true
                  anyOf:
                    - minimum: 1
                      maximum: 9007199254740991
                      anyOf:
                        - format: integer
                          default: 0
                          type: string
                        - minimum: 1
                          maximum: 9007199254740991
                          type: integer
                    - type: 'null'
                dailySendLimit:
                  nullable: true
                  anyOf:
                    - minimum: 0
                      maximum: 1000000
                      anyOf:
                        - format: integer
                          default: 0
                          type: string
                        - minimum: 0
                          maximum: 1000000
                          type: integer
                    - type: 'null'
                selfService:
                  nullable: true
                  anyOf:
                    - additionalProperties: false
                      type: object
                      properties:
                        filters:
                          type: boolean
                        spam:
                          type: boolean
                        password:
                          type: boolean
                        activity:
                          type: boolean
                    - type: 'null'
                name:
                  minLength: 1
                  maxLength: 255
                  type: string
                loginAddress:
                  minLength: 3
                  maxLength: 255
                  type: string
                type:
                  type: string
                  enum:
                    - mailbox
                    - smtp
                accessMode:
                  type: string
                  enum:
                    - read
                    - read_write
                sendingMode:
                  type: string
                  enum:
                    - identity
                    - scoped_domains
                sendingName:
                  nullable: true
                  anyOf:
                    - maxLength: 255
                      type: string
                    - type: 'null'
                sendingAddress:
                  nullable: true
                  anyOf:
                    - maxLength: 255
                      type: string
                    - type: 'null'
                scopes:
                  minItems: 1
                  maxItems: 100
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - domain
                          - address
                      domainId:
                        minLength: 1
                        maxLength: 255
                        type: string
                      address:
                        minLength: 3
                        maxLength: 255
                        type: string
                    required:
                      - type
                      - domainId
              required:
                - name
                - loginAddress
                - type
                - accessMode
                - sendingMode
                - sendingName
                - sendingAddress
                - scopes
          multipart/form-data:
            schema:
              type: object
              properties:
                protocols:
                  nullable: true
                  anyOf:
                    - additionalProperties: false
                      type: object
                      properties:
                        imap:
                          type: boolean
                        smtp:
                          type: boolean
                        api:
                          type: boolean
                    - type: 'null'
                allowedIps:
                  nullable: true
                  anyOf:
                    - maxItems: 100
                      type: array
                      items:
                        minLength: 1
                        maxLength: 64
                        type: string
                    - type: 'null'
                storageQuotaBytes:
                  nullable: true
                  anyOf:
                    - minimum: 1
                      maximum: 9007199254740991
                      anyOf:
                        - format: integer
                          default: 0
                          type: string
                        - minimum: 1
                          maximum: 9007199254740991
                          type: integer
                    - type: 'null'
                dailySendLimit:
                  nullable: true
                  anyOf:
                    - minimum: 0
                      maximum: 1000000
                      anyOf:
                        - format: integer
                          default: 0
                          type: string
                        - minimum: 0
                          maximum: 1000000
                          type: integer
                    - type: 'null'
                selfService:
                  nullable: true
                  anyOf:
                    - additionalProperties: false
                      type: object
                      properties:
                        filters:
                          type: boolean
                        spam:
                          type: boolean
                        password:
                          type: boolean
                        activity:
                          type: boolean
                    - type: 'null'
                name:
                  minLength: 1
                  maxLength: 255
                  type: string
                loginAddress:
                  minLength: 3
                  maxLength: 255
                  type: string
                type:
                  type: string
                  enum:
                    - mailbox
                    - smtp
                accessMode:
                  type: string
                  enum:
                    - read
                    - read_write
                sendingMode:
                  type: string
                  enum:
                    - identity
                    - scoped_domains
                sendingName:
                  nullable: true
                  anyOf:
                    - maxLength: 255
                      type: string
                    - type: 'null'
                sendingAddress:
                  nullable: true
                  anyOf:
                    - maxLength: 255
                      type: string
                    - type: 'null'
                scopes:
                  minItems: 1
                  maxItems: 100
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - domain
                          - address
                      domainId:
                        minLength: 1
                        maxLength: 255
                        type: string
                      address:
                        minLength: 3
                        maxLength: 255
                        type: string
                    required:
                      - type
                      - domainId
              required:
                - name
                - loginAddress
                - type
                - accessMode
                - sendingMode
                - sendingName
                - sendingAddress
                - scopes
      responses:
        '201':
          description: Response for status 201
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      loginAddress:
                        type: string
                      type:
                        type: string
                        enum:
                          - mailbox
                          - smtp
                      accessMode:
                        type: string
                        enum:
                          - read
                          - read_write
                      sendingMode:
                        type: string
                        enum:
                          - identity
                          - scoped_domains
                      sendingName:
                        nullable: true
                        anyOf:
                          - type: string
                          - type: 'null'
                      sendingAddress:
                        nullable: true
                        anyOf:
                          - type: string
                          - type: 'null'
                      enabled:
                        type: boolean
                      scopes:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                              enum:
                                - domain
                                - address
                            domainId:
                              type: string
                            domain:
                              type: string
                            address:
                              nullable: true
                              anyOf:
                                - type: string
                                - type: 'null'
                          required:
                            - id
                            - type
                            - domainId
                            - domain
                            - address
                      protocols:
                        type: object
                        properties:
                          imap:
                            type: boolean
                          smtp:
                            type: boolean
                          api:
                            type: boolean
                        required:
                          - imap
                          - smtp
                          - api
                      allowedIps:
                        type: array
                        items:
                          type: string
                      storageQuotaBytes:
                        nullable: true
                        anyOf:
                          - type: number
                          - type: 'null'
                      dailySendLimit:
                        nullable: true
                        anyOf:
                          - anyOf:
                              - format: integer
                                default: 0
                                type: string
                              - type: integer
                          - type: 'null'
                      selfService:
                        type: object
                        properties:
                          filters:
                            type: boolean
                          spam:
                            type: boolean
                          password:
                            type: boolean
                          activity:
                            type: boolean
                        required:
                          - filters
                          - spam
                          - password
                          - activity
                      createdAt:
                        format: date-time
                        type: string
                      updatedAt:
                        format: date-time
                        type: string
                      lastUsedAt:
                        nullable: true
                        anyOf:
                          - format: date-time
                            type: string
                          - type: 'null'
                    required:
                      - id
                      - name
                      - loginAddress
                      - type
                      - accessMode
                      - sendingMode
                      - sendingName
                      - sendingAddress
                      - enabled
                      - scopes
                      - protocols
                      - allowedIps
                      - storageQuotaBytes
                      - dailySendLimit
                      - selfService
                      - createdAt
                      - updatedAt
                      - lastUsedAt
                  password:
                    type: string
                required:
                  - data
                  - password
        '400':
          description: Response for status 400
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '409':
          description: Response for status 409
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '429':
          description: Response for status 429
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      x-codeSamples:
        - lang: typescript
          label: TypeScript
          source: |-
            import Inbound from "inboundemail";

            const inbound = new Inbound();
            const result = await inbound.mailboxes.create({
              name: "Support",
              loginAddress: "agent@example.com",
              type: "mailbox",
              accessMode: "read",
              sendingMode: "identity",
              sendingName: "Support",
              sendingAddress: "agent@example.com",
              scopes: [
                {
                  type: "domain",
                  domainId: "dom_..."
                }
              ]
            });
        - lang: curl
          label: cURL
          source: |-
            curl -X POST 'https://inbound.new/api/e2/mailboxes' \
              -H "Authorization: Bearer $INBOUND_API_KEY" \
              -H 'Content-Type: application/json' \
              -d '{
              "name": "Support",
              "loginAddress": "agent@example.com",
              "type": "mailbox",
              "accessMode": "read",
              "sendingMode": "identity",
              "sendingName": "Support",
              "sendingAddress": "agent@example.com",
              "scopes": [
                {
                  "type": "domain",
                  "domainId": "dom_..."
                }
              ]
            }'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Your Inbound API key. Include it in the Authorization header as: Bearer
        <your-api-key>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.