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

## Request

- Base URL: `https://api.vercel.com`
- URL: `https://api.vercel.com/v9/projects/{idOrName}/domains/{domain}`
- Auth: HTTP bearer

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
  - `apexName` string, required
  - `createdAt` number
  - `customEnvironmentId` string, nullable
  - `gitBranch` string, nullable
  - `name` string, required
  - `projectId` string, required
  - `redirect` string, nullable
  - `redirectStatusCode` 301 | 302 | 307 | 308 | null, nullable
  - `updatedAt` number
  - `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`.
    - `domain` string, required
    - `reason` string, required
    - `type` string, required
    - `value` string, required
  - `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.

## 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.
- `404`
- `409`: The project is currently being transferred
- `410`

## Changes

- **2026-09-30** `099fbe1f521c`: 1 info
  - added the non-success response with the status `404`
- **2026-07-21** `2ae10ee9d21c`: 1 info
  - added the non-success response with the status `410`
- **2026-06-11** `14b4658f819e`: 1 warning
  - added the new `undefined` enum value to the `redirectStatusCode` response property for the response status `200`
- **2026-01-22** `c12186034433`: 1 breaking, 2 warning
  - request body became required
  - added the new `false` enum value to the `verified` response property for the response status `200`
  - added the new `true` enum value to the `verified` response property for the response status `200`
- **2025-03-19** `37b482c58c92`: 4 info
  - added the new optional `query` request parameter `slug`
  - added the non-success response with the status `401`
  - removed the non-success response with the status `404`
  - added the optional property `customEnvironmentId` to the response with the `200` status

[Operation history](https://skmtc.dev/vercel/apis/vercel-api/changes/v9/projects/:idOrName/domains/:domain/patch.md)

---

[API](https://skmtc.dev/vercel/apis/vercel-api.md) - [All operations](https://skmtc.dev/vercel/apis/vercel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/vercel-api/revisions/60686c0e1f6a?raw)
