---
title: "Validate DKIM records"
method: GET
path: "/validate_current_dkims"
tags: ["Mail", "Mail DNS Settings"]
---

# Validate DKIM records

`GET /validate_current_dkims`

This function retrieves and checks the DomainKeys Identified Mail (DKIM) records for one or more domains.

## Query parameters

- `domain` string, required

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `payload` object[] — An array of objects containing information about the domain's DKIM records.
      - `domain` string — The domain that the function used to check the DKIM record with a `default._domainkey` prefix.
      - `error` string — An error message that details the reason why the DNS lookup failed. **Note:** The function **only** returns this value when the `state` return is the `ERROR` value.
      - `expected` string — The DKIM record's contents.
      - `records` object[] — The domain's DNS `DKIM TXT` records.
        - `current` string — The full contents of the domain's `DKIM TXT` record data.
        - `state` 'VALID' | 'MISMATCH' | 'PERMFAIL' — The DKIM TXT record's status. * `VALID` — The `DKIM TXT` record matches the local server's public key. * `MISMATCH` — The `DKIM TXT` record does **not** match the local server's public key. * `PERMFAIL` — Multiple `DKIM TXT` records for the domain exist or a misconfigured `DKIM TXT` record exists.
      - `state` 'VALID' | 'MALFORMED' | 'MISMATCH' | 'MISSING' | 'MULTIPLE' | 'NOPUB' | 'ERROR' — The domain's DKIM record status. * `VALID` — The DKIM record is valid. * `MALFORMED` — A single DKIM record exists, but the record does **not** match the expected DKIM specifications. * `MISMATCH` — A DKIM record exists, but it does **not** match the expected public key. * `MISSING` — No DKIM record exists for the domain. * `MULTIPLE` — Multiple DKIM records exist. * `NOPUB` — No key exists on the local server for the domain. * `ERROR` — The record's DNS lookup failed. The function returns the reason in the `error` return value.
      - `validity_cache_update` 'set' | 'valid' | 'none' | 'error' — The result of the DKIM record's validity cache update operation. * `set` — The domain is invalid but passed its validity check. The validity check now passes the domain as valid. * `valid` — The domain is valid and passed its validity check. There are no changes required. * `none` — The domain is invalid but the system will **not** take further action. * `error` — The domain's validity check operation failed.
  - `metadata` object
    - `command` string — The method name called.
    - `reason` string — The reason the API function failed when the `metadata.result` field is `0`. This field may display a success message when a function succeeds.
    - `result` 1 | 0 — * `1` — Success. * `0` — Failed. Check the `reason` field for more details.
    - `version` integer — The version of the API function.

---

[API](https://skmtc.net/cpanel/apis/whm-api.md) · [All operations](https://skmtc.net/cpanel/apis/whm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/whm-api/revisions/3da41671c02c/schema)
