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

# Get Domain

> Retrieve details of a single sending domain including DNS records and tracking domain configuration.

Retrieves details for a specific sending domain, including its current verification status and DNS record configuration.


## OpenAPI

````yaml GET /domains/{domain}
openapi: 3.1.0
info:
  title: Lettr API
  version: 1.0.0
  description: >-
    Lettr Email API - Send transactional emails with tracking, attachments, and
    personalization.
  contact:
    name: Lettr Support
    url: https://lettr.com
  license:
    name: Proprietary
    url: https://lettr.com/terms
servers:
  - url: https://app.lettr.com/api
    description: Production
security: []
tags:
  - name: Emails
    description: Email sending operations
  - name: Templates
    description: Email template management operations
  - name: Domains
    description: Domain management operations
  - name: Webhooks
    description: Webhook management operations
  - name: Audience
    description: 'Audience management: lists, contacts, topics, properties, and segments'
  - name: Campaigns
    description: >-
      Campaign operations: listing, stats, engagement events, and
      dispatch/scheduling
paths:
  /domains/{domain}:
    get:
      tags:
        - Domains
      summary: Get Domain
      description: >-
        Retrieve details of a single sending domain including DNS records and
        tracking domain configuration.
      operationId: showDomain
      parameters:
        - name: domain
          in: path
          required: true
          description: The domain name to retrieve
          schema:
            type: string
            example: example.com
      responses:
        '200':
          description: Domain retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShowDomainResponse'
              example:
                message: Domain retrieved successfully.
                data:
                  domain: example.com
                  status: approved
                  status_label: Approved
                  can_send: true
                  cname_status: valid
                  dkim_status: valid
                  dmarc_status: valid
                  spf_status: valid
                  is_primary_domain: false
                  tracking_domain: tracking.example.com
                  dns:
                    dkim:
                      selector: scph0123
                      public: MIGfMA0GCSqGSIb3DQEBA...
                      headers: from:to:subject:date
                  dns_provider: null
                  created_at: '2024-01-15T10:30:00+00:00'
                  updated_at: '2024-01-16T14:45:00+00:00'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Domain not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Domain not found.
                error_code: not_found
        '500':
          description: Server error - Failed to retrieve domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Failed to retrieve domain. Please try again later.
                error_code: send_error
      security:
        - bearerAuth: []
