--- title: "APIの作成" slug: "apigateway-api-create" updated: 2026-09-17T09:57:24Z published: 2026-09-17T09:57:24Z canonical: "api.ncloud-docs.com/apigateway-api-create" --- > ## 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. # APIの作成 Classic/VPC環境で利用できます。 新規の APIを作成します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | POST | /products/{product-id}/apis | ### リクエストヘッダ API Gatewayで共通して使用されるヘッダの詳細は、[API Gatewayのリクエストヘッダ](/docs/ja/ai-application-service-apigateway#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)をご参照ください。 ### リクエストパスパラメータ パラメータの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `product-id` | String | Required | APIと関連付けられた Product ID | ### リクエスト構文 リクエスト構文は次の通りです。 ``` { "apiName" : "apiName", "apiDescription" : "apiDescription" } ``` ### リクエストボディ リクエストボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `apiName` | String | Required | 作成する APIの名前 - 英数字、記号の「-」、「_」を使用して1~20文字以内で入力 | | `apiDescription` | String | Optional | 作成する APIの説明 - 0~300文字 | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl -X POST 'https://apigateway.apigw.ntruss.com/api/v1/products/{product-id}/apis' \ --header 'Content-Type: application/json' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \ --data '{ "apiName" : "api-***", "apiDescription" : "api-*** Description" }' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンス構文 レスポンス構文は次の通りです。 ``` { "api": { "productId": "productId", "apiId": "apiId", "apiName": "apiName", "apiDescription": "apiDescription", "tenantId": "tenantId", "modifier": "modifier", "modTime": "2024-05-13T01:58:13Z", "isDeleted": false, "domainCode": "PUB" } } ``` ### レスポンスステータスコード API Gatewayで共通して使用されるレスポンスステータスコードの詳細は、[API Gatewayのレスポンスステータスコード](/docs/ja/ai-application-service-apigateway#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` { "api": { "productId": "*****xn0bk", "apiId": "*****7kqa1", "apiName": "api-***", "apiDescription": "api-*** Description", "tenantId": "*****02f55ae4436913a6e2c65bab47c", "modifier": "d12c9fd0-****-****-****-246e96591a38", "modTime": "2024-05-13T01:58:13Z", "isDeleted": false, "domainCode": "PUB" } } ```