Upload Certificate
Upload Certificate.
Request
Request-Line
POST /sfd/v2.0/certs HTTP/1.1
Request Parameters
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| certificate | String | Mandatory | Certificate. |
| privateKey | String | Mandatory | Private Key. |
| chain | String | Optional | Chain. |
Response
Response Body
| Property name | Type | Required | Description |
|---|---|---|---|
| id | Long | Mandatory | Unique identifier of the certificate record. |
| customerId | Integer | Mandatory | The certificate under customer ID. |
| commonName | String | Mandatory | Common name. |
| subjectAlternativeNames | String | Mandatory | Subject alternative names. |
| serialNumber | String | Mandatory | Serial number. |
| issuer | String | Mandatory | Issuer. |
| organization | String | Optional | Organization. |
| organizationalUnit | String | Optional | Organizational unit. |
| country | String | Mandatory | Country. |
| stateOrProvince | String | Optional | State or province. |
| locality | String | Optional | Locality. |
| validFrom | String | Mandatory | Validity period start time in UTC. |
| validTo | String | Mandatory | Validity period end time in UTC. |
| created | String | Mandatory | Created time in UTC. |
| expireIn | Integer | Mandatory | Remaining days before the certificate expireds. |
Time Format: All timestamps use ISO 8601 format without milliseconds:
yyyy-MM-dd'T'HH:mm:ss'Z'. Example:2025-06-25T08:59:38Z
Status Codes, Error Codes and Error Messages
| Status Code | Error Code | Error Message |
|---|---|---|
| 400 | Certificate.Invalid | Certificate is empty or invalid. |
| 400 | PrivateKey.Invalid | PrivateKey is empty or invalid. |
| 400 | Upload.Certificate.Invalid | Upload certificate has error. |
| 400 | Certificate.Invalid | Certificate or privateKey invalid. |
Examples
Upload Certificate
Request
POST /sfd/v2.0/certs HTTP/1.1
{
"certificate": "-----BEGIN CERTIFICATE-----\n[Base64-encoded certificate data]\n-----END CERTIFICATE-----",
"privateKey": "-----BEGIN RSA PRIVATE KEY-----\n[Base64-encoded PKCS#1 private key data]\n-----END RSA PRIVATE KEY-----",
"chain": "-----BEGIN CERTIFICATE-----\n[Base64-encoded certificate data]\n-----END CERTIFICATE-----\n[Base64-encoded certificate data]\n-----BEGIN CERTIFICATE-----"
}
Successful Response Body
{
"id": 2356,
"customerId": 123,
"commonName": "*.example.org",
"subjectAlternativeNames": "DNS:*.example.org, DNS:example.org",
"serialNumber": "231272262238822062748024707871705586383",
"issuer": "DigiCert Global G3 TLS ECC SHA384 2020 CA1",
"organization": "",
"organizationalUnit": "",
"country": "CN",
"stateOrProvince": "",
"locality": "",
"validFrom": "2024-06-25T08:59:38Z",
"validTo": "2025-06-25T08:59:38Z",
"created": "2024-06-25T13:33:18Z",
"expireIn": 358
}