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

# Purchase mailboxes

`POST /mailboxes`

## Request

- Base URL: `https://api.mailforge.ai/public`
- URL: `https://api.mailforge.ai/public/mailboxes`
- Auth: API key in header `Authorization`

Creates one or more mailboxes. Additional slots are purchased automatically if the account's limit is reached.

## Request body

- MailforgeExternalApiDeliveryApiBuyMailboxesRequest
  - `mailboxes` ModelsCreateMailboxPayload[]
    - `email` string
    - `firstName` string
    - `forwardingEmail` string
    - `lastName` string
    - `signature` string

## Response `200`

OK

- MailforgeExternalApiDeliveryApiBuyMailboxesResponse
  - `mailboxes` MailforgeExternalApiDeliveryApiMailboxResponse[]
    - `createdAt` string
    - `credentials` ApiMailboxCredentials
      - `imapHost` string
      - `imapPassword` string
      - `imapPort` integer
      - `imapUsername` string
      - `smtpHost` string
      - `smtpPassword` string
      - `smtpPort` integer
      - `smtpUsername` string
    - `domain` string
    - `domainId` string
    - `email` string
    - `failedReason` string
    - `firstName` string
    - `forwardingEmail` string
    - `forwardingStatus` 'pending' | 'active' | 'failed'
    - `id` string
    - `isPrewarmed` boolean
    - `isTransferred` boolean
    - `lastName` string
    - `nameservers` string[]
    - `signature` string
    - `status` 'draft' | 'active' | 'pending' | 'processing' | 'failed' | 'scheduled_for_deletion' | 'deleting'
    - `updatedAt` string
    - `username` string
    - `workspaceId` string

## Other responses

- `400`: Invalid request or mailbox limit exceeded

---

[API](https://skmtc.dev/mailforge/apis/mailforge-api.md) - [All operations](https://skmtc.dev/mailforge/apis/mailforge-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mailforge/apis/mailforge-api/revisions/7d2c137f9fc3?raw)
