Skip to content
CWPControl Web PanelDocumentation

AutoSSL and DKIM

Updated

These functions install free Let’s Encrypt certificates (autossl) and DKIM email signing keys (dkim).

AutoSSL (autossl)

URL: https://YOUR-SERVER:2304/v1/autossl/ — permission AutoSSL.

ActionParametersDescription
list—All AutoSSL certificates on the server
adduser, nameInstall a certificate for domain name of account user. The domain must point to the server.
renewuser, nameRenew the certificate now
deluser, nameRemove the certificate

List certificates

curl -k -X POST https://203.0.113.10:2304/v1/autossl/ -d "key=YOUR_API_KEY&action=list"
{"status":"OK","msj":[{"ssl":"example.com","autossl":"on","user":"john","exp":364}]}

exp is the number of days until the certificate expires. Filter the list by user in your code — send list without the user parameter.

Install a certificate

curl -k -X POST https://203.0.113.10:2304/v1/autossl/ -d "key=YOUR_API_KEY&action=add&user=john&name=example.com"

Certificates renew automatically; renew is only needed to force a renewal.

DKIM (dkim)

URL: https://YOUR-SERVER:2304/v1/dkim/ — permission Dkim (Domain). Only add is available; it creates the DKIM key and DNS record for a domain so its outgoing email is signed.

curl -k -X POST https://203.0.113.10:2304/v1/dkim/ -d "key=YOUR_API_KEY&action=add&user=john&domain=example.com"
{"status":"OK"}

Other actions return {"status":"Error","result":"Invalid function"}.

Related