Order or renew TLS certificate
renewal_of_certificate_id is set, validity_days still describes the purchased base term. If the provider accepts the renewal, any remaining validity from the previous certificate may be added after issuance. OV and EV-style products can return action_required=true together with a completion_url when additional organization or validation details are needed before submission.Authentication
Request body
{
"sku": "RapidSSL",
"common_name": "www.example.com",
"csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIC...\n-----END CERTIFICATE REQUEST-----",
"dcv_method": "dns-cname-token"
}Fields
Request example
curl --request POST \
--url 'https://api.regfish.com/tls/certificate' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'content-type: application/json' \
--data '{
"sku": "RapidSSL",
"common_name": "www.example.com",
"csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIC...\n-----END CERTIFICATE REQUEST-----",
"dcv_method": "dns-cname-token"
}'Responses
{
"success": true,
"code": 0,
"response": {
"id": "ABCDEFGHJKM23",
"status": "pending",
"common_name": "example.com",
"product": "RapidSSL",
"provider": "digicert",
"dns_names": [
"www.example.com"
],
"order_state": "PENDING",
"action_required": false,
"pending_reason": "validation_pending",
"pending_message": "The TLS certificate order is waiting for domain validation.",
"completion_url": "",
"organization_id": null,
"validity_days": 199,
"certificate_pem_available": false,
"validation": {
"method": "dns-cname-token",
"dns_records": [
{
"name": "_dnsauth.example.com.",
"type": "CNAME",
"value": "0123456789abcdef.dcv.digicert.com."
}
]
}
}
}{
"success": false,
"message": "Invalid request payload, TLS product, or CSR",
"error": "Invalid request payload, TLS product, or CSR"
}{
"success": false,
"message": "Unauthorized",
"error": "Unauthorized"
}{
"success": false,
"message": "Renewal source TLS certificate not found",
"error": "Renewal source TLS certificate not found"
}{
"success": false,
"message": "The TLS certificate order cannot be submitted in its current state, for example because the renewal is invalid or a usable CA organization is missing",
"error": "The TLS certificate order cannot be submitted in its current state, for example because the renewal is invalid or a usable CA organization is missing"
}{
"success": false,
"message": "Unexpected error",
"error": "Unexpected error"
}{
"success": false,
"message": "Upstream TLS provider error",
"error": "Upstream TLS provider error"
}Become part of the community
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.