Upload Certificate
Upload a PEM-encoded certificate plus its private key for use on custom-domain endpoints. Once uploaded, attach the cert to one or more endpoints via PUT /v1/endpoints/{uuid}/certificate.
The private key is encrypted at rest with the platform's certificate encryption key (set via SECURITY_CERT_ENCRYPTION_KEY on the api-server). It can never be retrieved through the API — to rotate, delete and re-upload.
Both PEM blocks must parse cleanly. The cert's public key must match the supplied private key (verified server-side). Intermediate CA chains can be appended to the cert_pem as additional -----BEGIN CERTIFICATE----- blocks; the platform serves the full chain in the TLS handshake.
Requires the custom_ssl entitlement on your plan.
Request body
-----BEGIN CERTIFICATE----- required.uuid from /domains/available). It must be your active account's own domain; the certificate becomes that domain's default.Deprecated: domain_id (integer) is still accepted until the sunset. Send domain_uuid; sending both for different objects is a 400 id_uuid_mismatch.
Response (200 OK)
An acknowledgement object. To retrieve the stored certificate object, call GET /v1/certificates/self.
true on success.Deprecated: until the sunset this response also carries the legacy integer domain_id. Don't use it; read domain_uuid.
Errors
Please select a domain for this certificate.), malformed PEM, cert/key mismatch, expired cert (not_after in the past), unsupported key algorithm, domain_id and domain_uuid naming different domains (id_uuid_mismatch), or an integer domain_id after the sunset (integer_id_unsupported).custom_ssl entitlement.Domain not found. — unknown domain, or another account's (both read the same).