Verify project domain
POST
https://api.vercel.com/v9/projects/{idOrName}/domains/{domain}/verifyAttempts 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
200The project domain was verified successfully
Domain is already verified
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