Skip to main content
GET
/
v9
/
projects
/
{idOrName}
/
domains
getProjectDomains
import { Vercel } from "@vercel/sdk";  const vercel = new Vercel({  bearerToken: "<YOUR_BEARER_TOKEN_HERE>", });  async function run() {  const result = await vercel.projects.getProjectDomains({  idOrName: "<value>",  customEnvironmentId: "env_123abc4567",  redirect: "example.com",  limit: 20,  since: 1609499532000,  until: 1612264332000,  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",  slug: "my-team-url-slug",  });   console.log(result); }  run();
{  "domains": [  {  "name": "<string>",  "apexName": "<string>",  "projectId": "<string>",  "verified": true,  "redirect": "<string>",  "redirectStatusCode": 307,  "gitBranch": "<string>",  "customEnvironmentId": "<string>",  "updatedAt": 123,  "createdAt": 123,  "verification": [  {  "type": "<string>",  "domain": "<string>",  "value": "<string>",  "reason": "<string>"  }  ]  }  ],  "pagination": {  "count": 123,  "next": 123,  "prev": 123  } }

Authorizations

Authorization
string
header
required

Default authentication mechanism

Path Parameters

idOrName
string
required

The unique project identifier or the project name

Query Parameters

production
enum<string>
default:false

Filters only production domains when set to true.

Available options:
true,
false
target
enum<string>

Filters on the target of the domain. Can be either "production", "preview"

Available options:
production,
preview
customEnvironmentId
string

The unique custom environment identifier within the project

Example:

"env_123abc4567"

gitBranch
string

Filters domains based on specific branch.

redirects
enum<string>
default:true

Excludes redirect project domains when "false". Includes redirect project domains when "true" (default).

Available options:
true,
false
redirect
string

Filters domains based on their redirect target.

Example:

"example.com"

verified
enum<string>

Filters domains based on their verification status.

Available options:
true,
false
limit
number

Maximum number of domains to list from a request (max 100).

Example:

20

since
number

Get domains created after this JavaScript timestamp.

Example:

1609499532000

until
number

Get domains created before this JavaScript timestamp.

Example:

1612264332000

order
enum<string>
default:DESC

Domains sort order by createdAt

Available options:
ASC,
DESC
teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Response

Successful response retrieving a list of domains

domains
object[]
required
pagination
object
required