Domains, DNS, hosting and email from a single source.
Resources & Support



This recipe covers a security-critical flow: an existing certificate must be revoked while a replacement needs to be rolled out quickly. With the new re-issue endpoint, that replacement now belongs on the same order instead of being modeled as a completely new certificate order.
The distinction matters here: this is not a renewal flow. For a planned move into a new order or contract period, use create-certificate with renewal_of_certificate_id instead.
id of the compromised certificateIf a key has been compromised or a certificate must be replaced, start by sending the revocation request with a suitable reason to the provider.
curl --request POST \
--url 'https://api.regfish.com/tls/certificate/7K9QW3M2ZT8HJ/revoke' \
--header 'content-type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '
{
"comment": "Automatic revocation after key compromise incident",
"revocation_reason": "key_compromise"
}
'Immediately after that, trigger the re-issue on the same certificate id. For compromised keys, a new CSR is essential so the replacement certificate does not depend on the old key material.
curl --request POST \
--url 'https://api.regfish.com/tls/certificate/7K9QW3M2ZT8HJ/reissue' \
--header 'content-type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '
{
"csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIC...NEW...\n-----END CERTIFICATE REQUEST-----",
"dcv_method": "dns-cname-token",
"comments": "Automatic reissue after key compromise incident"
}
'The original certificate id stays the same. That is the key difference compared with the previous reorder flow.
Take the required DCV record from the re-issue response or from response.reissue.validation.dns_records and update the existing _dnsauth entry, preferably through PATCH /dns/rr.
curl --request PATCH \
--url 'https://api.regfish.com/dns/rr' \
--header 'content-type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '
{
"type": "CNAME",
"name": "_dnsauth.example.com",
"data": "0123456789abcdef.dcv.digicert.com.",
"ttl": 300
}
'If the DCV record does not exist yet, the workflow falls back to POST /dns/rr for this step.
idThen poll the same certificate order until the re-issue has been issued and the replacement certificate is ready for download.
curl --request GET \
--url 'https://api.regfish.com/tls/certificate/7K9QW3M2ZT8HJ' \
--header 'x-api-key: YOUR_API_KEY'Pay close attention to:
reissue.statusreissue.order_statereissue.validationcertificate_pem_availableOnce the re-issue has completed, download the replacement certificate through the same certificate id and pass it into the next deployment step.
curl --request GET \
--url 'https://api.regfish.com/tls/certificate/7K9QW3M2ZT8HJ/download/pem' \
--header 'x-api-key: YOUR_API_KEY' \
--output 'replacement-7K9QW3M2ZT8HJ.pem'id was revoked and then replaced through re-issueThis workflow responds to compromise not only with revocation, but with a complete and traceable replacement on the same order. That is exactly where the new re-issue endpoint is a better fit than creating a separate replacement order.
The regfish DNS API is a great solution for developers who want to automate domains and DNS zones. Become part of the community and benefit from DNS automation. The DNS API is available free of charge to every regfish customer.