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

# List custom domains

> List the custom domains on your account. A pod-scoped key sees only its pod's domains plus account-wide ones.



## OpenAPI

````yaml https://api.openmail.sh/openapi.json get /v1/domains
openapi: 3.0.3
info:
  title: OpenMail API
  description: >-
    Email infrastructure API for AI agents. Create inboxes, send and receive
    email, and get real-time notifications via webhooks.
  version: 1.0.0
  license:
    name: Proprietary
servers:
  - url: https://api.openmail.sh
security:
  - bearerAuth: []
tags:
  - name: pods
    description: Isolated sub-accounts for your end users or tenants
  - name: inboxes
    description: Email inboxes and their webhook configuration
  - name: domains
    description: >-
      Custom domains: add your own sending/receiving domain, publish DNS, and
      verify it
  - name: messages
    description: Sending and listing messages
  - name: threads
    description: Conversation threads and read status
  - name: attachments
    description: Downloading and extracting text from attachments
  - name: policy
    description: >-
      Correspondent policy — provider-enforced allow/block rules and allowlist
      mode, scoped per account, pod, or inbox. Account-wide key only.
  - name: feedback
    description: Reporting bugs, friction, and feature requests to the OpenMail team
paths:
  /v1/domains:
    get:
      tags:
        - domains
      summary: List custom domains
      description: >-
        List the custom domains on your account. A pod-scoped key sees only its
        pod's domains plus account-wide ones.
      operationId: listDomains
      parameters:
        - schema:
            type: integer
            default: 50
          in: query
          name: limit
          required: false
          description: Max results to return (clamped to 100)
        - schema:
            type: integer
            default: 0
          in: query
          name: offset
          required: false
          description: Number of results to skip
      responses:
        '200':
          description: List of custom domains
          content:
            application/json:
              schema:
                description: List of custom domains
                type: object
                additionalProperties: true
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Domain'
                  total:
                    type: integer
        '401':
          description: Missing, invalid, or expired API key
          content:
            application/json:
              schema:
                description: Missing, invalid, or expired API key
                allOf:
                  - $ref: '#/components/schemas/Error'
components:
  schemas:
    Domain:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          description: OpenMail domain ID
        domain:
          type: string
          description: >-
            The domain or subdomain, e.g. `example.com` or
            `agent-mail.example.com`.
        podId:
          type: string
          description: >-
            Pod this domain is scoped to, so only inboxes in that pod can use
            it, or null for an account-wide domain.
          nullable: true
        status:
          type: string
          enum:
            - pending
            - verifying
            - verified
            - failed
            - under_review
          description: >-
            `pending` — added, records not yet published. `verifying` — being
            checked. `verified` — sending and receiving enabled. `failed` —
            records missing or wrong; publishing them and calling verify again
            is the fix. `under_review` — flagged as suspicious; DNS setup is
            blocked until approved.
        records:
          type: array
          items:
            $ref: '#/components/schemas/DomainRecord'
          description: >-
            The DNS records to publish for this domain. Returned even where the
            values are the same for every customer, so sending infrastructure
            can change without breaking clients.
        verifiedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      additionalProperties: true
      properties:
        error:
          type: string
        message:
          type: string
    DomainRecord:
      type: object
      additionalProperties: true
      description: >-
        A single DNS record to publish for a custom domain. Publish every record
        whose `status` is not already `valid`, then the domain verifies
        automatically within a couple of minutes.
      properties:
        type:
          type: string
          enum:
            - TXT
            - CNAME
            - MX
        name:
          type: string
          description: >-
            The record's host, fully qualified, e.g.
            `_dmarc.agent-mail.example.com`.
        value:
          type: string
          description: The record value to publish.
        priority:
          type: integer
          description: MX records only.
          nullable: true
        purpose:
          type: string
          enum:
            - spf
            - dkim
            - dmarc
            - mx
            - return-path
          description: >-
            What the record is for. Act on this rather than inferring from
            record shape: SPF must be merged into any the owner already has
            rather than replacing it, a DMARC policy at an apex can override the
            owner's own, and an apex MX takes over all their inbound mail.
        status:
          type: string
          enum:
            - missing
            - invalid
            - valid
          description: >-
            Whether this individual record is published and correct as of the
            last check. `missing` — not found yet. `invalid` — found but wrong.
            `valid` — published and correct. Shows which records are still
            outstanding, not only whether the whole domain passed.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````