To export a certificate from a specified key pair, the GET /environments/{environmentId}/key/{keyId} operation downloads a certificate file in the specified file format. This operation requires a Content-type header in the request that specifies the certificate file type. Options are Content-type: application/x-pkcs7-ca-cert or Content-type: application/x-x509-ca-cert.

The sample shows an export operation to download a certificate in PKCS7 DER format.

The downloaded certificate file has a .p7b file extension.