---
title: "Check the DKIM key of a domain"
description: "The DKIM key at a selector, or every key at the selectors in common use."
url: "https://nextmail.sh/docs/api/tools/dkim"
area: "API"
category: "Mailbox"
---

# Check the DKIM key of a domain

The DKIM key at a selector, or every key at the selectors in common use.

`GET /tools/dkim`

## GET /tools/dkim

The DKIM key at a selector, or every key at the selectors in common use.

## Example

Needs no scope. It reads the key at `selector._domainkey.domain` with its tags, the key type and the length read from the key itself in `keyBits`. Leave `selector` out to try the selectors in common use, listed in `probed`. Each key has `findings` of its own, and the report has `findings` about the lookup as a whole.

**curl**

```
curl "$API/tools/dkim?domain=acme.com&selector=google" -H "$AUTH"
```

**Response**

```
{
  "object": "dkim_report",
  "domain": "acme.com",
  "selector": "google",
  "probed": ["google"],
  "status": "pass",
  "keys": [
    {
      "selector": "google",
      "name": "google._domainkey.acme.com",
      "aliasTarget": null,
      "record": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…",
      "strings": ["v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…", "…IDAQAB"],
      "ttl": 3600,
      "tags": [
        { "name": "v", "value": "DKIM1", "known": true },
        { "name": "k", "value": "rsa", "known": true },
        { "name": "p", "value": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…", "known": true }
      ],
      "version": "DKIM1",
      "keyType": "rsa",
      "keyBits": 2048,
      "hashes": [],
      "flags": [],
      "services": [],
      "notes": null,
      "revoked": false,
      "testing": false,
      "status": "pass",
      "findings": [
        { "code": "strong-key", "severity": "pass", "message": "A 2048-bit RSA key, strong enough for every verifier.", "subject": null, "value": 2048 }
      ]
    }
  ],
  "findings": []
}
```

> A full name such as `google._domainkey.acme.com` passed as `selector` is read as `google`, and anything else that does not read as a selector is a 422 `invalid_parameter` on `selector`.

> A domain never lists its selectors, so a probe that finds nothing is `missing` with the finding `none-found`, not proof that the domain has no key. The `s=` tag of a signed message names the selector it used.

## Reference

- [`GET /tools/dkim`](https://nextmail.sh/docs/api/reference/tools#get-tools-dkim): full reference
