# Update dns records

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/dns:
    put:
      summary: Update dns records
      deprecated: false
      description: >-
        This endpoints lets you update dns records for a domain.


        | Name                | Type     | Description |

        |---------------------|----------|-------------|

        | `assignedDomainId`   | `string` | The unique identifier for the domain
        to which the DNS record is assigned. |

        | `host`               | `string` | The domain or subdomain for which
        the DNS record applies. |

        | `value`              | `string` | The corresponding value of the DNS
        record, such as an IP address or another domain. |

        | `recordType`         | `string` | The type of DNS record (e.g., `A`,
        `CNAME`, `MX`, `TXT`). |

        | `dnsRecordId`              | `string` | The unique identifier for the
        DNS Record you're trying to update. |

        | `zoneId`             | `string` | The unique identifier for the DNS
        zone. |
      tags:
        - dns
      parameters:
        - name: x-auth-zapmail
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: x-workspace-key
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
        - name: ' x-service-provider'
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      host:
                        type: string
                      value:
                        type: string
                      recordType:
                        type: string
                    required:
                      - host
                      - value
                      - recordType
                    x-apidog-orders:
                      - host
                      - value
                      - recordType
                required:
                  - status
                  - message
                  - data
                x-apidog-orders:
                  - status
                  - message
                  - data
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  message:
                    type: string
                  errorId:
                    type: string
                required:
                  - status
                  - message
                  - errorId
                x-apidog-orders:
                  - status
                  - message
                  - errorId
          headers: {}
          x-apidog-name: Not registered
      security: []
      x-apidog-folder: dns
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-13629370-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
