Add an existing domain to the Vercel platform
POST
https://api.vercel.com/v7/domainsThis endpoint is used for adding a new apex domain name with Vercel for the authenticating user. Note: This endpoint is no longer used for initiating domain transfers from external registrars to Vercel. For this, please use the endpoint Transfer-in a domain.
https://api.vercel.com/v7/domains
const response = await fetch('https://api.vercel.com/v7/domains?teamId=string&slug=string', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "method": "add", "name": "example.com", "cdnEnabled": "true", "zone": "true" }),});
const data = await response.json();console.log(data);Response
{ "domain": { "verified": "true", "nameservers": [], "intendedNameservers": [], "customNameservers": [], "creator": { "username": "string", "email": "user@example.com", "customerId": "example_id", "isDomainReseller": "false", "id": "icfg_1234567890" }, "registrar": "new", "name": "example.com", "teamId": "example_id", "boughtAt": "1613602938882", "createdAt": "1613602938882", "expiresAt": "1613602938882", "id": "EmTbe5CEJyTk2yVAHBUWy4A3sRusca3GCwRjTC1bpeVnt1", "renew": "true", "serviceType": "zeit.world", "transferredAt": "1613602938882", "transferStartedAt": "1613602938882", "userId": "example_id" }}AuthorizationbearerToken
Default authentication mechanism
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
application/json
methodstringOptional
The domain operation to perform.
namestringRequired
The domain name you want to add.
cdnEnabledbooleanOptional
Whether the domain has the Vercel Edge Network enabled or not.
zonebooleanOptional
Whether to create a DNS zone on Vercel. Set
true if using Vercel nameservers.200Success
domainobjectRequired
400One of the provided values in the request body is invalid.
401The request is not authorized.
402The account was soft-blocked for an unhandled reason.
The account is missing a payment so payment method must be updated
403You do not have permission to access this resource.
404Error
409The domain is not allowed to be used