# restart_site_email_domain_verification

Source: https://modulify.ai/docs/api/emails/restart-site-email-domain-verification

Starts the verification of an email domain over when the mail provider gave up on it, which changes its three DKIM records.

- Title: Restart the verification of an email domain
- Scope: `config:write`
- Access: Destructive
- Endpoint: `POST /v1/restart_site_email_domain_verification`

It is for a domain the mail provider gave up on (`dkimStatus` `failed` or `not_started`) or whose setup is missing, which `canRestart` in `emailDomains.items` reports. It sets the domain up again with the mail provider, so its three DKIM records change, and you replace them at your DNS host with the new values in the answer. The ownership record stays the same.

It is refused with `This domain is verified, so there is nothing to restart!` while the domain is verified on any site. Once the mail provider has confirmed its sending records (`dkimStatus` `success`), it is refused with `The mail provider already confirmed this domain's sending records, so there is nothing to restart!`, and its ownership record is then the one to check. While the mail provider is still verifying it (`dkimStatus` `pending` or `temporary_failure`), it is refused with `The mail provider is still verifying this domain, so there is nothing to restart!`

A workspace can restart verification at most 10 times an hour across all its sites, and past that it is refused with `This workspace has restarted email domain verification too many times this hour.` followed by how long to wait. A [paused](https://modulify.ai/docs/automations/emails#when-your-plan-ends) domain is refused with `Email domains are paused until the workspace is on a paid plan again!`

The tool tells the client to always confirm with you first. It needs the **Manage domains** permission. See [Restart verification](https://modulify.ai/docs/automations/emails#restart-verification).

## Request

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

> **Warning**
>
> This method is marked destructive: it deletes or overwrites data. Check the inputs before you call it, and send an [Idempotency-Key](https://modulify.ai/docs/api/idempotency) header whenever you might retry it.

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

Over MCP, the same method is the [restart_site_email_domain_verification tool](https://modulify.ai/docs/mcp/emails/restart-site-email-domain-verification).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `domainId` | string | Yes | The id of the email domain, from `emailDomains.items` in `get_site_email_settings`. |

## 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.