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

# Create mailbox

> **Plans:** `Free` · `Developer` · `Enterprise`

Provisions a mailbox. `email` and `name` are required. `workspaceId` is optional for a workspace-bound API key; when supplied, it must match that workspace. Requires workspace **admin**. Returns **201**. A successful create costs 10 **provision credits** from the API-credit balance; these are usage units, not currency. Pass `Idempotency-Key` for a repeated attempt with identical intent. Do not blind-retry: after a conflict or uncertain response, list mailboxes and resolve the exact normalized address first.

**API credits:** 10 (provision).



## OpenAPI

````yaml /openapi/openapi.json post /api/v1/mailboxes
openapi: 3.1.0
info:
  title: Mermail API
  version: 1.0.0
  description: >
    Programmatic Mermail API for scripts, agents, and integrations.


    ## Authentication


    Authorize with an API key from **Settings → API Keys**:


    ```

    x-api-key: sk-proj-…

    ```


    ## Plans


    Each endpoint page shows plan badges (**Public**, **All plans**, or
    **Developer+**). Free can call the core catalog; Developer-gated paths need
    Developer or Enterprise.


    ## Try it


    Every endpoint page includes an interactive playground. Click **Try it**,
    paste your API key into the `x-api-key` field, fill path/query/body fields
    (prefilled from examples), and send a live request to
    `https://console.mermail.app`. You can also copy the generated cURL /
    JavaScript / Python snippet.


    ## Credits


    Credits are workspace API-usage units, not currency amounts.


    | Class | Cost |

    | --- | ---: |

    | read | 1 |

    | write | 2 |

    | email_send | 5 |

    | provision | 10 |

    | ai_light | 15 |

    | ai_heavy | 25 |
  contact:
    name: Mermail
    email: contact@mermail.app
    url: https://mermail.app
servers:
  - url: https://console.mermail.app
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Public
    description: No authentication
  - name: Usage
    description: Credits and email quotas
  - name: Workspaces
    description: Workspaces, members, storage
  - name: Domains
    description: Custom email domains (Developer+)
  - name: Mailboxes
    description: Agent inboxes
  - name: Emails
    description: Send, list, search, folders
  - name: Webhooks
    description: Email event subscriptions and delivery history
  - name: AI agent
    description: Mailbox agent chat
  - name: Task triage
    description: Task triagers (all plans)
  - name: RAG
    description: Knowledge documents and recall
  - name: Integrations
    description: Composio, Telegram, push
  - name: Affiliate
    description: Affiliate program
paths:
  /api/v1/mailboxes:
    post:
      tags:
        - Mailboxes
      summary: Create mailbox
      description: >-
        **Plans:** `Free` · `Developer` · `Enterprise`


        Provisions a mailbox. `email` and `name` are required. `workspaceId` is
        optional for a workspace-bound API key; when supplied, it must match
        that workspace. Requires workspace **admin**. Returns **201**. A
        successful create costs 10 **provision credits** from the API-credit
        balance; these are usage units, not currency. Pass `Idempotency-Key` for
        a repeated attempt with identical intent. Do not blind-retry: after a
        conflict or uncertain response, list mailboxes and resolve the exact
        normalized address first.


        **API credits:** 10 (provision).
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Optional key for a repeated attempt of the same mailbox create.
            Reuse it only for identical intent. It does not guarantee
            exactly-once execution; after a conflict or uncertain response, list
            mailboxes and resolve the exact normalized address before deciding
            whether to retry. Authenticated requests carrying this header have a
            50 MiB request-fingerprint body limit; larger bodies return 413
            `idempotency_payload_too_large` before the operation runs.
          schema:
            type: string
            minLength: 1
            maxLength: 255
          example: mailbox-ensure-v1-7f3a2c1b
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - name
              properties:
                email:
                  type: string
                  format: email
                  description: Mailbox address on an allowed Mermail or custom domain
                  example: support@mail.acme.com
                name:
                  type: string
                  description: Display name (also seeds settings.fromName)
                  example: Acme Support
                workspaceId:
                  type: string
                  description: >-
                    Optional for a workspace-bound API key or MCP OAuth grant.
                    If supplied, it must match the credential workspace.
                  example: ws_01abc
                settings:
                  type: object
                  additionalProperties: true
                  properties:
                    agentInbox:
                      type: object
                      additionalProperties: true
                      description: >-
                        Optional agent-inbox purpose and automation controls.
                        Omit this object to keep standard mailbox behavior.
                      properties:
                        mode:
                          type: string
                          enum:
                            - standard
                            - verification
                          description: >-
                            Mailbox purpose. Use `verification` only for a
                            verification-focused inbox.
                        automationsEnabled:
                          type: boolean
                          description: >-
                            Whether automatic agent workflows can run for this
                            mailbox. Set to false for a verification-only inbox.
                        requireCleanScanForAutomation:
                          type: boolean
                          description: >-
                            When true, a skipped or unavailable scan suppresses
                            model-backed inbound classification and automation
                            without rejecting delivery. Verification mode
                            enables this behavior implicitly.
                  description: >-
                    Optional mailbox settings merged over defaults. For a
                    verification-only inbox, set `agentInbox` to `{ "mode":
                    "verification", "automationsEnabled": false }`.
            example:
              email: ops@mail.acme.com
              name: Acme Ops
              workspaceId: ws_01abc
              settings:
                agentInbox:
                  mode: verification
                  automationsEnabled: false
      responses:
        '201':
          description: Mailbox created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mailbox'
              example:
                id: support@mail.acme.com
                public_id: aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee
                workspace_id: ws_01abc
                email: ops@mail.acme.com
                name: Acme Ops
                email_domain_id: ed_01xyz
                inbound_provider: custom
                outbound_provider: custom
                provider_metadata:
                  domain: mail.acme.com
                bucket_id: bkt_01xyz
                settings:
                  forwarding:
                    enabled: false
                    email: ''
                  signature:
                    enabled: false
                    text: ''
                  autoReply:
                    enabled: false
                    subject: ''
                    message: ''
                  agentAutoResponse:
                    requireApproval: true
                  fromName: Acme Support
                disabled_at: null
                disabled_reason: null
                can_receive: true
                receiving_status: ready
                welcome_onboarding_status: pending
        '400':
          description: >-
            Validation error, or no workspace can be resolved from the
            credential or body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid request
        '401':
          description: Missing, invalid, expired, or revoked API key / token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Unauthorized
        '402':
          description: API credits exhausted for this workspace period
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid request
        '403':
          description: Forbidden — plan gate, wrong workspace, or missing role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Forbidden
        '413':
          description: >-
            Authenticated idempotency request body exceeds the 50 MiB
            fingerprint limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: idempotency_payload_too_large
                code: idempotency_payload_too_large
        '429':
          description: Rate limit exceeded (workspace RPM or email send limits)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Too many requests
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds until the rate limit window resets
      security:
        - apiKeyAuth: []
