Buy a domain
POST
https://api.vercel.com/v1/registrar/domains/{domain}/buyBuy a domain
https://api.vercel.com/v1/registrar/domains/{domain}/buy
const response = await fetch('https://api.vercel.com/v1/registrar/domains/domain/buy?teamId=string', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "autoRenew": "true", "years": "123", "expectedPrice": "123", "contactInformation": { "firstName": "Example Name", "lastName": "Example Name", "email": "user@example.com", "phone": "string", "address1": "string", "address2": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "companyName": "Example Name", "fax": "string", "additional": {} }, "languageCode": "string" }),});
const data = await response.json();console.log(data);Response
{ "orderId": "example_id", "_links": "value"}Errors
{ "status": "400", "code": "domain_too_short", "message": "string"}AuthorizationbearerToken
Default authentication mechanism
application/json
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.
The contact information for the domain. Some TLDs require additional contact information. Use the Get contact info schema endpoint to retrieve the required fields.
The language code for the domain. For punycode domains, this must be provided. The list of supported language codes for a TLD can be retrieved from the Get TLD endpoint.
400There was something wrong with the request
429TooManyRequests