REST API Download Certificate
Download Certificate HTTPS GET
We are giving you several possibilities to get your certificates via ZeroSSL API.
To download a certificate using the ZeroSSL API, you can use the download endpoint and pass the given certificate ID (hash) to the API to the URL inside the {id} parameter.
Parameter {method} gives you the possibility to download the certificate in different formats, which are described below.
API Request URL:
api.zerossl.com/certificates/{id}/download/{method}?access_key=...
HTTPS GET Request Parameters:
| Parameter | Description |
|---|---|
access_key |
[Required] Use this parameter to specify your API access key. |
{id} |
[Required] Use this parameter to specify your certificate ID / hash. |
{method} |
[Optional] Use this parameter to specify response format you want to get your certificate.
|
include_cross_signed |
Set this parameter to 1 to include the cross signed certificate in the response. When pem method is used, this parameter is ignored. (further information). |
API Responses based on method parameter:
zip:
If your API request is successful, the ZeroSSL API will return your certificate files wrapped in a ZIP-file.
json:
If your API request is successful, the ZeroSSL API will return your certificate files in JSON format. You will find an example API response carrying an example certificate below:
{
"certificate.crt": "---BEGIN CERTIFICATE---{primary_certificate}---END CERTIFICATE---",
"ca_bundle.crt": "---BEGIN CERTIFICATE---{certificate_bundle}---END CERTIFICATE---"
}
Response attributes:
| Parameter | Description |
|---|---|
certificate.crt |
certificate.crtReturns your primary certificate file. |
ca_bundle.crt |
ca_bundle.crtReturns your certificate bundle file. |
return (deprecated):
This method is deprecated and will be removed in the future. Please use json instead.
pem:
If your API request is successful, the ZeroSSL API will return your primary certificate in plain text format.
chain:
If your API request is successful, the ZeroSSL API will return your certificate bundle in plain text format.
xml:
If your API request is successful, the ZeroSSL API will return your certificate files in XML format.