---
title: "Validate domains' DKIM records"
method: GET
path: "/EmailAuth/validate_current_dkims"
tags: ["EmailAuth", "Email DNS Settings"]
---

# Validate domains' DKIM records

`GET /EmailAuth/validate_current_dkims`

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

## Query parameters

- `domain` string, domain, required

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object[] — An array that contains information about the domain's DKIM records.
      - `domain` string, domain — The domain that the function used to check the DKIM record. This will be the value of the domain parameter with a `default._domainkey` prefix.
      - `error` string — A message that details the reason why the DNS lookup failed. **Note:** The function only returns this value when the `state` returned is the `ERROR` value.
      - `expected` string — The DKIM record's contents.
      - `records` object[] — The domain's DNS DKIM TXT records. **Important:** This function may fail to preserve whitespace in DKIM records.
        - `current` string — The domain's DKIM TXT record data contents. **Important:** This function may fail to preserve whitespace in DKIM records.
        - `reason` string — The reason why the DKIM TXT record is not correct, if one exists. **Note:** This function **only** returns this value when the `state` value is `PERMFAIL`.
        - `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. Possible values: * `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.
      - `validity_cache_update` 'set' | 'unset' | 'valid' | 'invalid' | '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. * `unset` The domain is invalid and did not pass its validity check. The validity check does not pass the domain as valid. * `valid` The domain is valid and passed its validity check. There are no changes required. * `invalid` The domain is invalid and failed 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.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 0 | 1 — - `1` - Success. - `0` - Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/versions/632e2f8e6d04/schema)
