---
title: "Update a project domain"
method: PATCH
path: "/v9/projects/{idOrName}/domains/{domain}"
tags: ["projects"]
---

# Update a project domain

`PATCH /v9/projects/{idOrName}/domains/{domain}`

Update a project domain's configuration, including the name, git branch and redirect of the domain.

## Path parameters

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

## Query parameters

- `teamId` string
- `slug` string

## Request body

- object
  - `gitBranch` string, nullable — Git branch to link the project domain
  - `redirect` string, nullable — Target destination domain for redirect
  - `redirectStatusCode` null | 301 | 302 | 307 | 308, nullable — Status code for domain redirect

## Response `200`

The domain was updated successfuly

- object
  - `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

## Other responses

- `400` — One of the provided values in the request body is invalid. One of the provided values in the request query is invalid. The domain redirect is not valid
- `401` — The request is not authorized.
- `403` — You do not have permission to access this resource.
- `409` — The project is currently being transferred
- `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/61d1ba3f6dac/schema)
