WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
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_dkimfunction to update the local DNS server's DNS records. - We recommend that you use the WHM API 1
install_dkim_private_keysandenable_dkimfunctions in a batch WHM API 1 call.
The domain for which to install an RSA private key to the local server's DKIM record.
Note:
To install RSA private keys for multiple domains, increment the parameter name. For example, use the domain-1=example-1.com, domain-2=example-2.com, and domain-3=example-3.com parameters.
An RSA key in Privacy-Enhanced Mail (PEM) format.
Note:
- You must provide this parameter for each
domainparameter. - To install multiple RSA keys for a domain, increment the parameter name. For example, use the
key-1,key-2parameters. examples: single: summary: An RSA key in Privacy-Enhanced Mail (PEM) format. value: key multiple: summary: RSA keys in Privacy-Enhanced Mail (PEM) format. value: key-1=KEYKEYKEY&key-2=KEYKEYKEY
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/install_dkim_private_keys
- A server running WHM.
https://whm-server.tld:2087/json-api/install_dkim_private_keys
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/install_dkim_private_keys?domain=string&key=AAAAB3NzaC1yc2EAAAABIwAAAQEA5kSivOqhs0U9ZMN20nxFe27QZ3t0lT2zbH7OSXylKd1rjAjYXGnSXC9j2uaZlemHlptBKVziMJC86ha7Hcj6dVOVrDQ6vF4q34bOCjtKLphQ0IjBzVIvqILH9eLJdRaOrS34CmgmPaisrCk5wKVlakygvUfcj3HzaTKS6THyZDGx5shdTpa9lby8tpOD3JceV7ay4w8r0DipoKPC0OLpvS4EABEeMo9sx8zQEaKv03XygjNCCYtFvxlQQIRGlVoL7mPaHSaL3anI05RpNbm%2FPS%2B9BhZg%2BBqNjU4ofHBbfkXk5MiN6M7ieR4Sk5BquccboGF13U5slNgmCEekdt0amw'{ "data": { "payload": [ … ] }, "metadata": { "command": "install_dkim_private_keys", "reason": "OK", "result": 1, "version": 1 } }
The domain for which to install an SPF record on the DNS server.
Note:
To install multiple SPF records, increment the parameter name. For example, use the domain-1=example-1.com, domain-2=example-2.com, and domain-3=example3.com parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/install_spf_records
- A server running WHM.
https://whm-server.tld:2087/json-api/install_spf_records
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/install_spf_records?domain=example.com&record=v%253Dspf1%2520%252Bip4%253A1192.0.2.0%2520-all'{ "data": { "payload": [ … ] }, "metadata": { "command": "install_spf_records", "reason": "OK", "result": 1, "version": 1 } }
The domain for which to remove the DMARC record.
Note:
If you do not include this argument, the system will remove all DMARC records from all domains.
To remove multiple domain DMARC records, duplicate the parameter name. For example, use the domain=example-1.com, domain=example-2.com, and domain=example-3.com parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remove_dmarc
- A server running WHM.
https://whm-server.tld:2087/json-api/remove_dmarc
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remove_dmarc?domain=string'{ "data": { "payload": [ … ] }, "metadata": { "command": "remove_dmarc", "reason": "OK", "result": 1, "version": 1 } }