---
title: "Update an existing DNS record"
method: PATCH
path: "/v1/domains/records/{recordId}"
tags: ["dns"]
---

# Update an existing DNS record

`PATCH /v1/domains/records/{recordId}`

## Request

- Base URL: `https://api.vercel.com`
- URL: `https://api.vercel.com/v1/domains/records/{recordId}`
- Auth: HTTP bearer

Updates an existing DNS record for a domain name.

## Path parameters

- `recordId` string, required: The id of the DNS record

## Query parameters

- `teamId` string
- `slug` string

## Request body

- object
  - `name` string, nullable: The name of the DNS record
  - `value` string, nullable: The value of the DNS record
  - `type` 'A' | 'AAAA' | 'ALIAS' | 'CAA' | 'CNAME' | 'HTTPS' | 'MX' | 'SRV' | 'TXT' | 'NS' | 'null', nullable: The type of the DNS record
  - `ttl` integer, nullable: The Time to live (TTL) value of the DNS record
  - `mxPriority` integer, nullable: The MX priority value of the DNS record
  - `srv` object, nullable
    - `target` string, nullable, required
    - `weight` integer, nullable, required
    - `port` integer, nullable, required
    - `priority` integer, nullable, required
  - `https` object, nullable
    - `priority` integer, nullable, required
    - `target` string, nullable, required
    - `params` string, nullable
  - `comment` string: A comment to add context on what this DNS record is for

## Response `200`

- object
  - `comment` string
  - `createdAt` number, nullable
  - `creator` string, required
  - `domain` string, required
  - `id` string, required
  - `name` string, required
  - `recordType` 'A' | 'AAAA' | 'ALIAS' | 'CAA' | 'CNAME' | 'HTTPS' | 'MX' | 'NS' | 'SRV' | 'TXT', required
  - `ttl` number
  - `type` 'record' | 'record-sys', required
  - `value` string, required

## Other responses

- `400`: One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.
- `401`: The request is not authorized.
- `402`: The account is missing a payment so payment method must be updated
- `403`: You do not have permission to access this resource.
- `404`
- `409`
- `410`

## Changes

- **2026-07-21** `2ae10ee9d21c`: 1 info
  - added the non-success response with the status `410`
- **2026-06-11** `14b4658f819e`: 1 info
  - added the new `undefined` enum value to the request property `type`
- **2026-01-22** `c12186034433`: 1 breaking
  - request body became required
- **2025-10-09** `50caddad4ae7`: 1 warning
  - removed the request property `additionalProperties`
- **2025-03-19** `37b482c58c92`: 1 warning, 5 info
  - added the new `HTTPS` enum value to the `recordType` response property for the response status `200`
  - added the new optional `query` request parameter `slug`
  - added the new optional request property `comment`
  - added the new optional request property `https`
  - …2 more

[Operation history](https://skmtc.dev/vercel/apis/vercel-api/changes/v1/domains/records/:recordId/patch.md)

---

[API](https://skmtc.dev/vercel/apis/vercel-api.md) - [All operations](https://skmtc.dev/vercel/apis/vercel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/vercel-api/revisions/60686c0e1f6a?raw)
