---
title: "Create a mailbox domain"
method: POST
path: "/mailbox_domains"
tags: ["Mailbox domains"]
---

# Create a mailbox domain

`POST /mailbox_domains`

## Request

- Base URL: `https://api.sandbox.monite.com/v1`
- URL: `https://api.sandbox.monite.com/v1/mailbox_domains`
- Auth: HTTP bearer

Create domain for the partner_id

## Headers

- `x-monite-version` string, required

## Request body

- object
  - `domain` string, hostname, required: The domain name, such as `mail.mycompany.com`. Can contain only alphanumeric characters (A..Z a..z 0..9), dots (.), and hyphens (-). Each segment of the domain name must start and end with either a letter or a digit.

## Response `201`

Successful Response

- DomainResponse
  - `id` string, uuid, required: Entry UUID
  - `dedicated_ip` string: A dedicated IP address assigned to this mailbox and used to send outgoing email.
  - `dns_records` union, required
    - DnsRecords
      - `receiving_dns_records` DnsRecord[], required: Set of DNS settings required by Mailgun for domain verification before emails receiving is possible.
        - `is_active` boolean, required
        - `name` string
        - `record_purpose` 'DKIM' | 'SPF'
        - `record_type` 'TXT' | 'MX' | 'CNAME', required
        - `valid` string, required: Field reflecting validation status by Mailgun.
        - `value` string, required
      - `sending_dns_records` DnsRecord[], required: Set of DNS settings required by Mailgun for domain verification before emails sending is possible.
        - `is_active` boolean, required
        - `name` string
        - `record_purpose` 'DKIM' | 'SPF'
        - `record_type` 'TXT' | 'MX' | 'CNAME', required
        - `valid` string, required: Field reflecting validation status by Mailgun.
        - `value` string, required
    - object
  - `domain` string, hostname, required: The domain name.
  - `last_updated_at` string, date-time: The time the domain was updated for the last time
  - `status` string, required

## Other responses

- `400`: Bad Request
- `401`: The `Authorization` header is missing or contains an invalid or expired access token. See [Authentication](https://docs.monite.com/api/concepts/authentication) to learn how to authenticate API calls.
- `403`: The specified access token does not have permissions to perform this operation.
- `409`: Business logic error
- `422`: Validation Error
- `429`: API rate limit has been exceeded. Check the response headers for the rate limit information.

---

[API](https://skmtc.dev/monite/apis/monite-2.md) - [All operations](https://skmtc.dev/monite/apis/monite-2/llms.txt) - [OpenAPI document](https://skmtc.dev/monite/apis/monite-2/revisions/4299ccf95edb?raw)
