Skip to content

Latest commit

 

History

History
1483 lines (1156 loc) · 113 KB

File metadata and controls

1483 lines (1156 loc) · 113 KB

DomainsRegistrar

Overview

Available Operations

getSupportedTlds

Get a list of TLDs supported by Vercel

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.getSupportedTlds({
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarGetSupportedTlds } from "@vercel/sdk/funcs/domainsRegistrarGetSupportedTlds.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarGetSupportedTlds(vercel, {
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarGetSupportedTlds failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.GetSupportedTldsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<string[]>

Errors

Error Type Status Code Content Type
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

getTld

Get the metadata for a specific TLD.

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.getTld({
    tld: "<value>",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarGetTld } from "@vercel/sdk/funcs/domainsRegistrarGetTld.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarGetTld(vercel, {
    tld: "<value>",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarGetTld failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.GetTldRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.GetTldResponseBody>

Errors

Error Type Status Code Content Type
models.TldNotSupported 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

getTldPrice

Get price data for a specific TLD. This only reflects base prices for the given TLD. Premium domains may have different prices. Use the Get price data for a domain endpoint to get the price data for a specific domain.

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.getTldPrice({
    tld: "<value>",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarGetTldPrice } from "@vercel/sdk/funcs/domainsRegistrarGetTldPrice.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarGetTldPrice(vercel, {
    tld: "<value>",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarGetTldPrice failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.GetTldPriceRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.GetTldPriceResponseBody>

Errors

Error Type Status Code Content Type
models.TldNotSupported 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

getDomainAvailability

Get availability for a specific domain. If the domain is available, it can be purchased using the Buy a domain endpoint or the Buy multiple domains endpoint.

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.getDomainAvailability({
    domain: "hungry-birdbath.info",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarGetDomainAvailability } from "@vercel/sdk/funcs/domainsRegistrarGetDomainAvailability.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarGetDomainAvailability(vercel, {
    domain: "hungry-birdbath.info",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarGetDomainAvailability failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.GetDomainAvailabilityRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.GetDomainAvailabilityResponseBody>

Errors

Error Type Status Code Content Type
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.NotFound 404 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

getDomainPrice

Get price data for a specific domain

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.getDomainPrice({
    domain: "excited-dwell.org",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarGetDomainPrice } from "@vercel/sdk/funcs/domainsRegistrarGetDomainPrice.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarGetDomainPrice(vercel, {
    domain: "excited-dwell.org",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarGetDomainPrice failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.GetDomainPriceRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.GetDomainPriceResponseBody>

Errors

Error Type Status Code Content Type
models.BadRequest 400 application/json
models.DomainTooShort 400 application/json
models.TldNotSupported 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

getBulkAvailability

Get availability for multiple domains. If the domains are available, they can be purchased using the Buy a domain endpoint or the Buy multiple domains endpoint.

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.getBulkAvailability({
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      domains: [
        "<value 1>",
      ],
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarGetBulkAvailability } from "@vercel/sdk/funcs/domainsRegistrarGetBulkAvailability.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarGetBulkAvailability(vercel, {
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      domains: [
        "<value 1>",
      ],
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarGetBulkAvailability failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.GetBulkAvailabilityRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.GetBulkAvailabilityResponseBody>

Errors

Error Type Status Code Content Type
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

getDomainAuthCode

Get the auth code for a domain. This is required to transfer a domain from Vercel to another registrar.

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.getDomainAuthCode({
    domain: "ruddy-coil.org",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarGetDomainAuthCode } from "@vercel/sdk/funcs/domainsRegistrarGetDomainAuthCode.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarGetDomainAuthCode(vercel, {
    domain: "ruddy-coil.org",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarGetDomainAuthCode failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.GetDomainAuthCodeRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.GetDomainAuthCodeResponseBody>

Errors

Error Type Status Code Content Type
models.DomainNotRegistered 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.Forbidden 403 application/json
models.DomainNotFound 404 application/json
models.DomainCannotBeTransferedOutUntil 409 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

buySingleDomain

Buy a domain

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.buySingleDomain({
    domain: "metallic-simple.com",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      autoRenew: false,
      years: 7602.67,
      expectedPrice: 7390.34,
      contactInformation: {
        firstName: "Lexie",
        lastName: "Lemke",
        email: "Lionel21@gmail.com",
        phone: "550.220.6330 x258",
        address1: "<value>",
        city: "Spencerport",
        state: "West Virginia",
        zip: "46432",
        country: "MM",
      },
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarBuySingleDomain } from "@vercel/sdk/funcs/domainsRegistrarBuySingleDomain.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarBuySingleDomain(vercel, {
    domain: "metallic-simple.com",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      autoRenew: false,
      years: 7602.67,
      expectedPrice: 7390.34,
      contactInformation: {
        firstName: "Lexie",
        lastName: "Lemke",
        email: "Lionel21@gmail.com",
        phone: "550.220.6330 x258",
        address1: "<value>",
        city: "Spencerport",
        state: "West Virginia",
        zip: "46432",
        country: "MM",
      },
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarBuySingleDomain failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.BuySingleDomainRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.BuySingleDomainResponseBody>

Errors

Error Type Status Code Content Type
models.DomainTooShort 400 application/json
models.OrderTooExpensive 400 application/json
models.InvalidAdditionalContactInfo 400 application/json
models.AdditionalContactInfoRequired 400 application/json
models.ExpectedPriceMismatch 400 application/json
models.DomainNotAvailable 400 application/json
models.LanguageCodeRequired 400 application/json
models.TldNotSupported 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.Forbidden 403 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

buyDomains

Buy multiple domains at once

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.buyDomains({
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      domains: [],
      contactInformation: {
        firstName: "Leonie",
        lastName: "Johnston",
        email: "Anna_Fisher13@hotmail.com",
        phone: "(688) 699-0656",
        address1: "<value>",
        city: "Rennerland",
        state: "New Jersey",
        zip: "70054",
        country: "GF",
      },
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarBuyDomains } from "@vercel/sdk/funcs/domainsRegistrarBuyDomains.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarBuyDomains(vercel, {
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      domains: [],
      contactInformation: {
        firstName: "Leonie",
        lastName: "Johnston",
        email: "Anna_Fisher13@hotmail.com",
        phone: "(688) 699-0656",
        address1: "<value>",
        city: "Rennerland",
        state: "New Jersey",
        zip: "70054",
        country: "GF",
      },
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarBuyDomains failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.BuyDomainsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.BuyDomainsResponseBody>

Errors

Error Type Status Code Content Type
models.DomainTooShort 400 application/json
models.OrderTooExpensive 400 application/json
models.TooManyDomains 400 application/json
models.InvalidAdditionalContactInfo 400 application/json
models.AdditionalContactInfoRequired 400 application/json
models.DuplicateDomains 400 application/json
models.ExpectedPriceMismatch 400 application/json
models.DomainNotAvailable 400 application/json
models.LanguageCodeRequired 400 application/json
models.TldNotSupported 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.Forbidden 403 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

transferInDomain

Transfer a domain in from another registrar

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.transferInDomain({
    domain: "silky-fund.org",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      authCode: "<value>",
      autoRenew: true,
      years: 298.08,
      expectedPrice: 5092.5,
      contactInformation: {
        firstName: "Gabrielle",
        lastName: "Hackett",
        email: "Keshawn99@yahoo.com",
        phone: "(758) 385-1802 x13762",
        address1: "<value>",
        city: "Pattiestead",
        state: "Idaho",
        zip: "64653-9022",
        country: "JO",
      },
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarTransferInDomain } from "@vercel/sdk/funcs/domainsRegistrarTransferInDomain.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarTransferInDomain(vercel, {
    domain: "silky-fund.org",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      authCode: "<value>",
      autoRenew: true,
      years: 298.08,
      expectedPrice: 5092.5,
      contactInformation: {
        firstName: "Gabrielle",
        lastName: "Hackett",
        email: "Keshawn99@yahoo.com",
        phone: "(758) 385-1802 x13762",
        address1: "<value>",
        city: "Pattiestead",
        state: "Idaho",
        zip: "64653-9022",
        country: "JO",
      },
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarTransferInDomain failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.TransferInDomainRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.TransferInDomainResponseBody>

Errors

Error Type Status Code Content Type
models.BadRequest 400 application/json
models.DomainAlreadyOwned 400 application/json
models.DomainTooShort 400 application/json
models.DNSSECEnabled 400 application/json
models.ExpectedPriceMismatch 400 application/json
models.DomainNotAvailable 400 application/json
models.TldNotSupported 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.Forbidden 403 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

getDomainTransferIn

Get the transfer status for a domain

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.getDomainTransferIn({
    domain: "unsung-antelope.com",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarGetDomainTransferIn } from "@vercel/sdk/funcs/domainsRegistrarGetDomainTransferIn.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarGetDomainTransferIn(vercel, {
    domain: "unsung-antelope.com",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarGetDomainTransferIn failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.GetDomainTransferInRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.GetDomainTransferInResponseBody>

Errors

Error Type Status Code Content Type
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.Forbidden 403 application/json
models.NotFound 404 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

renewDomain

Renew a domain

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.renewDomain({
    domain: "scaly-daughter.biz",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      years: 1981.72,
      expectedPrice: 7096.16,
    },
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarRenewDomain } from "@vercel/sdk/funcs/domainsRegistrarRenewDomain.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarRenewDomain(vercel, {
    domain: "scaly-daughter.biz",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      years: 1981.72,
      expectedPrice: 7096.16,
    },
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarRenewDomain failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.RenewDomainRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.RenewDomainResponseBody>

Errors

Error Type Status Code Content Type
models.BadRequest 400 application/json
models.DomainTooShort 400 application/json
models.DomainNotRegistered 400 application/json
models.ExpectedPriceMismatch 400 application/json
models.DomainNotAvailable 400 application/json
models.TldNotSupported 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.Forbidden 403 application/json
models.DomainNotFound 404 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

updateDomainAutoRenew

Update the auto-renew setting for a domain

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  await vercel.domainsRegistrar.updateDomainAutoRenew({
    domain: "worthwhile-dwell.net",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      autoRenew: true,
    },
  });


}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarUpdateDomainAutoRenew } from "@vercel/sdk/funcs/domainsRegistrarUpdateDomainAutoRenew.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarUpdateDomainAutoRenew(vercel, {
    domain: "worthwhile-dwell.net",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      autoRenew: true,
    },
  });
  if (res.ok) {
    const { value: result } = res;
    
  } else {
    console.log("domainsRegistrarUpdateDomainAutoRenew failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.UpdateDomainAutoRenewRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<void>

Errors

Error Type Status Code Content Type
models.DomainAlreadyRenewing 400 application/json
models.DomainNotRenewable 400 application/json
models.DomainNotRegistered 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.Forbidden 403 application/json
models.DomainNotFound 404 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

updateDomainNameservers

Update the nameservers for a domain. Pass an empty array to use Vercel's default nameservers.

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  await vercel.domainsRegistrar.updateDomainNameservers({
    domain: "unique-formula.biz",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      nameservers: [
        "<value 1>",
      ],
    },
  });


}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarUpdateDomainNameservers } from "@vercel/sdk/funcs/domainsRegistrarUpdateDomainNameservers.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarUpdateDomainNameservers(vercel, {
    domain: "unique-formula.biz",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    requestBody: {
      nameservers: [
        "<value 1>",
      ],
    },
  });
  if (res.ok) {
    const { value: result } = res;
    
  } else {
    console.log("domainsRegistrarUpdateDomainNameservers failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.UpdateDomainNameserversRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<void>

Errors

Error Type Status Code Content Type
models.DomainNotRegistered 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.Forbidden 403 application/json
models.DomainNotFound 404 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

getContactInfoSchema

Some TLDs require additional contact information. Use this endpoint to get the schema for the tld-specific contact information for a domain.

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.getContactInfoSchema({
    domain: "tricky-issue.name",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarGetContactInfoSchema } from "@vercel/sdk/funcs/domainsRegistrarGetContactInfoSchema.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarGetContactInfoSchema(vercel, {
    domain: "tricky-issue.name",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarGetContactInfoSchema failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.GetContactInfoSchemaRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.GetContactInfoSchemaResponseBody>

Errors

Error Type Status Code Content Type
models.BadRequest 400 application/json
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*

getOrder

Get information about a domain order by its ID

Example Usage

import { Vercel } from "@vercel/sdk";

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

async function run() {
  const result = await vercel.domainsRegistrar.getOrder({
    orderId: "<id>",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { VercelCore } from "@vercel/sdk/core.js";
import { domainsRegistrarGetOrder } from "@vercel/sdk/funcs/domainsRegistrarGetOrder.js";

// Use `VercelCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const vercel = new VercelCore({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const res = await domainsRegistrarGetOrder(vercel, {
    orderId: "<id>",
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("domainsRegistrarGetOrder failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.GetOrderRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.GetOrderResponseBody>

Errors

Error Type Status Code Content Type
models.HttpApiDecodeError 400 application/json
models.Unauthorized 401 application/json
models.NotAuthorizedForScope 403 application/json
models.Forbidden 403 application/json
models.NotFound 404 application/json
models.TooManyRequests 429 application/json
models.InternalServerError 500 application/json
models.SDKError 4XX, 5XX */*