---
title: verify-project-domain
description: Learn about verify-project-domain on Vercel.
url: "https://vercel.com/docs/rest-api/projects/verify-project-domain"
last_updated: 2026-12-04
related:
  - /docs/rest-api
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest docs search "<query>"
search_kb_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# Verify project domain

```http
POST /v9/projects/{idOrName}/domains/{domain}/verify
```

Attempts to verify a project domain with `verified = false` by checking the correctness of the project domain's `verification` challenge.

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `idOrName` | string | Yes | The unique project identifier or the project name |
| `domain` | string | Yes | The domain name you want to verify |


## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Example request

### TypeScript

```typescript
const response = await fetch('https://api.vercel.com/v9/projects/idOrName/domains/domain/verify?teamId=string&slug=string', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Next.js

```typescript
'use server';

export async function callEndpoint() {
  const response = await fetch('https://api.vercel.com/v9/projects/idOrName/domains/domain/verify?teamId=string&slug=string', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.VERCEL_ACCESS_TOKEN}`,
      'Content-Type': 'application/json',
    },
    next: { revalidate: 3600 }
  });

  if (!response.ok) {
    throw new Error('Request failed');
  }

  return response.json();
}
```

### cURL

```bash
curl -X POST 'https://api.vercel.com/v9/projects/idOrName/domains/domain/verify?teamId=string&slug=string' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
```

## Example response

```json
{
  "apexName": "Example Name",
  "createdAt": "123",
  "customEnvironmentId": "example_id",
  "gitBranch": "string",
  "name": "Example Name",
  "projectId": "example_id",
  "redirect": "string",
  "redirectStatusCode": "301",
  "updatedAt": "123",
  "verified": "false"
}
```

## Responses

### 200: The project domain was verified successfully
Domain is already verified

Content-Type: `application/json`

```json
{
  "type": "object",
  "required": [
    "apexName",
    "name",
    "projectId",
    "verified"
  ],
  "properties": {
    "apexName": {
      "type": "string"
    },
    "createdAt": {
      "type": "number"
    },
    "customEnvironmentId": {
      "type": "string",
      "nullable": true
    },
    "gitBranch": {
      "type": "string",
      "nullable": true
    },
    "name": {
      "type": "string"
    },
    "projectId": {
      "type": "string"
    },
    "redirect": {
      "type": "string",
      "nullable": true
    },
    "redirectStatusCode": {
      "type": "number",
      "enum": [
        301,
        302,
        307,
        308,
        null
      ],
      "nullable": true
    },
    "updatedAt": {
      "type": "number"
    },
    "verified": {
      "type": "boolean",
      "description": "`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.",
      "enum": [
        false,
        true
      ]
    }
  }
}
```

### 400: One of the provided values in the request query is invalid.
domain_does_not_exist: The project domain was removed during the request.
txt_on_another_project: The TXT record for this project is valid, but the TXT record that verifies the domain for a different project is still in DNS.
missing_txt_record: No TXT record for this domain is on the _vercel subdomain of the apex domain.
txt_on_wrong_domain: The required TXT record is on the apex domain, not on the _vercel subdomain of the apex domain.
incorrect_txt_record: A TXT record on the _vercel subdomain of the apex domain contains vc-domain-verify for this domain, but the full record is wrong for this project.
existing_project_domain: The domain is verified on a different project, and DNS has no valid TXT record for this project.
invalid_project: The domain belongs to a different project of this team, not to the project in the request.

### 401: The request is not authorized.

### 403: You do not have permission to access this resource.

### 404: No description

### 410: No description

---

## Related

- [projects endpoints](/docs/rest-api#projects)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://vercel.com/openapi.json) (machine-readable, all endpoints)

## Search the docs from your terminal

Search the Vercel docs and read pages as Markdown with the Vercel CLI. No login required.

```bash
# Find docs pages by keyword
npx vercel@latest docs search "environment variables"
npx vercel@latest docs search "function timeout"

# Print a docs page as Markdown, by path or URL
npx vercel@latest docs inspect <page>
```

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```

---

[View full sitemap](/docs/sitemap)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
