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.
| Action | Parameters | Description |
|---|---|---|
list | — | All AutoSSL certificates on the server |
add | user, name | Install a certificate for domain name of account user. The domain must point to the server. |
renew | user, name | Renew the certificate now |
del | user, name | Remove 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"}.