---
title: "Install existing private key to DKIM record"
method: GET
path: "/install_dkim_private_keys"
tags: ["Mail", "Mail DNS Settings"]
---

# Install existing private key to DKIM record

`GET /install_dkim_private_keys`

This function installs existing keys for use in a DomainKeys Identified Mail (DKIM) record. This is useful if you do not want the system to generate keys for DKIM records.

**Notes:**

* This function does **not** update the local DNS server's records.
* If the local DNS server is authoritative for the domain's DNS records, use the WHM API 1 `enable_dkim` function to update the local DNS server's DNS records.
* We recommend that you use the WHM API 1 `install_dkim_private_keys` and `enable_dkim` functions in a batch WHM API 1 call.

## Query parameters

- `domain` string, domain, required
- `key` string, required

## Response `200`

HTTP Request was successful.

- object
  - `data` object
    - `payload` object[] — An array of objects containing information about the RSA private key installation to the local server's DKIM record.
      - `domain` string, domain — The RSA private key's associated domain.
      - `msg` string — The RSA private key's installation status message.
      - `status` 0 | 1 — Whether the system installed the RSA private key to the local server's DKIM record. * `1` — The system installed the RSA private key. * `0` — The system **cannot** install the RSA private key.
  - `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` 0 | 1 — * `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)
