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

# Set DNS records

> Replace a managed domain's DNS records



## OpenAPI

````yaml https://api.getcargo.io/openapi.json put /domainManagement/domains/{uuid}/dns-records
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /domainManagement/domains/{uuid}/dns-records:
    put:
      tags:
        - Domain Management - Domains
      summary: Set DNS records
      description: Replace a managed domain's DNS records
      parameters:
        - in: path
          name: uuid
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
            title: UUID
            description: Domain identifier.
          required: true
          description: Domain identifier.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                records:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - A
                          - AAAA
                          - CNAME
                          - MX
                          - TXT
                          - NS
                          - SRV
                          - CAA
                      name:
                        type: string
                      value:
                        type: string
                      ttl:
                        anyOf:
                          - type: number
                          - type: 'null'
                      priority:
                        anyOf:
                          - type: number
                          - type: 'null'
                    required:
                      - type
                      - name
                      - value
                      - ttl
                      - priority
                  title: Records
                  description: Full desired DNS record set for the domain's zone.
              required:
                - records
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: object
                    properties:
                      uuid:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      workspaceUuid:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      name:
                        type: string
                      status:
                        type: string
                        enum:
                          - pending
                          - active
                          - failed
                          - cancelled
                          - expired
                      registrar:
                        type: string
                        enum:
                          - mailpool
                      providerRef:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      dnsRecords:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - A
                                - AAAA
                                - CNAME
                                - MX
                                - TXT
                                - NS
                                - SRV
                                - CAA
                            name:
                              type: string
                            value:
                              type: string
                            ttl:
                              anyOf:
                                - type: number
                                - type: 'null'
                            priority:
                              anyOf:
                                - type: number
                                - type: 'null'
                          required:
                            - type
                            - name
                            - value
                            - ttl
                            - priority
                          additionalProperties: false
                      priceCredits:
                        anyOf:
                          - type: number
                          - type: 'null'
                      billingUsageUuid:
                        anyOf:
                          - type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          - type: 'null'
                      expiresAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                      renewalChargedUntil:
                        anyOf:
                          - type: string
                          - type: 'null'
                      autoRenew:
                        type: boolean
                      userUuid:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      deletedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                    required:
                      - uuid
                      - workspaceUuid
                      - name
                      - status
                      - registrar
                      - providerRef
                      - dnsRecords
                      - priceCredits
                      - billingUsageUuid
                      - expiresAt
                      - renewalChargedUntil
                      - autoRenew
                      - userUuid
                      - createdAt
                      - updatedAt
                      - deletedAt
                    additionalProperties: false
                    title: Domain
                    description: Domain after the DNS update.
                required:
                  - domain
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````