# DKIM record validator API

Check a DKIM record: look it up by selector or paste it, and see its key type, size, flags and problems.

`POST /v1/dkim-record`

- Price: Free; any API key works and nothing is charged.
- Cache: Never cached; every call runs again.
- MCP tool: `validate_dkim_record`

A DKIM record, pasted or looked up by selector, parsed into its key type, key size, flags and hash algorithms. Free; any API key works and nothing is charged. Never cached; every call runs again.

## Request body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `record` | string or null | no | A DKIM record to check, pasted as text. |
| `domain` | string or null | no | Or a domain, with its selector, to look the record up. |
| `selector` | string or null | no | The DKIM selector, such as google or s1. |

## Response

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tool` | string | yes |  |
| `target` | string | yes |  |
| `status` | "ok" | "partial" | "error" | yes |  |
| `fetched_at` | string | no |  |
| `cached` | boolean | no |  |
| `credits_used` | integer | no | Credits this call took from your balance. 0 for free tools, for a replay of an earlier call, and for a free check run on the website without signing in |
| `summary` | string | yes |  |
| `score` | integer or null | no |  |
| `findings` | array of object | no |  |
| `credits_remaining` | integer | yes | Your balance after this call. It can be below zero after a refund; free tools still work then |
| `data` | object | yes | This tool's result |
| `data.source` | "pasted" | "dns" | yes |  |
| `data.name` | string or null | yes |  |
| `data.record` | string or null | yes |  |
| `data.query_status` | string or null | yes |  |
| `data.version` | string or null | yes |  |
| `data.key_type` | string or null | yes |  |
| `data.key_bits` | integer or null | yes |  |
| `data.revoked` | boolean | yes |  |
| `data.testing` | boolean | yes |  |
| `data.strict` | boolean | yes |  |
| `data.hash_algorithms` | array of string or null | yes |  |
| `data.service_types` | array of string | yes |  |

## Errors

- `400` Invalid domain, URL or parameter, a TLD this tool can't check, or an X-Request-Id already used for another call (`invalid_domain`, `invalid_url`, `invalid_request`, `unsupported_tld`)
- `401` Missing, unknown or revoked API key, or one whose creator is no longer a member of the account (`unauthorized`)
- `403` Account suspended, the key's creator is over the plan's seats, or an anonymous check without a valid proof-of-work or for a tool that needs an account, or bulk checks before a first purchase (`account_suspended`, `plan_limit`, `challenge_required`, `sign_in_required`, `bulk_locked`)
- `429` Too many requests, today's free checks are used up, or too many website scans at once; wait for the number of seconds in the Retry-After header (`rate_limited`, `free_limit_reached`, `too_many_jobs`). Not charged
- `500` Unexpected error (`internal_error`)

## Example

```sh
curl -X POST "https://api.dnssuper.com/v1/dkim-record" \
  -H "Authorization: Bearer $DNSSUPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"example.com"}'
```

```python
import os

import httpx

client = httpx.Client(
    base_url="https://api.dnssuper.com",
    headers={"Authorization": f"Bearer {os.environ['DNSSUPER_API_KEY']}"},
    timeout=60,
)
response = client.post("/v1/dkim-record", json={
    "domain": "example.com",
})
response.raise_for_status()
result = response.json()
print(result["summary"], result["credits_used"])
```

```ts
const response = await fetch("https://api.dnssuper.com/v1/dkim-record", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.DNSSUPER_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"domain":"example.com"}),
});
if (!response.ok) throw new Error((await response.json()).error.message);
const result = await response.json();
console.log(result.summary, result.credits_used);
```

Example response:

```json
{
  "tool": "dkim-checker",
  "target": "",
  "status": "ok",
  "fetched_at": "2026-11-14T10:00:00Z",
  "cached": false,
  "credits_used": 0,
  "summary": "The DKIM record at s2048._domainkey.example.com is valid (a 2048-bit RSA key).",
  "findings": [
    {
      "id": "dkim_record.valid",
      "severity": "pass",
      "title": "The DKIM record is valid",
      "detail": "",
      "fix": "Nothing to do."
    }
  ],
  "data": {
    "source": "dns",
    "name": "s2048._domainkey.example.com",
    "record": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApTGFY+knX9gV8lx+vLMRL+4h2Vef2XWTq1+IUtMY/ZRRoGQG31IR2Yz+FkzYaolUU2JMq2NbUzELco8z3Ef/iPmN4wITl7/cTQnwbn15fwvgeP59ICpyWpGtr/aq83ISRBjKEfTlRub1tRG/VVps0QaD4GjVBMGVPLYKKvlT9gG2Bzd86bLTkPOJcVHhjzqytVoqVW09guYc9W6J2XDfTES0ocQ7/p4zDR6/wmR4su5wwcy8C5GpeyKNERmR6w9DvH0c1ySrjtpvBMjDu4LTT4ruHJCHLqbWA1M31nFAi30vasgB0q6JZcEcOyM1ByetpiuqLfWNTLBm+RWQe4BguQIDAQAB",
    "query_status": "ok",
    "version": "DKIM1",
    "key_type": "rsa",
    "key_bits": 2048,
    "revoked": false,
    "testing": false,
    "strict": false,
    "service_types": [
      "*"
    ]
  },
  "credits_remaining": 498
}
```

## MCP

```json
{
  "tool": "validate_dkim_record",
  "arguments": {
    "domain": "example.com"
  }
}
```

```text
The DKIM record at s2048._domainkey.example.com is valid (a 2048-bit RSA key).
Looked up: s2048._domainkey.example.com
Key: 2048-bit RSA
1 check passed
Free | checked 2026-11-14 10:00 UTC
```
