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

# Update Domain Settings

> Update registrar-level settings for a domain. Each field is optional;
only the provided fields are changed. WHOIS privacy and lock status
changes are applied at the registrar.




## OpenAPI

````yaml put /domains/{domain}/settings
openapi: 3.1.0
info:
  title: APIFiddle Sample Definition
  version: 0.0.0
  description: Example workspace
servers:
  - url: https://rdp.sh/api/v1
    description: Default production endpoint.
security: []
paths:
  /domains/{domain}/settings:
    put:
      summary: Update domain settings
      description: |
        Update registrar-level settings for a domain. Each field is optional;
        only the provided fields are changed. WHOIS privacy and lock status
        changes are applied at the registrar.
      operationId: updateDomainSettings
      parameters:
        - $ref: '#/components/parameters/domain'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                auto_renew:
                  type: boolean
                  description: Whether the domain should renew automatically before expiry.
                whois_privacy:
                  type: boolean
                  description: Toggle WHOIS privacy protection at the registrar.
                lock_status:
                  type: boolean
                  description: Toggle the registrar transfer lock for the domain.
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                title: UpdateDomainSettingsOk
                properties:
                  status:
                    type: boolean
                    examples:
                      - true
                  message:
                    type: string
                    examples:
                      - Domain settings updated
                  domain:
                    $ref: '#/components/schemas/domain'
          description: Domain settings updated successfully.
        '403':
          description: User does not own the domain, or the domain is suspended.
        '422':
          description: Validation error.
        '500':
          description: Failed to update domain settings at the registrar.
      security:
        - Authorization: []
components:
  parameters:
    domain:
      in: path
      name: domain
      schema:
        type: integer
      required: true
      description: Domain ID
  schemas:
    domain:
      type: object
      required: []
      properties:
        id:
          type: integer
          examples:
            - 1
        domain_name:
          type: string
          examples:
            - example.com
        status:
          type: string
          description: Domain lifecycle status.
          examples:
            - active
            - suspended
            - transferring
            - expired
        provider:
          type: string
          description: Registrar backing the domain.
          examples:
            - internetbs
            - netim
        auto_renew:
          type: boolean
        whois_privacy:
          type: boolean
        lock_status:
          type: boolean
          description: Whether the registrar transfer lock is enabled.
        use_rdp_nameservers:
          type: boolean
          description: Whether the domain uses RDP.sh-managed nameservers.
        nameservers:
          type: array
          items:
            type: string
          examples:
            - ns1.rdp.sh
            - ns2.rdp.rs
        registration_date:
          type: string
          nullable: true
          examples:
            - '2025-01-01T00:00:00.000000Z'
        expiry_date:
          type: string
          nullable: true
          examples:
            - '2027-01-01T00:00:00.000000Z'
        days_until_expiry:
          type: integer
          nullable: true
          examples:
            - 180
        is_expiring_soon:
          type: boolean
          description: True when the domain expires within 30 days.
        dns_records_count:
          type: integer
          examples:
            - 2
        created_at:
          type: string
          examples:
            - '2025-01-01T00:00:00.000000Z'
      description: Domain object.
  securitySchemes:
    Authorization:
      in: header
      name: Authorization
      type: apiKey

````