PATCH
/
v1
/
domains
/
records
/
{recordId}
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await vercel.dns.updateRecord({
    recordId: "rec_2qn7pzrx89yxy34vezpd31y9",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
    requestBody: {
      name: "example-1",
      value: "google.com",
      type: "A",
      ttl: 60,
      srv: {
        target: "example2.com.",
        weight: 97604,
        port: 570172,
        priority: 199524,
      },
      https: {
        priority: 35000,
        target: "example2.com.",
      },
      comment: "used to verify ownership of domain",
    },
  });

  // Handle the result
  console.log(result);
}

run();
{
  "createdAt": 123,
  "creator": "<string>",
  "domain": "<string>",
  "id": "<string>",
  "name": "<string>",
  "recordType": "A",
  "ttl": 123,
  "type": "record",
  "value": "<string>",
  "comment": "<string>"
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

recordId
string
required

The id of the DNS record

Example:

"rec_2qn7pzrx89yxy34vezpd31y9"

Query Parameters

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Body

application/json

Response

200
application/json

The response is of type object.