Skip to main content
POST
/
v1
/
registrar
/
domains
/
{domain}
/
buy
buySingleDomain
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: "Sweden",
      },
    },
  });

  console.log(result);
}

run();
{
  "orderId": "<string>",
  "_links": {}
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

domain
string
required

Query Parameters

teamId
string
Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

Body

application/json
autoRenew
boolean
required

Whether the domain should be auto-renewed before it expires. This can be configured later through the Vercel Dashboard or the Update auto-renew for a domain endpoint.

years
number
required

The number of years to purchase the domain for.

expectedPrice
number
required

The expected price for the domain. Use the Get price data for a domain endpoint to retrieve the price data for a domain.

Required range: x >= 0.01
contactInformation
object
required

The contact information for the domain. Some TLDs require additional contact information. Use the Get contact info schema endpoint to retrieve the required fields.

Response

Success

orderId
string
required
I