TLS API-Referenz
v1.6.2
OpenAPI herunterladen
Order or renew TLS certificate
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.
POST
/tls/certificate
TLSCertificates

Authentifizierung

x-api-keyapplication/json

Request Body

application/jsonPflicht
TLS certificate order payload
tlsCertificateRequest
tlsCertificateRequest
{
  "sku": "RapidSSL",
  "common_name": "www.example.com",
  "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIC...\n-----END CERTIFICATE REQUEST-----",
  "dcv_method": "dns-cname-token"
}

Felder

Name
Typ
Format
Pflicht
Description
sku
RapidSSL, RapidSSLWildcard, QuickSSLPremium, SSL123, TrueBusinessID, SecureSite, SSLWebServer
string
Pflicht
regfish TLS certificate product identifier.
common_name
string
Pflicht
Fully Qualified Domain Name.
dns_names
array<string>
Optional
csr
string
Pflicht
PEM encoded certificate signing request (CSR).
dcv_method
dns-cname-token, email
string
Pflicht
dcv_emails
array<string>
Optional
org_id
string
Optional
Public TLS organization ID
renewal_of_certificate_id
string
Optional
Public TLS certificate ID
validity_days
integer
Optional
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.

Request-Beispiel

POST
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

200
TLS certificate order created
application/jsontlsCertificateResponse
Response-Beispiel 200
{
  "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."
        }
      ]
    }
  }
}
400
Invalid request payload, TLS product, or CSR
application/jsonError
Response-Beispiel 400
{
  "success": false,
  "message": "Invalid request payload, TLS product, or CSR",
  "error": "Invalid request payload, TLS product, or CSR"
}
401
Unauthorized
application/jsonError
Response-Beispiel 401
{
  "success": false,
  "message": "Unauthorized",
  "error": "Unauthorized"
}
404
Renewal source TLS certificate not found
application/jsonError
Response-Beispiel 404
{
  "success": false,
  "message": "Renewal source TLS certificate not found",
  "error": "Renewal source TLS certificate not found"
}
409
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
application/jsonError
Response-Beispiel 409
{
  "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"
}
500
Unexpected error
application/jsonError
Response-Beispiel 500
{
  "success": false,
  "message": "Unexpected error",
  "error": "Unexpected error"
}
502
Upstream TLS provider error
application/jsonError
Response-Beispiel 502
{
  "success": false,
  "message": "Upstream TLS provider error",
  "error": "Upstream TLS provider error"
}
Verwandte Modelle
Community

Werde ein Teil der Community

Das DNS API von Regfish ist die perfekte Lösung für Entwickler, die ihre Domains und DNS-Zonen automatisieren möchten. Werde Teil der Community und profitiere von den Vorteilen der DNS-Automatisierung. Das DNS API steht jedem Regfish-Kunden kostenlos zur Verfügung.