Order or renew TLS certificate
POST /tls/certificateOperation ID: CreateCertificate
Create a new TLS certificate order or renew an existing certificate. When 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.
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
sku |
tlsCertificateProduct | yes | regfish TLS certificate product identifier. (RapidSSL, RapidSSLWildcard, QuickSSLPremium, SSL123, TrueBusinessID, SecureSite, SSLWebServer) |
common_name |
fqdn_relaxed | yes | Fully Qualified Domain Name. |
dns_names |
fqdn_relaxed[] | no | — |
csr |
csr | yes | PEM encoded certificate signing request (CSR). |
dcv_method |
tlsCertificateDcvMethod | yes | (dns-cname-token, email) |
dcv_emails |
string[] |
no | — |
org_id |
tlsOrganizationId | no | Public TLS organization ID |
renewal_of_certificate_id |
tlsCertificateId | no | Public TLS certificate ID |
validity_days |
integer |
no | Purchased base order validity in days. For renewal orders this value is not reduced by any expected remaining-validity bonus from the previous certificate. If the provider credits remaining validity, the issued certificate may end up with a longer effective lifetime than this value. |
Responses
Section titled “Responses”| Status | Type | Description |
|---|---|---|
200 |
tlsCertificateResponse |
TLS certificate order created |
400 |
Error |
Invalid request payload, TLS product, or CSR |
401 |
Error |
Unauthorized |
404 |
Error |
Renewal source TLS certificate not found |
409 |
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 |
500 |
Error |
Unexpected error |
502 |
Error |
Upstream TLS provider error |
Response body
Section titled “Response body”| Field | Type | Required | Description |
|---|---|---|---|
success |
boolean |
yes | Success indicator |
code |
integer |
no | Response/Error Code |
response |
tlsCertificateResponse | no | — |
Example
Section titled “Example”curl -X POST "https://api.regfish.com/tls/certificate" \ -H "x-api-key: $REGFISH_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sku": "RapidSSL", "common_name": "www.example.com", "dns_names": [ "www.example.com" ], "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIC...\n-----END CERTIFICATE REQUEST-----", "dcv_method": "dns-cname-token", "dcv_emails": [ "string" ], "org_id": "hdl_7K9QW3M2ZT8HJ", "renewal_of_certificate_id": "7K9QW3M2ZT8HJ", "validity_days": 199 }'Build a request
Section titled “Build a request”Fill in values — the call below updates as you type. Nothing is sent: the API does not currently allow browser requests from this domain (CORS). The API key is not stored.