Get a project domain
GET
https://api.vercel.com/v9/projects/{idOrName}/domains/{domain}Get project domain by project id/name and domain name.
https://api.vercel.com/v9/projects/{idOrName}/domains/{domain}
const response = await fetch('https://api.vercel.com/v9/projects/idOrName/domains/domain?teamId=string&slug=string', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{ "apexName": "Example Name", "createdAt": "123", "customEnvironmentId": "example_id", "gitBranch": "string", "name": "Example Name", "projectId": "example_id", "redirect": "string", "redirectStatusCode": "301", "updatedAt": "123", "verification": [ { "domain": "string", "reason": "Customer requested refund", "type": "string", "value": "string" } ], "verified": "false"}AuthorizationbearerToken
Default authentication mechanism
200Success
A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete
POST /projects/:idOrName/domains/:domain/verify to verify the domain. Possible challenges: - If verification.type = TXT the verification.domain will be checked for a TXT record matching verification.value.400One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error