> ## Documentation Index
> Fetch the complete documentation index at: https://api.smartlead.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Check Email Account DNS

> Live MX, SPF, DKIM and DMARC lookup for up to 50 email accounts (read-only)

Looks up the DNS records of the sending domain of each email account you send, live, with the same SPF, DKIM and DMARC checks as the app's DNS verification. It only reads: the stored DNS status of the account is returned next to the live result and is not updated.

Each domain is looked up once per call for each DKIM selector in use (accounts on the same domain with the same selector share one lookup); the account's saved custom DKIM selector is tried first when it has one. Lookups that are not finished after 10 seconds are stopped and that account goes in `failed`; so do accounts not reached within the request's 30-second time budget, and accounts whose `from_email` has no domain.

Only your own email accounts are read; with a client API key, only that client's. IDs that are not yours come back in `not_found`.

## Query Parameters

**api\_key** `string` *required*

Your SmartLead API key (a main or client key)

## Request Body

**email\_account\_ids** `array` *required*

Email account IDs (positive integers). 1 to 50 IDs. A repeated ID is read once.

```bash cURL theme={null}
curl -X POST "https://server.smartlead.ai/api/v1/email-accounts/dns-check?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email_account_ids": [123, 124, 999]}'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://server.smartlead.ai/api/v1/email-accounts/dns-check",
    params={"api_key": "YOUR_API_KEY"},
    json={"email_account_ids": [123, 124, 999]},
)
print(response.json())
```

## Response Fields

**ok** `boolean`

`true`

**checked\_at** `string`

When the lookups started (ISO 8601 date-time)

**data** `array`

One item per account of yours that was checked, in ascending ID order.

**item**

**email\_account\_id** `integer`

The email account ID

**from\_email** `string`

The account's sending address

**domain** `string`

The domain that was looked up (from `from_email`, lowercase)

**mx** `boolean`

The domain has at least one MX record

**spf** `boolean`

An SPF record was found

**dkim** `boolean`

A DKIM record was found

**dmarc** `boolean`

A DMARC record was found

**stored\_dns\_validation\_status** `object`

The DNS status saved on the account from its last verification (for example `isSPFVerified`, `isDKIMVerified`, `isDMARCVerified`, `lastVerifiedTime`), or `null`. Not updated by this call.

**not\_found** `array`

The IDs you sent that are not email accounts of yours (or of your client, for a client key)

**failed** `array`

IDs of your accounts that were not checked: the lookup did not finish within 10 seconds (it was stopped), the request used its 30-second time budget before reaching them, or `from_email` has no domain. Retry those IDs.

## Response Codes

**200** `Success`

Request successful, also when none of the IDs is yours (then `data` is empty and every ID is in `not_found`)

**400** `Bad Request`

`email_account_ids` is missing, empty, longer than 50 or has non-integer values, or the body has other keys

**401** `Unauthorized`

Invalid or missing API key

**429** `Too Many Requests`

More than 10 calls in 60 seconds to this endpoint per account (per key for a client key), on top of your plan's overall API limit. Plain-text body; wait the number of seconds in the `Retry-After` header.

**500** `Internal Server Error`

Server error; retry the request

```json 200 - Success theme={null}
{
  "ok": true,
  "checked_at": "2026-11-28T08:00:00.000Z",
  "data": [
    {
      "email_account_id": 123,
      "from_email": "jane@example.com",
      "domain": "example.com",
      "mx": true,
      "spf": true,
      "dkim": false,
      "dmarc": true,
      "stored_dns_validation_status": {
        "isSPFVerified": true,
        "isDKIMVerified": false,
        "isDMARCVerified": true,
        "lastVerifiedTime": "2026-11-20T09:15:00+00:00"
      }
    }
  ],
  "not_found": [999],
  "failed": [124]
}
```

```text 429 - Too Many Requests theme={null}
You have exceeded the 10 requests in 60 sec limit for this endpoint!
```

```json 500 - Internal Server Error theme={null}
{
  "error": "Could not check DNS."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.