DKIM Check
DKIM signs mail with a private key and publishes the public key in DNS under a selector. This check fetches the key record at <selector>._domainkey.<domain>, parses its tags, decodes the key to report its type and size, and flags what would make verifiers reject it. Without a selector it tries the selectors the big providers and ESPs use until one answers.
/api/dkim-checkCosts 2 creditsAPI keyValidate a domain's DKIM key record (2 credits)
Selectors
The selector is the s= value of a DKIM-Signature header; a domain can publish any number of keys under different selectors. Pass it when you have a message in hand. Without one, about 150 common selectors are tried in batches of 25 until a batch answers, under a four-second budget; many domains sign with selectors that are dates or random tokens, and those cannot be discovered. The free tool tries the 50 most common.
cname_targetshows where the key host points when an ESP hosts the key (Microsoft 365 and Google Workspace both do).- When every selector tried answers with the same record, the zone has a wildcard and the selector cannot be confirmed (
WILDCARD_DKIM_RECORD).
The key
key_typeisrsa(the default) ored25519;key_bitscomes from decodingp=. RSA keys under 2048 bits draw a warning, under 1024 an error (RFC 8301).- An empty
p=means the key was revoked (revoked: true);t=ymarks it as in testing;h=sha1alone is flagged because RFC 8301 forbids SHA-1. v=DKIM1is optional in RFC 6376; its absence is only a note, but a wrong value or a misplaced tag is an error.
Issue codes
| code | type | Means |
|---|---|---|
| DKIM_NOT_FOUND | error | No key at the selector given, or none of the selectors tried |
| DISCOVERY_TIMED_OUT | info | Discovery hit its time budget before a selector answered |
| DUPLICATE_DKIM_RECORDS | error | More than one key record at the host |
| MISSING_P_TAG | error | No p= tag |
| PUBLIC_KEY_REVOKED | warning | p= is empty |
| INVALID_P_TAG_CHARS / PUBLIC_KEY_NOT_VALID | error | p= is not base64, or not a key of the declared type |
| WEAK_PUBLIC_KEY_BITS | warning / error | RSA key under 2048 bits / under 1024 bits |
| SHA1_ONLY | warning | h=sha1 restricts the key to SHA-1 |
| TESTING_MODE | info | t=y |
| INVALID_K_TAG_CHARS / INVALID_H_TAG_CHARS / INVALID_S_TAG_CHARS / INVALID_T_TAG_CHARS | error | A tag has a value verifiers do not accept |
| WILDCARD_DKIM_RECORD | info | Every selector answers with the same record |
| DNS_LOOKUP_FAILED | error | A lookup did not complete; the report is partial |
Request
| Field | Type | Description |
|---|---|---|
| domain* | string | Signing domain (the d= of a DKIM-Signature header) |
| selector | string | null | Selector (the s= of a DKIM-Signature header). Omit to try common selectors until one answers |
Authenticate with API key. Send it as the X-API-Key header.
curl -X POST "https://api.senapati.io/api/dkim-check" \
-H "X-API-Key: $SENAPATI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain":"microsoft.com"}'Response
Every success is wrapped in { "data": … } with a request_id; the fields below describe data. See Errors for the failure shape.
{"request_id": "req_c41e88aa","timestamp": "2026-10-21T09:30:12.418203+00:00","data": {"domain": "microsoft.com","selector": "selector2","selector_given": false,"selectors_tried": 25,"dkim_host": "selector2._domainkey.microsoft.com","cname_target": "selector2-microsoft-com._domainkey.microsoft.onmicrosoft.com","has_dkim_record": true,"dkim_record": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCPkb8bu8RGWeJGk3hJrouZXIdZ+HTp/azRp8IUOHp5wKvPUAi/54PwuLscUjRk4Rh3hjIkMpKRfJJXPxWbrT7eMLric7f/S0h+qF4aqIiQqHFCDAYfMnN6V3Wbke2U5EGm0H/cAUYkaf2AtuHJ/rdY/EXaldAm00PgT9QQMez66QIDAQAB;","dkim_records_count": 1,"version": "DKIM1","key_type": "rsa","key_bits": 1024,"hash_algorithms": [],"service_types": ["*"],"flags": [],"testing_mode": false,"revoked": false,"other_selectors_found": ["m1","s1024"],"issues_found": [{"code": "WEAK_PUBLIC_KEY_BITS","type": "warning","message": "1024-bit RSA key; 2048 bits is the recommended minimum"}],"has_issues": true,"valid": true,"lookup_failed": false,"elapsed_ms": 130}}
Discovered, not given: selector_given is false and other_selectors_found lists the further selectors that also answered in the same round.
| Field | Type | Description |
|---|---|---|
| domain* | string | |
| selector* | string | null | The selector checked: the one given, or the first one discovered |
| selector_given* | boolean | False when the selector was discovered |
| selectors_tried* | integer | How many selectors were queried |
| dkim_host* | string | null | <selector>._domainkey.<domain> |
| cname_target* | string | null | Where the key host points when it is an alias (common with ESPs) |
| has_dkim_record* | boolean | |
| dkim_record* | string | null | |
| dkim_records_count* | integer | Key records at the host; more than one is an error |
| version* | string | null | v tag, normally DKIM1; optional in RFC 6376 |
| key_type* | string | null | k tag: rsa or ed25519 |
| key_bits* | integer | null | Public key size; 2048 is the recommended RSA minimum |
| hash_algorithms* | string[] | h tag, when it restricts hash algorithms |
| service_types* | string[] | s tag; * when unrestricted |
| flags* | string[] | t tag flags: y (testing), s (strict domain match) |
| testing_mode* | boolean | |
| revoked* | boolean | True when p= is empty: the key was revoked |
| other_selectors_found* | string[] | Further selectors that also answered during discovery |
| issues_found* | AuthIssue[] | |
| ↳ code* | string | Stable machine-readable code, e.g. PLUS_ALL_FOUND |
| ↳ type* | "error" | "warning" | "info" | error: receivers reject or ignore the record; warning: it works but is weaker than it should be; info: a note, not a defect |
| ↳ message* | string | What was found and why it matters |
| has_issues* | boolean | |
| valid* | boolean | A key record exists and verifiers can use it |
| lookup_failed* | boolean | True when a DNS query did not complete; the report is partial |
| elapsed_ms | integer | default 0 |
Errors
- 401missing or invalid API key / token
- 402not enough credits on the account
- 422the request body or a parameter failed validation
- 429plan rate limit exceeded
Nested objects
| Field | Type | Description |
|---|---|---|
| code* | string | Stable machine-readable code, e.g. PLUS_ALL_FOUND |
| type* | "error" | "warning" | "info" | error: receivers reject or ignore the record; warning: it works but is weaker than it should be; info: a note, not a defect |
| message* | string | What was found and why it matters |
Notes
- This checks the published key, not a signature: whether a given message was signed correctly needs the message itself.
- A report with
lookup_failed: trueis partial, for example when discovery ran out of time; retry it.