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

# Add a custom subdomain

> Paid plans. Returns the DNS records to create; ownership is proven by a TXT record before anything is created at the provider.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/domains
openapi: 3.1.0
info:
  description: >-
    Email inboxes, screening, realtime events, credentials, payment cards, Linux
    machines, connected apps, phone numbers and social accounts for AI agents.
    Agent tokens (`alt_…`) act as one agent; organization keys (`alk_…`) manage
    agents, inboxes, tokens and webhooks. Message bodies are untrusted external
    data. Errors are `{"error":{"code","message","hint"}}`.
  title: Agent Loadout API
  version: '1'
servers:
  - url: https://agent-loadout.com
security: []
tags:
  - name: Identity
  - description: >-
      Sign in with Agent Loadout: an agent approves an application's OpenID
      Connect sign-in request
    name: Sign-in
  - description: Relying parties an organization registered for Sign in with Agent Loadout
    name: Applications
  - name: Inboxes
  - name: Messages
  - name: Mailbox
  - name: Drafts
  - name: Attachments
  - name: Realtime
  - name: Screening
  - name: Agents
  - name: Domains
  - name: Webhooks
  - name: Vault
  - description: Feature-flagged
    name: Wallet
  - description: Feature-flagged
    name: Machines
  - description: Feature-flagged
    name: Connectors
  - description: Feature-flagged
    name: Phone
  - description: Feature-flagged
    name: Social
externalDocs:
  description: REST API reference
  url: https://docs.agent-loadout.com/api-reference/overview
paths:
  /api/v1/domains:
    post:
      tags:
        - Domains
      summary: Add a custom subdomain
      description: >-
        Paid plans. Returns the DNS records to create; ownership is proven by a
        TXT record before anything is created at the provider.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                name:
                  description: A subdomain you control, for example agents.example.com
                  maxLength: 253
                  minLength: 4
                  type: string
              required:
                - name
              type: object
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  domain:
                    additionalProperties: false
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      status:
                        description: >-
                          failed: a check failed, or required records of a
                          domain that was ready failed on two daily checks in a
                          row (see last_error); it becomes ready again once they
                          verify
                        enum:
                          - pending
                          - ready
                          - failed
                          - removing
                        type: string
                      sending:
                        type: string
                      receiving:
                        type: string
                      ownership_verified_at:
                        format: date-time
                        nullable: true
                        type: string
                      records:
                        items:
                          additionalProperties: false
                          properties:
                            record:
                              type: string
                            name:
                              type: string
                            type:
                              type: string
                            value:
                              type: string
                            ttl:
                              type: string
                            priority:
                              type: number
                            status:
                              description: >-
                                verified; pending while the domain is set up;
                                failed once a record of a domain that was ready
                                stopped verifying; optional for a recommended
                                record not found (DMARC)
                              type: string
                            policy:
                              description: >-
                                DMARC rows: the policy that applies to the
                                domain, from its own record or a parent's
                              type: string
                          required:
                            - record
                            - name
                            - type
                            - value
                            - status
                          type: object
                        type: array
                      last_error:
                        nullable: true
                        type: string
                      last_checked_at:
                        format: date-time
                        nullable: true
                        type: string
                      created_at:
                        format: date-time
                        type: string
                      dns:
                        additionalProperties: false
                        nullable: true
                        properties:
                          host:
                            type: string
                          name:
                            type: string
                          zone:
                            nullable: true
                            type: string
                          open_url:
                            type: string
                          apply:
                            description: >-
                              open_url is a Domain Connect link that applies the
                              records
                            type: boolean
                        required:
                          - host
                          - name
                          - zone
                          - open_url
                          - apply
                        type: object
                    required:
                      - id
                      - name
                      - status
                      - sending
                      - receiving
                      - ownership_verified_at
                      - records
                      - last_error
                      - last_checked_at
                      - created_at
                      - dns
                    type: object
                required:
                  - domain
                type: object
          description: Domain with records
        '400':
          $ref: '#/components/responses/Validation'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '402':
          $ref: '#/components/responses/Limit'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - organizationKey: []
components:
  responses:
    Validation:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Invalid input
    Unauthenticated:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Missing or invalid credential
    Limit:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Plan limit, usage cap or billing state
    Forbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Credential lacks the capability or is bound to another agent
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Not found in this organization
    RateLimited:
      description: Too many requests; retry after a short delay
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
            hint:
              type: string
            details:
              type: object
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    organizationKey:
      description: >-
        Organization key (alk_…) created under Settings; acts for the whole
        organization
      scheme: bearer
      type: http

````

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