Update an existing DNS record
PATCH
https://api.vercel.com/v1/domains/records/{recordId}Updates an existing DNS record for a domain name.
https://api.vercel.com/v1/domains/records/{recordId}
const response = await fetch('https://api.vercel.com/v1/domains/records/recordId?teamId=string&slug=string', { method: 'PATCH', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "name": "example-1", "value": "google.com", "type": "A", "ttl": "60", "mxPriority": "123", "srv": { "target": "example2.com.", "weight": "123", "port": "123", "priority": "123" }, "https": { "priority": "123", "target": "example2.com.", "params": "string" }, "comment": "used to verify ownership of domain" }),});
const data = await response.json();console.log(data);Response
{ "id": "icfg_1234567890", "name": "Example Name", "type": "record", "value": "string", "creator": "string", "domain": "string", "ttl": "123", "comment": "string", "recordType": "A", "createdAt": "123"}AuthorizationbearerToken
Default authentication mechanism
application/json
400One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.
401The request is not authorized.
402The account is missing a payment so payment method must be updated
403You do not have permission to access this resource.
404Error
409Error
410Error