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

# Update DNS Record

> Requires the `dns.write` token ability.

The record to change is identified by `name`, `type` and `content`;
`new_name`, `new_type`, `new_content` and `ttl` replace those fields.



## OpenAPI

````yaml /api-reference/openapi.json patch /domains/{domain}/dns/records
openapi: 3.1.2
info:
  title: Hosting Panel API
  version: 1.0.0
  description: >-
    The customer-facing hosting panel API. A request is scoped to the hosting
    account its bearer token belongs to; the token abilities decide which
    endpoints it may call.
servers:
  - url: https://hosting-panel.net/api/v1
security:
  - sanctum: []
tags:
  - name: Account
  - name: Domains
  - name: DNS
  - name: Email Accounts
  - name: Forwarders
  - name: Databases
  - name: FTP Accounts
  - name: Cron Jobs
  - name: URL Schedules
  - name: Node.js Applications
  - name: Valkey
  - name: Photon Optimizer
  - name: Statistics
  - name: PSI Metrics
  - name: PHP Versions
  - name: Reseller
paths:
  /domains/{domain}/dns/records:
    patch:
      tags:
        - DNS
      summary: Update DNS Record
      description: |-
        Requires the `dns.write` token ability.

        The record to change is identified by `name`, `type` and `content`;
        `new_name`, `new_type`, `new_content` and `ttl` replace those fields.
      operationId: v1.dns.update
      parameters:
        - name: domain
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                type:
                  type: string
                content:
                  type: string
                new_name:
                  type: string
                new_type:
                  type: string
                new_content:
                  type: string
                ttl:
                  type: integer
                mx_priority:
                  type: integer
                srv_priority:
                  type: integer
                srv_weight:
                  type: integer
                srv_port:
                  type: integer
              required:
                - name
                - type
                - content
      responses:
        '200':
          description: '`DnsZoneResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DnsZoneResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
components:
  schemas:
    DnsZoneResource:
      type: object
      properties:
        domain:
          type: string
        records:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              type:
                type: string
              ttl:
                type: integer
              content:
                type: string
            required:
              - name
              - type
              - ttl
              - content
      required:
        - domain
        - records
      title: DnsZoneResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
  securitySchemes:
    sanctum:
      type: http
      description: >-
        An API access token, sent as `Authorization: Bearer <token>`. Its
        abilities decide which endpoints it may call.
      scheme: bearer

````

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