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

# Toggle domain privacy protection

> Enable or disable WHOIS privacy protection for a domain. May require contact verification via email.



## OpenAPI

````yaml PUT /registrar/v1/domains/{domain_name}/privacy
openapi: 3.0.0
info:
  title: Atom Registrar API
  version: 1.0.0
  description: >-
    REST API for domain registration, DNS management, and domain operations.
    Authentication via Bearer token in Authorization header.
servers:
  - url: https://www.atom.com/api
    description: Production server
  - url: https://dev.atom.com/api
    description: Development server
security:
  - BearerAuth: []
paths:
  /registrar/v1/domains/{domain_name}/privacy:
    put:
      summary: Toggle domain privacy protection
      description: >-
        Enable or disable WHOIS privacy protection for a domain. May require
        contact verification via email.
      parameters:
        - name: domain_name
          in: path
          description: Domain name (e.g., 'example.com')
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrivacyUpdateRequest'
      responses:
        '200':
          description: Privacy protection updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivacyResponse'
        '202':
          description: Privacy protection update accepted, verification required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivacyVerificationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    PrivacyUpdateRequest:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          example: true
          description: Enable or disable WHOIS privacy protection
    PrivacyResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Privacy protection updated successfully
        data:
          type: object
          properties:
            domain_name:
              type: string
              example: example.com
            privacy_protect:
              type: boolean
              example: true
    PrivacyVerificationResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: >-
            Please verify your contact info via email to complete privacy
            protection update
        data:
          type: object
          properties:
            domain_name:
              type: string
              example: example.com
            privacy_protect:
              type: boolean
            verification_required:
              type: boolean
              example: true
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: Invalid input provided
  responses:
    BadRequest:
      description: Bad request - invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnauthorizedError:
      description: Authentication failed - invalid or revoked API token
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: string
                example: Unauthorized
              message:
                type: string
                example: >-
                  Invalid registrar API token or access has been revoked. Please
                  request registrar API access from your dashboard.
    Forbidden:
      description: Forbidden - operation not allowed for this domain
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Registrar API Bearer token. Obtain from dashboard at
        /dashboard/seller/api-access after requesting Registrar API access.

````