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

# Verify Organization Domain

> Verify a domain by looking up its DNS TXT record.

Adds the domain and its subdomains to the embed hosts. Once the organization
can take payments, Apple Pay and Google Pay work on them. DNS changes can
take a few minutes to propagate: retry on a 400. Verifying a verified domain
returns it unchanged.

**Scopes**: `organizations:write`



## OpenAPI

````yaml /openapi/2027-01.openapi.json post /v1/organizations/{id}/domains/{domain_id}/verify
openapi: 3.1.0
info:
  title: Polar API
  summary: Polar HTTP and Webhooks API
  description: >-
    Read the docs at https://polar.sh/docs/api-reference. See
    https://polar.sh/docs/api-reference/versioning for the API versioning and
    deprecation policy.
  version: 2027-01
servers:
  - url: https://api.polar.sh
    description: Production environment
    x-polar-environment: production
  - url: https://sandbox-api.polar.sh
    description: Sandbox environment
    x-polar-environment: sandbox
security: []
tags:
  - name: public
    description: >-
      Endpoints shown and documented in the Polar API documentation and
      available in our SDKs.
  - name: private
    description: >-
      Endpoints that should appear in the schema only in development to generate
      our internal JS SDK.
  - name: mcp
    description: Endpoints supported by Polar's MCP server.
  - name: cli
    description: Endpoints exposed as commands by Polar's CLI.
externalDocs:
  description: API versioning and deprecation policy
  url: https://polar.sh/docs/api-reference/versioning
paths:
  /v1/organizations/{id}/domains/{domain_id}/verify:
    post:
      tags:
        - organization_domains
        - public
        - mcp
        - cli
      summary: Verify Organization Domain
      description: >-
        Verify a domain by looking up its DNS TXT record.


        Adds the domain and its subdomains to the embed hosts. Once the
        organization

        can take payments, Apple Pay and Google Pay work on them. DNS changes
        can

        take a few minutes to propagate: retry on a 400. Verifying a verified
        domain

        returns it unchanged.


        **Scopes**: `organizations:write`
      operationId: organization_domains:verify
      parameters:
        - name: domain_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Domain Id
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            examples:
              - 1dbfc517-0bbf-4301-9ba8-555ca42b9737
            description: The organization ID.
            title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationDomain'
        '400':
          description: The DNS TXT record was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationDomainVerificationFailed'
        '403':
          description: You don't have the permission to manage the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotPermitted'
        '404':
          description: Organization or domain not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '409':
          description: Another organization already verified the domain.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationDomainVerifiedElsewhere'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - oidc:
            - organizations:write
        - pat:
            - organizations:write
        - oat:
            - organizations:write
      x-codeSamples:
        - lang: python
          source: |
            from polar.v2027_01 import Polar

            polar = Polar("polar_oat_xxx")

            response = polar.organization_domains.verify(
                '00000000-0000-4000-8000-000000000000',
                '1dbfc517-0bbf-4301-9ba8-555ca42b9737',
            )
            print(response)
        - lang: typescript
          source: |
            import { createPolar } from "@polar-sh/sdk/2027-01";

            const polar = createPolar({
              accessToken: "polar_oat_xxx",
            });

            const response = await polar.organizationDomains.verify(
              "00000000-0000-4000-8000-000000000000",
              "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
            );
            console.log(response);
components:
  schemas:
    OrganizationDomain:
      properties:
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Creation timestamp of the object.
          examples:
            - '2026-01-01T00:00:00.000000Z'
        modified_at:
          anyOf:
            - type: string
              format: date-time
              examples:
                - '2026-01-01T00:00:00.000000Z'
            - type: 'null'
          title: Modified At
          description: Last modification timestamp of the object.
        id:
          type: string
          format: uuid4
          title: Id
          description: The ID of the object.
        domain:
          type: string
          title: Domain
          description: Domain name.
        verified_at:
          anyOf:
            - type: string
              format: date-time
              examples:
                - '2026-01-01T00:00:00.000000Z'
            - type: 'null'
          title: Verified At
          description: When Polar verified the domain. `null` while pending.
        verification_record_name:
          type: string
          title: Verification Record Name
          description: Name of the DNS TXT record that proves ownership.
        verification_record_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Verification Record Value
          description: Value of the DNS TXT record that proves ownership.
      type: object
      required:
        - created_at
        - modified_at
        - id
        - domain
        - verified_at
        - verification_record_name
        - verification_record_value
      title: OrganizationDomain
    OrganizationDomainVerificationFailed:
      properties:
        error:
          type: string
          const: OrganizationDomainVerificationFailed
          title: Error
          examples:
            - OrganizationDomainVerificationFailed
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: OrganizationDomainVerificationFailed
    NotPermitted:
      properties:
        error:
          type: string
          const: NotPermitted
          title: Error
          examples:
            - NotPermitted
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: NotPermitted
    ResourceNotFound:
      properties:
        error:
          type: string
          const: ResourceNotFound
          title: Error
          examples:
            - ResourceNotFound
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: ResourceNotFound
    OrganizationDomainVerifiedElsewhere:
      properties:
        error:
          type: string
          const: OrganizationDomainVerifiedElsewhere
          title: Error
          examples:
            - OrganizationDomainVerifiedElsewhere
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: OrganizationDomainVerifiedElsewhere
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    oidc:
      type: openIdConnect
      openIdConnectUrl: /.well-known/openid-configuration
    pat:
      type: http
      description: >-
        You can generate a **Personal Access Token** from your
        [settings](https://polar.sh/settings).
      scheme: bearer
    oat:
      type: http
      description: >-
        You can generate an **Organization Access Token** from your
        organization's settings.
      scheme: bearer

````

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