API7 Docs
API7 GatewayAPI7 Enterprise Developer Portal APIsCreate a subscription for an API Product

Create a subscription for an API Product

POST /api/subscriptions

POST /api/subscriptions

Interactive request editor loads with JavaScript.

Authorization

BearerAuth DeveloperIDHeader
AuthorizationBearer <token>

In: header

X-Portal-Developer-ID<token>

In: header

Request Body

application/json

The request body for creating subscriptions.

Response Body

application/json

application/json

curl -X POST "$API_BASE_URL/api/subscriptions" \  -H "Content-Type: application/json" \  -d '{    "applications": [      "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"    ],    "api_products": [      "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101"    ]  }'

The resource was created successfully.

Complete operation details and schema variants

POST /api/subscriptions

Create a subscription for an API Product

Parameters

Request body

Content type: application/json

  • applications (array, required):
  • api_products (array, required):

Responses

  • 201: The resource was created successfully.
  • 400: Bad request.
  • status (integer, required): The HTTP status code of the error response.
  • message (string, required): The error message.
  • 401: Unauthorized. Response fields (application/json): identical to POST /api/subscriptions, response 400 above.
  • 500: Internal server error.

cURL

curl -X POST '$API_BASE_URL/api/subscriptions'