# start_domain_verification

Source: https://modulify.ai/docs/api/domains/start-domain-verification

Begins the ownership check for a domain before it is attached to a site, returning one TXT record to add.

- Title: Start proving ownership of a domain
- Scope: `config:write`
- Access: Makes changes
- Endpoint: `POST /v1/start_domain_verification`

It requires a paid plan, the **Manage domains** permission, room on the site for another custom domain, up to 10, and a domain that does not already belong to this site or another one. A domain another site is only waiting to verify does not block it.

Pass a bare hostname. A value with `http://` or `https://`, a path, or fewer than 4 or more than 253 characters is refused with the same messages as the **Custom Domain** field. A leading `www.` is dropped, so `www.example.com` verifies `example.com`.

A site has one pending verification at a time, so starting a new one replaces any earlier one. The answer carries the record to add as `verificationTxtName`, which is `_modulify-verification.` followed by the domain, and `verificationTxtValue`. Once it is in place, `verify_domain` is the step that actually adds the domain, and `cancel_domain_verification` abandons the attempt. See [A domain waiting on verification](https://modulify.ai/docs/publish/custom-domains#a-domain-waiting-on-verification).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/start_domain_verification`, sending the inputs below as a JSON object. The token needs the `config:write` scope.

It makes changes, so send an [Idempotency-Key](https://modulify.ai/docs/api/idempotency) header whenever you might retry it. A retry with the same key gets the first answer back instead of running again.

```bash
curl -X POST https://api.modulify.ai/v1/start_domain_verification \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","domain":"DOMAIN"}'
```

Over MCP, the same method is the [start_domain_verification tool](https://modulify.ai/docs/mcp/domains/start-domain-verification).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `domain` | string | Yes | The bare hostname to prove ownership of, for example `example.com`. |

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) of `success`, `message`, `data`, `code` and `version`. `data` holds the result described above, and on a method that returns a total, `count` carries it. The [response headers](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) carry the call's `X-Request-Id` and what is left of your per-minute budget in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. [Errors](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.