I am trying to automate the creation/renewal of Let's Encrypt certs through the REST API, but I cannot seem to get POST /system_certificate_local/automated to execute properly.
Even following the example formatting, I still can't get it to work. I can upload certs using the API with POST /system_certificate_localut only the automated portion gives me issues.
I can create an automated cert in the GUI using both ACME and DNS-01 challenge, so I know it is possible.
I am on v7.4 if that adds any context.
Hi @andrewr9072,
You may use this curl command sample to send the POST request.
curl -ik -H "Accept: application/json" -H "Content-Type: application/json" -H "APITOKEN: <REST_API-TOKEN>" -X POST https://<FADC-IP>/api/system_certificate_local/automated -d payload.json
Use JSON payload format below and save it as a JSON file.
{
"ca_group": "",
"challenge_wait": "1",
"domain": "<your-domain>",
"email": "<your-email>",
"key_size": "2048",
"key_type": "RSA",
"mkey": "<certificate-name>",
"passwd": "",
"acme_service":"encrypt",
"challenge_type":"dns-01"
"vdom": "root"
}
You will then get a response that looks like below.
{"payload":{"Content":"q30tlfF8_gBFSvJ8ZNSk6IWRGgFR1C8VsWgxYVaThoU","Domain":"<your-domain>","Note":"Some DNS managers add quotes automatically, A single set is needed","Record":"_acme-challenge.<your-domain>","Type":"TXT"}}
Please let me know if this does not work. Thanks.
Regards,
Shafiq
User | Count |
---|---|
2593 | |
1382 | |
800 | |
659 | |
455 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.