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

# Create a receiving domain

> Provisions a new receiving domain under `inbound.paubox.email`. DNS records are configured automatically.




## OpenAPI

````yaml openapi1 POST /receiving/domains
openapi: 3.0.0
info:
  title: Paubox Email API
  description: >
    Public documentation for Paubox's Transactional Email API


    ## Authentication


    **IMPORTANT**: This API uses a custom authentication format that requires
    the "Token token=" prefix.


    All requests must include the Authorization header in this exact format:

    ```

    Authorization: Token token=YOUR_API_KEY

    ```


    **Note for Code Generation Tools**: Auto-generated code from this
    specification may need to be modified to include the "Token token=" prefix,
    as most generators expect standard Bearer token format.
  version: 1.0.0
servers:
  - url: https://api.paubox.com/v1/email
    description: Paubox Email API
security:
  - PauboxToken: []
tags:
  - name: Messages
    description: Send individual or bulk transactional email
  - name: Scheduled Send
    description: Schedule, check, reschedule, and cancel future email delivery
  - name: Dynamic Templates
    description: Manage and use dynamic Handlebars templates for email content
  - name: Receiving
    description: Receive inbound email — manage domains, mailboxes, and retrieve messages
  - name: Webhooks
    description: Manage webhook endpoints for delivery and inbound event notifications
paths:
  /receiving/domains:
    post:
      tags:
        - Receiving
      summary: Create a receiving domain
      description: >
        Provisions a new receiving domain under `inbound.paubox.email`. DNS
        records are configured automatically.
      operationId: createReceivingDomain
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReceivingDomainRequest'
            examples:
              with_slug:
                summary: Create with a custom slug
                value:
                  slug: support
              auto:
                summary: Auto-generated slug
                value: {}
      responses:
        '201':
          description: Domain created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReceivingDomainResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - PauboxToken: []
components:
  schemas:
    CreateReceivingDomainRequest:
      type: object
      properties:
        slug:
          type: string
          description: >
            Custom subdomain slug. The full domain will be
            `<slug>.inbound.paubox.email`. If omitted, an auto-generated slug is
            assigned.
          example: support
    ReceivingDomainResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/ReceivingDomain'
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorResponse_errors'
    ReceivingDomain:
      type: object
      properties:
        id:
          type: integer
          example: 1
        domain:
          type: string
          example: support.inbound.paubox.email
        state:
          type: string
          enum:
            - active
            - pending
          example: active
        dns_records:
          type: array
          items:
            $ref: '#/components/schemas/DnsRecord'
    ErrorResponse_errors:
      type: object
      properties:
        code:
          type: integer
        title:
          type: string
        details:
          type: string
    DnsRecord:
      type: object
      properties:
        type:
          type: string
          example: MX
        name:
          type: string
          example: support.inbound.paubox.email
        value:
          type: string
          example: 10 mail.support.inbound.paubox.email
  securitySchemes:
    PauboxToken:
      type: http
      scheme: bearer
      description: >
        Paubox API uses Bearer token authentication in the Authorization header.


        Format: `Authorization: Bearer YOUR_API_KEY_HERE`


        Example: `Authorization: Bearer
        9e5b092b632445b8f570c62ae54f30fda1044305`


        The legacy format `Authorization: Token token=YOUR_API_KEY_HERE` is also
        supported.

````