[Yandex Cloud documentation](../../../../../index.md) > [Yandex Certificate Manager](../../../../index.md) > API reference > gRPC > [Certificate Manager Private CA API](../index.md) > [PrivateCaCertificateContent](index.md) > GetPrivateKey

# Certificate Manager Private CA API, gRPC: PrivateCaCertificateContentService.GetPrivateKey

Returns the private key for the specified certificate.

## gRPC request

**rpc GetPrivateKey ([GetCertificatePrivateKeyRequest](#yandex.cloud.certificatemanager.v1.privateca.GetCertificatePrivateKeyRequest)) returns ([GetCertificatePrivateKeyResponse](#yandex.cloud.certificatemanager.v1.privateca.GetCertificatePrivateKeyResponse))**

## GetCertificatePrivateKeyRequest {#yandex.cloud.certificatemanager.v1.privateca.GetCertificatePrivateKeyRequest}

```json
{
  "certificate_id": "string"
}
```

Request message for GetPrivateKey.

#|
||Field | Description ||
|| certificate_id | **string**

Required field. ID of the certificate to get the private key for.

The maximum string length in characters is 50. ||
|#

## GetCertificatePrivateKeyResponse {#yandex.cloud.certificatemanager.v1.privateca.GetCertificatePrivateKeyResponse}

```json
{
  "certificate_id": "string",
  "private_key": "string"
}
```

Response message containing the private key.

#|
||Field | Description ||
|| certificate_id | **string**

ID of the certificate. ||
|| private_key | **string**

The private key in PEM format. ||
|#