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

# Replace a record set



## OpenAPI

````yaml /openapi.yaml put /cloud-dns/rrsets
openapi: 3.1.0
info:
  title: Aptranet API
  version: 1.0.0
  summary: Public Cloud CDN and Cloud DNS control-plane API
  description: |
    Automate project-scoped Aptranet Cloud CDN and Cloud DNS resources.
    Every endpoint requires an active API key access key and its current secret.
  contact:
    name: Aptranet Support
    email: support@aptranet.com
  license:
    name: Proprietary
servers:
  - url: https://api.aptranet.com
    description: Production
security:
  - bearerAuth: []
    apiSecret: []
tags:
  - name: CDN distributions
    description: Create and manage Cloud CDN distributions.
  - name: CDN configuration
    description: Read and replace distribution delivery configuration.
  - name: CDN origin groups
    description: Manage primary, backup, HTTP, and object-storage origins.
  - name: CDN cache tools
    description: Purge and prefetch distribution content.
  - name: CDN analytics
    description: Read traffic, cache, geography, region, and protocol analytics.
  - name: DNS zones
    description: Manage authoritative zones and SOA settings.
  - name: DNS record sets
    description: Manage DNS record sets, routing metadata, and resource records.
  - name: DNS analytics
    description: Read zone query analytics and project DNS checks.
paths:
  /cloud-dns/rrsets:
    put:
      tags:
        - DNS record sets
      summary: Replace a record set
      operationId: updateDNSRRSet
      parameters:
        - $ref: '#/components/parameters/ZoneId'
        - $ref: '#/components/parameters/RRSetId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDNSRRSetRequest'
      responses:
        '200':
          description: Record set updated.
        '204':
          description: Record set updated.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    ZoneId:
      name: zone_id
      in: query
      required: true
      description: DNS zone identifier.
      schema:
        type: integer
        minimum: 1
    RRSetId:
      name: rrset_id
      in: query
      required: true
      description: DNS record-set identifier.
      schema:
        type: integer
        minimum: 1
  schemas:
    UpdateDNSRRSetRequest:
      type: object
      required:
        - ttl
        - resource_records
      properties:
        ttl:
          type: integer
          minimum: 0
        meta:
          $ref: '#/components/schemas/RRSetMeta'
        pickers:
          type: array
          items:
            $ref: '#/components/schemas/RRSetPicker'
        resource_records:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/DNSResourceRecord'
    RRSetMeta:
      type: object
      properties:
        failover:
          $ref: '#/components/schemas/FailoverCheck'
        geodns_link:
          type: string
      additionalProperties: true
    RRSetPicker:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - geodns
            - asn
            - country
            - continent
            - region
            - ip
            - geodistance
            - weighted_shuffle
            - default
            - first_n
        limit:
          type: integer
          minimum: 1
        strict:
          type: boolean
    DNSResourceRecord:
      type: object
      required:
        - enabled
        - content
      properties:
        id:
          type: integer
          readOnly: true
        enabled:
          type: boolean
        content:
          type: array
          minItems: 1
          items:
            type: string
        meta:
          $ref: '#/components/schemas/ResourceRecordMeta'
    Error:
      type: object
      properties:
        error_code:
          type: string
        error:
          type: string
        error_description:
          type: string
        trace_id:
          type: string
      additionalProperties: true
    FailoverCheck:
      type: object
      required:
        - protocol
        - port
        - frequency
        - timeout
      properties:
        protocol:
          type: string
          enum:
            - HTTP
            - TCP
            - UDP
            - ICMP
        port:
          type: integer
          minimum: 1
          maximum: 65535
        frequency:
          type: integer
          minimum: 1
        timeout:
          type: integer
          minimum: 1
        method:
          type: string
        command:
          type: string
        url:
          type: string
        tls:
          type: boolean
        regexp:
          type: string
        http_status_code:
          type: integer
          minimum: 100
          maximum: 599
        host:
          type: string
    ResourceRecordMeta:
      type: object
      properties:
        asn:
          type: array
          items:
            type: integer
        continents:
          type: array
          items:
            type: string
        countries:
          type: array
          items:
            type: string
        latlong:
          type: array
          prefixItems:
            - type: number
              minimum: -90
              maximum: 90
            - type: number
              minimum: -180
              maximum: 180
          minItems: 2
          maxItems: 2
        backup:
          type: boolean
        notes:
          type: string
        weight:
          type: number
          minimum: 0
        ip:
          type: array
          items:
            type: string
        default:
          type: boolean
      additionalProperties: true
  responses:
    BadRequest:
      description: The request is invalid or required context is missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The API key is disabled, the secret is wrong, or permission is
        insufficient.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The resource does not exist in the API key's project.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: The configuration document failed semantic validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Aptranet access key
      description: Access key beginning with `APTRANET_`.
    apiSecret:
      type: apiKey
      in: header
      name: Aptranet-Secret
      description: Current secret paired with the access key.

````

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