# Add domains' DKIM record 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.

Note:

* 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 UAPI EmailAuth::enable_dkim function to update the local DNS server's DNS records.
  * We recommend that you use the UAPI EmailAuth::install_dkim_private_keys and EmailAuth::enable_dkim functions in a batch UAPI call.

Endpoint: GET /EmailAuth/install_dkim_private_keys
Version: 11.136.0.4
Security: BasicAuth

## Query parameters:

  - `domain` (string, required)
    The domain for which to install a DKIM private key on the local server.

Note:

To install multiple RSA private keys for multiple domains, duplicate the parameter name. For example, use the domain=example.com, domain=example2.com, and domain=example3.com parameters.

  - `key` (string, required)
    An RSA key in Privacy-Enhanced Mail (PEM) format.

Note:

You must provide this parameter for each domain parameter.
    Example: "-----BEGIN%20RSA%20PRIVATE%20KEY-----%0aAAAAB3NzaC1yc2EAAAABIwAAAQEA5kSivOqhs0U9ZMN20nxFe27QZ3t0lT2zbH7OSXylKd%0a1rjAjYXGnSXC9j2uaZlemHlptBKVziMJC86ha7Hcj6dVOVrDQ6vF4q34bOCjtKLphQ0IjB%0azVIvqILH9eLJdRaOrS34CmgmPaisrCk5wKVlakygvUfcj3HzaTKS6THyZDGx5shdTpa9lb%0ay8tpOD3JceV7ay4w8r0DipoKPC0OLpvS4EABEeMo9sx8zQEaKv03XygjNCCYtFvxlQQIRG%0alVoL7mPaHSaL3anI05RpNbm/PS+9BhZg+BqNjU4ofHBbfkXk5MiN6M7ieR4Sk5BquccboG%0aF13U5slNgmCEekdt0amw%0a-----END%20RSA%20PRIVATE%20KEY-----%0a"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "install_dkim_private_keys"

  - `module` (string)
    The name of the module called.
    Example: "EmailAuth"

  - `result` (object)

  - `result.data` (array)
    An array of objects that contains information about the DKIM private key installation to the local server.

  - `result.data.domain` (string)
    The DKIM private key's associated domain.
    Example: "example.com"

  - `result.data.msg` (string)
    The DKIM private key's installation status message.
    Example: "[ADD:TXT@default._domainkey:v=DKIM1; k=rsa; p=AAAAB3NzaC1yc2EAAAABIwAAAQEA5kSivOqhs0U9ZMN20nxFe27QZ3t0lT2zbH7OSXylKd1rjAjYXGnSXC9j2uaZlemHlptBKVziMJC86ha7Hcj6dVOVrDQ6vF4q34bOCjtKLphQ0IjBzVIvqILH9eLJdRaOrS34CmgmPaisrCk5wKVlakygvUfcj3HzaTKS6THyZDGx5shdTpa9lby8tpOD3JceV7ay4w8r0DipoKPC0OLpvS4EABEeMo9sx8zQEaKv03XygjNCCYtFvxlQQIRGlVoL7mPaHSaL3anI05RpNbm/PS+9BhZg+BqNjU4ofHBbfkXk5MiN6M7ieR4Sk5BquccboGF13U5slNgmCEekdt0amw;]"

  - `result.data.status` (integer)
    Whether the system installed the DKIM private key to the local server.
* 1 - The system installed the DKIM private key.
* 0 - The system cannot install the DKIM private key.
    Enum: 0, 1

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    * 1 - Success.
* 0 - Failed. Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


