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

# Create a custom domain



## OpenAPI

````yaml /openapi.json post /businesses/{id}/custom_domains
openapi: 3.0.3
info:
  title: Pocketflows API
  version: 0.0.4
servers:
  - url: https://api.pocketflows.com
    description: Production server
security:
  - HttpBasicAuth: []
paths:
  /businesses/{id}/custom_domains:
    post:
      tags:
        - Custom domains
      summary: Create a custom domain
      parameters:
        - in: path
          name: id
          schema:
            type: string
          description: The ID of the business
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  description: The domain name
              required:
                - domain
      responses:
        '200':
          description: The created `CustomDomain` object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomDomain'
components:
  schemas:
    CustomDomain:
      type: object
      properties:
        id:
          type: string
          description: The ID of the custom domain
        business:
          type: string
          description: The ID of the business
        domain:
          type: string
          description: The domain name
        dns_records:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                nullable: true
                description: The DNS record host
              type:
                type: string
                nullable: true
                description: The DNS record type
              value:
                type: string
                nullable: true
                description: The DNS record value
            required:
              - name
              - type
              - value
          nullable: true
          description: The DNS records for the domain
        created_at:
          type: string
          description: The date and time the custom domain was created
        validated:
          type: boolean
          description: Whether the domain is valid
        setup_completed_at:
          type: string
          nullable: true
          description: The date and time setup was completed
        setup_type:
          type: string
          nullable: true
          description: The type of setup (automatic or manual)
      required:
        - id
        - business
        - domain
        - dns_records
        - created_at
        - validated
        - setup_completed_at
        - setup_type
      title: The Custom Domain object
  securitySchemes:
    HttpBasicAuth:
      type: http
      scheme: basic

````