components:
  schemas:
    ShowDomainResponse:
      type: object
      description: Response containing a single domain with full details
      required:
        - message
        - data
      properties:
        message:
          type: string
          description: Human-readable response message
          example: Domain retrieved successfully.
        data:
          $ref: '#/components/schemas/DomainDetailView'
    ErrorResponse:
      type: object
      required:
        - message
        - error_code
      description: Error response for non-validation errors (400, 409, 500, 502).
      properties:
        message:
          type: string
          description: Human-readable error message
          example: The sender domain could not be determined from the email address.
        error_code:
          $ref: '#/components/schemas/ErrorCode'
    DomainDetailView:
      type: object
      description: Detailed view of a single domain
      required:
        - domain
        - status
        - status_label
        - can_send
        - created_at
        - updated_at
      properties:
        domain:
          type: string
          description: The domain name
          example: example.com
        status:
          type: string
          enum:
            - pending
            - approved
            - blocked
          description: Current status of the domain
          example: approved
        status_label:
          type: string
          description: Human-readable status label
          example: Approved
        can_send:
          type: boolean
          description: Whether the domain can be used for sending emails
          example: true
        cname_status:
          type:
            - string
            - 'null'
          description: CNAME verification status
          example: valid
        dkim_status:
          type:
            - string
            - 'null'
          description: >-
            DKIM verification status. `null` until the domain has been verified
            at least once via `POST /domains/{domain}/verify`.
          example: valid
        dmarc_status:
          type:
            - string
            - 'null'
          description: >-
            DMARC verification status. `null` until the domain has been verified
            at least once.
          enum:
            - valid
            - invalid
            - missing
            - unverified
            - null
          example: valid
        spf_status:
          type:
            - string
            - 'null'
          description: >-
            SPF verification status. `null` until the domain has been verified
            at least once.
          enum:
            - valid
            - invalid
            - missing
            - unverified
            - null
          example: valid
        is_primary_domain:
          type: boolean
          description: >-
            True when this is a root/apex sending domain (not a subdomain).
            Primary domains require SPF instead of CNAME delegation.
          example: false
        tracking_domain:
          type:
            - string
            - 'null'
          description: Associated tracking domain for click/open tracking
          example: tracking.example.com
        dns:
          type:
            - object
            - 'null'
          description: DNS records for domain verification
          properties:
            dkim:
              type: object
              description: DKIM DNS record details
              properties:
                selector:
                  type: string
                  description: DKIM selector
                  example: scph0123
                public:
                  type: string
                  description: DKIM public key
                  example: MIGfMA0GCSqGSIb3DQEBA...
                headers:
                  type: string
                  description: Headers included in DKIM signature
                  example: from:to:subject:date
        dns_provider:
          type:
            - object
            - 'null'
          description: >-
            Detected DNS provider for this domain, or `null` if detection hasn't
            run.
          required:
            - provider
            - provider_label
            - nameservers
            - error
          properties:
            provider:
              type: string
              description: Machine-readable DNS provider identifier.
              example: cloudflare
            provider_label:
              type: string
              description: Human-readable DNS provider name.
              example: Cloudflare
            nameservers:
              type: array
              description: Nameservers detected for the domain.
              items:
                type: string
              example:
                - ns1.example.com
                - ns2.example.com
            error:
              type:
                - string
                - 'null'
              description: Error message if DNS provider detection failed.
              example: null
        created_at:
          type: string
          format: date-time
          description: When the domain was created
          example: '2024-01-15T10:30:00+00:00'
        updated_at:
          type: string
          format: date-time
          description: When the domain was last updated
          example: '2024-01-16T14:45:00+00:00'
    UnauthorizedResponse:
      type: object
      required:
        - message
      description: Error response for authentication failures (401).
      properties:
        message:
          type: string
          description: Human-readable error message
          example: API key is required.
    ErrorCode:
      type: string
      description: >-
        Error codes returned by the API.


        | Code | HTTP Status | Description |

        |------|-------------|-------------|

        | `validation_error` | 422 | Request validation failed. Check the
        `errors` object for field-specific messages. |

        | `invalid_domain` | 400 | The sender domain could not be determined
        from the email address. |

        | `unconfigured_domain` | 400 | The sender domain is not configured or
        approved for sending. |

        | `send_error` | 400, 500 | General error during email send preparation
        or domain registration. |

        | `retrieval_error` | 400, 500 | Failed to retrieve resources (e.g.,
        sandbox key without associated user, upstream error). |

        | `transmission_failed` | 502 | Email transmission to the upstream
        provider failed. |

        | `resource_already_exists` | 409 | The resource (e.g., domain) already
        exists. |

        | `not_found` | 404 | The specified resource was not found. |

        | `template_not_found` | 404 | The specified template, project, or
        template version was not found. |

        | `insufficient_scope` | 403 | The API key does not have the required
        scope for this endpoint. |

        | `schedule_cancellation_failed` | 409, 500 | Could not cancel the
        scheduled transmission (already sent or upstream error). |

        | `quota_exceeded` | 429 | Monthly sending quota exceeded. Upgrade your
        plan to continue sending. |

        | `daily_quota_exceeded` | 429 | Daily sending quota exceeded. Try again
        tomorrow. |

        | `campaign_not_sendable` | 422 | The campaign cannot be sent in its
        current state (not a draft, or missing subject/sender/content). |

        | `campaign_not_scheduled` | 422 | The campaign is not scheduled, so it
        cannot be unscheduled. |
      enum:
        - validation_error
        - invalid_domain
        - unconfigured_domain
        - send_error
        - retrieval_error
        - transmission_failed
        - resource_already_exists
        - not_found
        - template_not_found
        - insufficient_scope
        - schedule_cancellation_failed
        - quota_exceeded
        - daily_quota_exceeded
        - campaign_not_sendable
        - campaign_not_scheduled
      example: invalid_domain
  responses:
    UnauthorizedError:
      description: Unauthorized - Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedResponse'
          examples:
            missing_key:
              summary: Missing API key
              value:
                message: API key is required.
            invalid_key:
              summary: Invalid API key
              value:
                message: Invalid API key.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key for authentication

````