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

# Retrieve Domain

> Returns details for a single domain, including its setup progress and the nameservers that must be added as NS records at your DNS provider.



## OpenAPI

````yaml /openapi-v1.yml get /api/v1/domain/
openapi: 3.1.1
info:
  title: DeliverymanAI API V1
  version: 1.0.0
  description: >-
    API documentation for version 1 of the DeliverymanAI API. These endpoints
    drive campaigns, contact lists, leads and email sequences from your own
    code.


    V1 and V2 share the same API keys, sent in the `X-Api-Key` header.
servers:
  - url: https://api.deliveryman.ai
    description: Deliveryman API Server
security: []
paths:
  /api/v1/domain/:
    get:
      tags:
        - Domains
      summary: Retrieve Domain
      description: >-
        Returns details for a single domain, including its setup progress and
        the nameservers that must be added as NS records at your DNS provider.
      operationId: domain_retrieve
      parameters:
        - in: query
          name: domain_id
          schema:
            title: Domain Id
            type: integer
          description: ID of the domain.
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDomainAPI'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleMessageResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleMessageResponse'
          description: Not Found
        '500':
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimpleMessageResponse'
          description: Not Available Yet
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: bash
          label: curl
          source: |-
            curl "https://api.deliveryman.ai/api/v1/domain/?domain_id=0" \
              -H "X-Api-Key: YOUR_API_KEY"
components:
  schemas:
    GetDomainAPI:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
          description: ID for this domain.
        workspace_id:
          type:
            - integer
            - 'null'
          readOnly: true
          description: ID of the workspace associated with this domain.
        domain:
          type: string
          readOnly: true
          description: The domain name (ex. example.com, foo.example.com).
        created_on:
          type: string
          format: date-time
          description: >-
            Datetime when the domain was created. ISO format date string in UTC
            timezone.
        deletion_started_on:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Datetime when the domain deletion process started. ISO format date
            string in UTC timezone.
        setup_complete:
          type: boolean
          description: Flag indicating whether the domain setup is complete.
        naming_strategy:
          allOf:
            - $ref: '#/components/schemas/NamingStrategyEnum'
          description: |-
            Naming strategy used for email generation during domain setup.

            * `random` - random
            * `male` - male
            * `female` - female
            * `custom` - custom
        custom_name:
          type:
            - string
            - 'null'
          description: >-
            Custom name used in domain setup when `custom` naming strategy is
            used.
          maxLength: 500
        warmup_days_remaining:
          type: integer
          description: Number of days remaining in the domain's warmup period.
          readOnly: true
        redirect_subdomains_to:
          type:
            - string
            - 'null'
          description: The URL to which subdomains are redirected, if set.
        status:
          allOf:
            - $ref: '#/components/schemas/DomainStatusEnum'
          description: >-
            Current status of the domain. `creating` while the domain is being
            set up, `warmup` once setup is done and

            the domain is warming up, `active` once warmup is complete,
            `deleting` while it's being removed, `error`

            if setup or deletion failed, and `ns_mismatch` if the domain's
            nameserver records no longer point to us.
          readOnly: true
        warmup_active_days:
          type: integer
          maximum: 2147483647
          minimum: 0
          description: Number of days the warmup process has been active.
        current_setup_stage:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          description: >-
            Setup progress: `1` once the domain is added and waiting for
            nameserver records, `4` once email accounts are generated, and `5`
            once mail server setup has started. `setup_complete` becomes true
            when setup finishes.
        domain_usable_from:
          type: string
          format: date-time
          description: >-
            Datetime from which the domain can be used to send campaigns. ISO
            format date string in UTC timezone.
        warmup_running:
          type: boolean
          description: Whether warmup is currently running for this domain.
        is_blocked:
          type: boolean
          description: Whether this domain is blocked from being used in new campaigns.
        nameservers:
          type: array
          items:
            type: string
          description: >-
            Nameservers that must be added as NS records for this domain at your
            DNS provider.
          readOnly: true
        email_account_count:
          type: integer
          description: Number of email accounts created for this domain.
          readOnly: true
      required:
        - domain
        - email_account_count
        - id
        - nameservers
        - status
        - warmup_days_remaining
        - workspace_id
    SimpleMessageResponse:
      type: object
      properties:
        message:
          type: string
          description: Human-readable description of the result or error.
      required:
        - message
    NamingStrategyEnum:
      enum:
        - random
        - male
        - female
        - custom
      type: string
    DomainStatusEnum:
      enum:
        - creating
        - error
        - warmup
        - active
        - deleting
        - ns_mismatch
      type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Your API key, sent as the value of the `X-Api-Key` header. In the
        dashboard, go to Integrations and open Deliveryman API Keys to create
        one.

````

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