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.
Extends
Section titled “Extends”Resource
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DomainsApi(
opts):DomainsApi
Defined in: packages/sdk/src/request.ts:93
Parameters
Section titled “Parameters”Returns
Section titled “Returns”DomainsApi
Inherited from
Section titled “Inherited from”Resource.constructor
Methods
Section titled “Methods”add(
websiteId,input):Promise<Domain>
Defined in: packages/sdk/src/resources/DomainsApi.ts:15
Parameters
Section titled “Parameters”websiteId
Section titled “websiteId”string
domain
Section titled “domain”string
"site" | "email"
Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”websiteId
Section titled “websiteId”string
autoRenew?
Section titled “autoRenew?”boolean
contactInformation
Section titled “contactInformation”{ address1: string; city: string; country: string; email: string; firstName: string; lastName: string; orgName?: string; phone: string; postalCode: string; state: string; }
contactInformation.address1
Section titled “contactInformation.address1”string
contactInformation.city
Section titled “contactInformation.city”string
contactInformation.country
Section titled “contactInformation.country”string
contactInformation.email
Section titled “contactInformation.email”string
contactInformation.firstName
Section titled “contactInformation.firstName”string
contactInformation.lastName
Section titled “contactInformation.lastName”string
contactInformation.orgName?
Section titled “contactInformation.orgName?”string
contactInformation.phone
Section titled “contactInformation.phone”string
contactInformation.postalCode
Section titled “contactInformation.postalCode”string
contactInformation.state
Section titled “contactInformation.state”string
domain
Section titled “domain”string
expectedPrice
Section titled “expectedPrice”number
number
Returns
Section titled “Returns”Promise<{ attached: boolean; domain?: Domain; orderId: string; }>
checkAvailability()
Section titled “checkAvailability()”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.
Parameters
Section titled “Parameters”domain
Section titled “domain”string
Returns
Section titled “Returns”Promise<{ available: boolean; domain: string; periodYears?: number; priceUsd?: number; }>
list()
Section titled “list()”list(
websiteId):Promise<{domains:Domain[]; }>
Defined in: packages/sdk/src/resources/DomainsApi.ts:12
Parameters
Section titled “Parameters”websiteId
Section titled “websiteId”string
Returns
Section titled “Returns”Promise<{ domains: Domain[]; }>
remove()
Section titled “remove()”remove(
websiteId,domain):Promise<{removed:boolean; }>
Defined in: packages/sdk/src/resources/DomainsApi.ts:21
Parameters
Section titled “Parameters”websiteId
Section titled “websiteId”string
domain
Section titled “domain”string
Returns
Section titled “Returns”Promise<{ removed: boolean; }>
verify()
Section titled “verify()”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.
Parameters
Section titled “Parameters”websiteId
Section titled “websiteId”string
domain
Section titled “domain”string
Returns
Section titled “Returns”Promise<Domain>