# check_site_email_domain

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

Checks one email domain of a site again now, looking up its DNS records and asking the mail provider where it stands.

- Title: Check an email domain of a site
- Scope: `config:write`
- Access: Makes changes
- Endpoint: `POST /v1/check_site_email_domain`

It returns the site's email settings with the result in `emailDomains.items`: the domain's `status`, its `dkimStatus` and the `status` of each record. A record is `valid` when it is in place, `pending` while it is not found yet, `invalid` when it holds a different value, `missing` when it is not there, `elsewhere` when the domain receives its mail at another host, `inherited` when the DMARC record of the parent domain already covers it, or `unknown` when the lookup could not be completed.

Run it once you have added or changed the records. Every check starts the 14 days an unverified domain is kept for over again. Any member of the workspace who has API access may check.

`manual` true counts as you checking by hand: the DNS records are looked up fresh, at most once every 5 seconds, and the mail provider is asked at most once every 60 seconds. Without it, a check made in the last few seconds can be reused.

Domains are also checked on their own in the background, and a DNS change can take a while to show up, so the tool tells the client to call it once after a change rather than polling it. The mail provider can take up to 72 hours to confirm a domain after every record is found. See [The records to add](https://modulify.ai/docs/automations/emails#the-records-to-add).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/check_site_email_domain`, 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/check_site_email_domain \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","domainId":"DOMAIN_ID"}'
```

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

## 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`. |
| `manual` | boolean | No | True when you asked for the check, to look the DNS records up fresh. |

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