> ## 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.

# Add owned domain

> Register a domain your organisation controls but does not send from through OpenMail — your company's main domain, say, while your agents send from a subdomain. Once verified, recipients on it (and on any subdomain) do not count as new recipients for the cold outreach limits, so agents can write to your own staff freely. The response includes the one TXT record to publish; then call verify. Verified custom domains are covered automatically and do not need adding here. Account-wide key only.



## OpenAPI

````yaml https://api.openmail.sh/openapi.json post /v1/owned-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: owned-domains
    description: >-
      Domains your organisation controls but does not send from. Prove ownership
      with one TXT record and mail to their addresses stops counting toward the
      cold outreach limits.
  - 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: limits
    description: >-
      Sending limits: today's cold outreach caps on new recipients, per account,
      inbox, and domain, and what raises them
  - name: feedback
    description: Reporting bugs, friction, and feature requests to the OpenMail team
paths:
  /v1/owned-domains:
    post:
      tags:
        - owned-domains
      summary: Add owned domain
      description: >-
        Register a domain your organisation controls but does not send from
        through OpenMail — your company's main domain, say, while your agents
        send from a subdomain. Once verified, recipients on it (and on any
        subdomain) do not count as new recipients for the cold outreach limits,
        so agents can write to your own staff freely. The response includes the
        one TXT record to publish; then call verify. Verified custom domains are
        covered automatically and do not need adding here. Account-wide key
        only.
      operationId: createOwnedDomain
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - domain
              properties:
                domain:
                  type: string
                  minLength: 4
                  maxLength: 253
                  description: The domain to prove ownership of, e.g. `acme.com`.
      responses:
        '201':
          description: Domain added; publish the TXT record, then verify
          content:
            application/json:
              schema:
                description: Domain added; publish the TXT record, then verify
                allOf:
                  - $ref: '#/components/schemas/OwnedDomain'
        '403':
          description: >-
            The key is pod- or inbox-scoped (`forbidden`), or the account
            already has the maximum number of owned domains
            (`owned_domain_limit`)
          content:
            application/json:
              schema:
                description: >-
                  The key is pod- or inbox-scoped (`forbidden`), or the account
                  already has the maximum number of owned domains
                  (`owned_domain_limit`)
                allOf:
                  - $ref: '#/components/schemas/Error'
        '409':
          description: You already added this domain (`domain_exists`)
          content:
            application/json:
              schema:
                description: You already added this domain (`domain_exists`)
                allOf:
                  - $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Invalid domain (`invalid_domain`), one of OpenMail's own domains
            (`invalid_domain_reserved`), or a public email provider nobody can
            own (`domain_not_ownable`)
          content:
            application/json:
              schema:
                description: >-
                  Invalid domain (`invalid_domain`), one of OpenMail's own
                  domains (`invalid_domain_reserved`), or a public email
                  provider nobody can own (`domain_not_ownable`)
                allOf:
                  - $ref: '#/components/schemas/Error'
components:
  schemas:
    OwnedDomain:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          description: Owned domain ID
        domain:
          type: string
          description: >-
            The domain your organisation controls, e.g. `acme.com`. Subdomains
            are covered too.
        status:
          type: string
          enum:
            - pending
            - verified
            - failed
          description: >-
            `pending` — added, TXT record not yet seen. `verified` — recipients
            on this domain are not metered as cold outreach. `failed` — the
            record was verified before and has since disappeared; publish it
            again and call verify.
        record:
          type: object
          description: The one TXT record to publish to prove ownership.
          properties:
            type:
              type: string
              enum:
                - TXT
            host:
              type: string
              description: Record name, e.g. `_openmail-owner.acme.com`
            value:
              type: string
              description: Record value, e.g. `openmail-owner=…`
        verifiedAt:
          type: string
          format: date-time
          nullable: true
        checkedAt:
          type: string
          format: date-time
          description: When the record was last looked up, whatever the result.
          nullable: true
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      additionalProperties: true
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````

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