--- title: "RegisterPrivateKey" slug: "security-certificatemanager-registerprivatekey" updated: 2026-10-08T07:20:03Z published: 2026-10-08T07:20:03Z canonical: "api.ncloud-docs.com/security-certificatemanager-registerprivatekey" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # RegisterPrivateKey Classic/VPC環境で利用できます。 証明書の秘密鍵を登録します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | POST | /api/v2/certificate/registPrivateKey | ### リクエストヘッダ Certificate Manager APIで共通して使用されるヘッダの詳細は、[Certificate Managerのリクエストヘッダ](/docs/ja/security-certificatemanager#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)をご参照ください。 ### リクエストボディ リクエストボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `certificateNo` | Integer | Required | 証明書番号 | | `privateKey` | String | Required | 証明書秘密鍵の PEMファイル | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl --location --request POST 'https://certificatemanager.apigw.ntruss.com/api/v2/certificate/registPrivateKey' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --header 'Content-Type: application/json' \ --header 'accept: application/json' \ --data '{ "certificateNo": 1234, "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEA...\n-----END RSA PRIVATE KEY-----" }' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンスボディ レスポンスボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `returnCode` | String | - | レスポンスコード | | `returnMessage` | String | - | レスポンスメッセージ | | `totalRows` | Integer | - | 照会されたリストの総数 | ### レスポンスステータスコード Certificate Manager APIで共通して使用されるレスポンスステータスコードの詳細は、[Certificate Managerのレスポンスステータスコード](/docs/ja/security-certificatemanager#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` { "returnCode": "0", "returnMessage": "Success", "totalRows": 0 } ```