Export Certificate
Endpoint
GET /apiops/projects/{projectName}/certificates/{certificateName}/export/
GET /apiops/projects/{projectName}/certificates/{certificateName}/export-file/
Both paths are the same endpoint. export-file/ is the name the key, keystore and JWK raw downloads use; export/ is the name this endpoint has always had and keeps working unchanged.
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| certificateName | string | Yes | Certificate name |
Query Parameters
None.
Response
Success Response (200 OK)
The response is a ZIP file containing certificate files.
Headers
Content-Type: application/octet-streamContent-Disposition: attachment; filename="{certificateName}-certificates.zip"Content-Length: {file-size}
Response Body
- Binary ZIP file containing:
{certificateName}-{environmentName}.cer- Certificate file for each environment
ZIP File Contents
- One .cer file per environment
- Files are named:
{certificateName}-{environmentName}.cer - Each file contains the certificate in binary DER format
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Certificate (name: my-certificate) is not found!"
}
cURL Example
curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/certificates/my-certificate/export/" \
-H "Authorization: Bearer YOUR_TOKEN" \
--output my-certificate-certificates.zip
Notes and Warnings
-
ZIP Format:
- Certificate is exported as a ZIP archive
- Contains one .cer file per environment
-
File Naming:
- Files are named:
{certificateName}-{environmentName}.cer - Example:
my-certificate-production.cer
- Files are named:
-
Certificate Format:
- Certificates are in binary DER format (.cer)
- Can be converted to PEM format if needed
-
Multiple Environments:
- ZIP contains certificates for all environments
- Each environment has its own file
Restoring what you exported
The ZIP entries are named <certificateName>-<environmentName>.cer, and Import Certificate File reads that naming back — so a multi-environment certificate can be exported and restored with each environment's own material intact.
Permissions
User must have SECRETS + EXPORT_IMPORT permission in the project.
Related Documentation
- Get Certificate - Get certificate details
- Create Certificate - Create a new certificate