Skip to content

Subscription-based APIs

A subscription-based API is a published API proxy that has one or more subscription plans assigned. Subscription plans define quotas, rate limits, and related controls at the organization level. When consumers use the API Platform Developer Portal, they choose an API, subscribe to the API with a plan, and generate Subscription Token according to your plan rules.

This model fits APIs where you need tiered access, usage limits, or clear commercial separation between consumer applications.

Before you begin

Assign subscription plans to the API

  1. Sign in to the API Platform Console.
  2. Select the project and the API proxy.
  3. Go to ManageMonetize.
  4. Enable the Subscription Plan Status toggle for each plan you want to offer for this API by toggling Enabled field.

    Subscription Plans page listing 3PerMin, Bronze, Gold, Silver, and Unlimited plans with all Enabled toggles turned on

For detailed steps and field behavior, see Assign Subscription Plans to APIs.

Assign Subscription Validation Policy to the API

  1. Go to DevelopPolicies.

    Policies page showing Global Policies API Level section with available policy list including API Key Auth, Basic Auth, CORS, and JWT Auth

  2. Select Subscription Validation policy.

    Configure Policy dialog showing Subscription Validation policy with description and Advanced Settings section

  3. (Optional) Configure Subscription Header/Cookie value in the policy Advanced Section.

    Subscription Validation Configure Policy dialog with Advanced Settings expanded showing subscriptionKeyHeader and subscriptionKeyCookie input fields

  4. Click Add to attach the policy to API level policy.

  5. Click Save to save the API.

    Policies page showing Subscription Validation added to Global Policies API Level section with unsaved changes warning and Save button

Deploy the API

  1. Go to Deploy and click Deploy.

    Deploy page showing Self Local Dev GW GA gateway with Active deployment status and Deploy button

Publish the API

  1. Go to ManageLifecycle.

    Lifecycle Management page showing API in Created state with Pre-release and Publish action buttons and state transition diagram

  2. Click Publish.

  3. In the publish dialog, confirm the display name and production endpoint and click Confirm. The lifecycle state becomes Published.

    Lifecycle Management page showing API in Published state with Pre-release, Demote to Created, and Deprecate action buttons

Subscribe to the API

  1. Navigate to Developer Portal by clicking Developer Portal.

    API Platform Console header showing AI Workspace and Developer Portal navigation buttons

  2. Consumers can find the API in the Developer Portal by going to APIs.

  3. Select the API and click Subscribe.

    Developer Portal API card for Reading List v1.0 REST API showing Plans count and Subscribe button

  4. Pick a Subscription plan and click Subscribe.

    Choose Your Subscription Plan dialog showing Bronze, Gold, Silver, Unlimited, and 3PerMin plans with pricing and rate limits

  5. You will receive a Subscription Token.

    Subscription Created dialog showing generated subscription token value and Subscription-Key usage instruction

Invoke the API

  1. Receive the cURL to invoke the API using the Subscription Token by navigating to the Documentation.

    API documentation page for GET /books endpoint showing Subscription-Key header field and cURL sample request with Subscription-Key

  2. Invoke the API.

    Sample Request

    curl --request GET \
    --url <api-invocation-url> \
    --header 'Accept: application/json' \
    --header 'Subscription-Key: <subscription-token>' -k
    

    Sample Response

    Terminal output of curl command returning JSON array of book objects from the reading list API