> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apinizer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Certificate

> Exports a certificate as a ZIP file containing certificate files for all environments. Each environment certificate is included as a separate .cer file in the ZIP archive.

## Endpoint

```
GET /apiops/projects/{projectName}/certificates/{certificateName}/export/
```

## 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-stream`
* `Content-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)

```json theme={null}
{
  "error": "bad_request",
  "error_description": "Certificate (name: my-certificate) is not found!"
}
```

## cURL Example

```bash theme={null}
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`

* **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

## Permissions

User must have **`SECRETS` + `EXPORT_IMPORT`** permission in the project.

## Related Documentation

* [Get Certificate](/api-reference/keys-secrets/crud/get-certificate) - Get certificate details
* [Create Certificate](/api-reference/keys-secrets/crud/create-certificate) - Create a new certificate