components:
  schemas:
    Mailbox:
      type: object
      properties:
        id:
          type: string
          description: Hosted alias primary key (also accepted as mailboxId)
        public_id:
          type: string
          format: uuid
          description: Stable public route id; preferred mailboxId for agents and clients
        workspace_id:
          type: string
        email:
          type: string
          format: email
        name:
          type: string
        email_domain_id:
          type:
            - string
            - 'null'
        inbound_provider:
          type: string
          description: Opaque Email-module identifier for the inbound path
        outbound_provider:
          type: string
          description: Opaque Email-module identifier for the outbound path
        provider_metadata:
          type: object
          additionalProperties: true
        bucket_id:
          type:
            - string
            - 'null'
        settings:
          type: object
          additionalProperties: true
          properties:
            agentInbox:
              type: object
              additionalProperties: true
              description: >-
                Optional agent-inbox purpose and automation controls. Omit this
                object to keep standard mailbox behavior.
              properties:
                mode:
                  type: string
                  enum:
                    - standard
                    - verification
                  description: >-
                    Mailbox purpose. Use `verification` only for a
                    verification-focused inbox.
                automationsEnabled:
                  type: boolean
                  description: >-
                    Whether automatic agent workflows can run for this mailbox.
                    Set to false for a verification-only inbox.
                requireCleanScanForAutomation:
                  type: boolean
                  description: >-
                    When true, a skipped or unavailable scan suppresses
                    model-backed inbound classification and automation without
                    rejecting delivery. Verification mode enables this behavior
                    implicitly.
        disabled_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Non-null when the mailbox is disabled and should not be reused
        disabled_reason:
          type:
            - string
            - 'null'
          description: Reason the mailbox was disabled, when present
        can_receive:
          type: boolean
          description: >-
            Current receiving-readiness boolean derived from mailbox lifecycle,
            inbound-provider state, and the current Receiving MX verification
            state for custom domains
        receiving_status:
          type: string
          enum:
            - ready
            - disabled
            - unavailable
          description: >-
            Current normalized inbound readiness. Custom-domain mailboxes become
            unavailable when their Receiving MX verification is not ready.
        welcome_onboarding_status:
          type: string
          description: >-
            Internal welcome/demo-message workflow status. This is not inbound
            receiving readiness.
        inbox_unread_by_category:
          type: object
          description: Present on list endpoints only
          properties:
            customer_support:
              type: integer
            partnership:
              type: integer
            technical:
              type: integer
            other:
              type: integer
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Unauthorized
        code:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key (`sk-proj-…`) from Settings → API Keys. Required for sold API
        calls outside the Mermail console.

````

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