Skip to content

DomainsApi

Defined in: packages/sdk/src/resources/DomainsApi.ts:11

Domains attached to a website — both the “site” (Vercel-hosted) variant and the “email” (Resend-hosted) variant. Includes the registrar helpers (checkAvailability, buy) that proxy through Vercel’s domain marketplace.

  • Resource

new DomainsApi(opts): DomainsApi

Defined in: packages/sdk/src/request.ts:93

VantageClientOptions

DomainsApi

Resource.constructor

add(websiteId, input): Promise<Domain>

Defined in: packages/sdk/src/resources/DomainsApi.ts:15

string

string

"site" | "email"

Promise<Domain>


buy(websiteId, input): Promise<{ attached: boolean; domain?: Domain; orderId: string; }>

Defined in: packages/sdk/src/resources/DomainsApi.ts:60

Buy a domain through Vercel and attach it to the website. The call polls until registration is final (can take 30–60s) and automatically delegates nameservers to Vercel. Note: the domain must currently be available (call checkAvailability first) and expectedPrice must match the quoted price.

string

boolean

{ address1: string; city: string; country: string; email: string; firstName: string; lastName: string; orgName?: string; phone: string; postalCode: string; state: string; }

string

string

string

string

string

string

string

string

string

string

string

number

number

Promise<{ attached: boolean; domain?: Domain; orderId: string; }>


checkAvailability(domain): Promise<{ available: boolean; domain: string; periodYears?: number; priceUsd?: number; }>

Defined in: packages/sdk/src/resources/DomainsApi.ts:42

Check whether a domain is available to register through Vercel

  • what it costs. Does not buy — use buy() for that.

string

Promise<{ available: boolean; domain: string; periodYears?: number; priceUsd?: number; }>


list(websiteId): Promise<{ domains: Domain[]; }>

Defined in: packages/sdk/src/resources/DomainsApi.ts:12

string

Promise<{ domains: Domain[]; }>


remove(websiteId, domain): Promise<{ removed: boolean; }>

Defined in: packages/sdk/src/resources/DomainsApi.ts:21

string

string

Promise<{ removed: boolean; }>


verify(websiteId, domain): Promise<Domain>

Defined in: packages/sdk/src/resources/DomainsApi.ts:32

Re-check DNS propagation for a domain. Vercel/Resend lazily mark a domain verified; this nudges them and refreshes our stored status + dnsRecords.

string

string

Promise<Domain>