Skip to content
Docs

Verify project domain

POSThttps://api.vercel.com/v9/projects/{idOrName}/domains/{domain}/verify
Attempts to verify a project domain with verified = false by checking the correctness of the project domain's verification challenge.
https://api.vercel.com/v9/projects/{idOrName}/domains/{domain}/verify
const response = await fetch('https://api.vercel.com/v9/projects/idOrName/domains/domain/verify?teamId=string&slug=string', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);
Response
{
"name": "Example Name",
"apexName": "Example Name",
"projectId": "example_id",
"redirect": "string",
"redirectStatusCode": "301",
"gitBranch": "string",
"customEnvironmentId": "example_id",
"updatedAt": "123",
"createdAt": "123",
"verified": "false"
}
AuthorizationbearerToken

Default authentication mechanism

idOrNamestringRequired
The unique project identifier or the project name
domainstringRequired
The domain name you want to verify
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200The project domain was verified successfully Domain is already verified
namestringRequired
apexNamestringRequired
projectIdstringRequired
redirectstringOptional
redirectStatusCodenumberOptional
gitBranchstringOptional
customEnvironmentIdstringOptional
updatedAtnumberOptional
createdAtnumberOptional
verifiedbooleanRequired
true if the domain is verified for use with the project. If false it will not be used as an alias on this project until the challenge in verification is completed.
400One of the provided values in the request query is invalid. There is an existing TXT record on the domain verifying it for another project The domain does not have a TXT record that attempts to verify the project domain The TXT record on the domain does not match the expected challenge for the project domain Project domain is not assigned to project
401The request is not authorized.
403You do not have permission to access this resource.
410Error