---
title: "Retrieve project domains by project by id or name"
method: GET
path: "/v9/projects/{idOrName}/domains"
tags: ["projects"]
---

# Retrieve project domains by project by id or name

`GET /v9/projects/{idOrName}/domains`

Retrieve the domains associated with a given project by passing either the project `id` or `name` in the URL.

## Path parameters

- `idOrName` string, required — The unique project identifier or the project name

## Query parameters

- `production` 'true' | 'false' — Filters only production domains when set to `true`.
- `target` 'production' | 'preview' — Filters on the target of the domain. Can be either "production", "preview"
- `customEnvironmentId` string — The unique custom environment identifier within the project
- `gitBranch` string — Filters domains based on specific branch.
- `redirects` 'true' | 'false' — Excludes redirect project domains when "false". Includes redirect project domains when "true" (default).
- `redirect` string — Filters domains based on their redirect target.
- `verified` 'true' | 'false' — Filters domains based on their verification status.
- `limit` number — Maximum number of domains to list from a request (max 100).
- `since` number — Get domains created after this JavaScript timestamp.
- `until` number — Get domains created before this JavaScript timestamp.
- `order` 'ASC' | 'DESC' — Domains sort order by createdAt
- `teamId` string
- `slug` string

## Response `200`

Successful response retrieving a list of domains

- union
  - object
    - `domains` object[], required
      - `name` string, required
      - `apexName` string, required
      - `projectId` string, required
      - `redirect` string, nullable
      - `redirectStatusCode` 301 | 302 | 307 | 308 | null, nullable
      - `gitBranch` string, nullable
      - `customEnvironmentId` string, nullable
      - `updatedAt` number
      - `createdAt` number
      - `verified` false | true, required — `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.
      - `verification` object[] — 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`.
        - `type` string, required
        - `domain` string, required
        - `value` string, required
        - `reason` string, required
    - `pagination` object, required
      - `count` number, required
      - `next` number, nullable, required
      - `prev` number, nullable, required
  - object
    - `domains` object[], required
      - `name` string, required
      - `apexName` string, required
      - `projectId` string, required
      - `redirect` string, nullable
      - `redirectStatusCode` 301 | 302 | 307 | 308 | null, nullable
      - `gitBranch` string, nullable
      - `customEnvironmentId` string, nullable
      - `updatedAt` number
      - `createdAt` number
      - `verified` false | true, required — `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.
      - `verification` object[] — 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`.
        - `type` string, required
        - `domain` string, required
        - `value` string, required
        - `reason` string, required
    - `pagination` Pagination, required — This object contains information related to the pagination of the current request, including the necessary parameters to get the next or previous page of data.
      - `count` number, required — Amount of items in the current page.
      - `next` number, nullable, required — Timestamp that must be used to request the next page.
      - `prev` number, nullable, required — Timestamp that must be used to request the previous page.

## Other responses

- `400` — One of the provided values in the request query is invalid.
- `401` — The request is not authorized.
- `403` — You do not have permission to access this resource.
- `410`

---

[API](https://skmtc.net/vercel/apis/api.md) · [All operations](https://skmtc.net/vercel/apis/api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/api/versions/b4d86a3e3479/schema)
