Skip to content
Docs

List Project Domains by Apex Domain

GEThttps://api.vercel.com/v1/domains/{domain}/project-domains
List all project domains associated with an apex domain owned by the authenticated account.
Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({
bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await vercel.domains.getDomainProjectDomains({
domain: "example.com",
limit: 20,
since: 1609499532000,
until: 1612264332000,
teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
slug: "my-team-url-slug",
});
console.log(result);
}
run();
Response
{
"pagination": {
"count": "20",
"next": "1540095775951",
"prev": "1540095775951"
},
"projectDomains": [
{
"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

domainstringRequired
The apex domain name.
limitnumberOptional
Maximum number of project domains to list from a request.
sincenumberOptional
Get project domains created after this JavaScript timestamp.
untilnumberOptional
Get project domains created before this JavaScript timestamp.
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
200Successful response retrieving project domains for an apex domain.
projectDomainsarrayRequired
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