Skip to main content
Version: Next

Upload Certificate

This method allows uploading a custom certificate for a specified domain.

info

To successfully upload the certificate, ensure the certificate file begins with one of the following headers:
-----BEGIN CERTIFICATE-----
-----BEGIN X509 CERTIFICATE-----
-----BEGIN TRUSTED CERTIFICATE-----
And ends with the corresponding closing tag:
-----END CERTIFICATE-----
-----END X509 CERTIFICATE-----
-----END TRUSTED CERTIFICATE-----

Request Parameters

POST /api/clients/v1/domains/{id}/uploadCertificate/

Headers

  • Content-Type: application/json
  • Authorization: Bearer $access_token

Path

ParameterTypeConstraintsDescriptionExample
idinteger> 0, requiredDomain ID1

JSON body

ParameterTypeConstraintsDescription
certstringRequiredCertificate
ca_certstringRequiredRoot certificate
keystringRequiredCertificate private key
passwordstring0 < password < 256Password for the certificate key

Response Parameters

JSON body

ParameterTypeDescription
domain_idintegerDomain ID
domain_namestringDomain name
is_custombooleanIndicates the certificate was uploaded manually
issuerstringCertificate issuer
serialstringCertificate serial number
issue_datedatetimeCertificate issue date
expiry_datedatetimeCertificate expiration date

Examples

400 Bad Request

Invalid path or body parameters provided

{
"id": [
"A valid integer is required."
],
"detail": [
"The key does not match the certificate",
"The CA certificate does not match the domain certificate",
"Invalid SSL cert content",
"Invalid SSL private key content",
"The certificate does not match the domain name",
"The certificate has expired",
"Certificate password is too long, max length: 256"
]
}
401 Unauthorized

Authentication credentials are missing or invalid

{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid or expired"
}
]
}
403 Forbidden

Only project participants can upload the certificate

{
"detail": "Only project participants can upload certificates"
}
404 Not Found

Domain with the specified ID not found

{
"detail": "Domain not found"
}
409 Conflict

certificate already exists

{
"detail": "Certificate cannot be uploaded due to a conflict"
}