v5

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2026-07-0330110112.1 KB
Subscriptions

Create or update API Subscriptions from Subscription Spec

Create/update API Subscription from Subscription Spec

put/organizations/{orgId}/environments/{envId}/apis/{apiHrid}/subscriptions

Path parameters

orgIdstring required
Example:dedd0e0f-b3e9-4d2f-89cd-b2a9de7cb145

organization ID

envIdstring required
Example:a44e0d1b-9fa9-4d64-8b76-3634623a2e27

environment ID

apiHridstring required
Example:my_demo_api

Human-readable ID of api

Request body

hridstring required

A unique human readable id identifying this resource

applicationHridstring required

Application's hrid selected to subscribe an API.

planHridstring required

API plan's hrid

endingAtstring date-time
metadataobject

Key-value metadata for this subscription.

Example request

{
  "hrid": "demo_api",
  "applicationHrid": "demo-app",
  "planHrid": "demo-plan",
  "endingAt": "2040-12-25T09:12:28Z",
  "metadata": {
    "key1": "value1",
    "key2": "value2"
  },
  "apiKeys": [
    {
      "key": "my-custom-api-key",
      "expireAt": "2040-12-25T09:12:28Z"
    }
  ],
  "consumerConfiguration": {
    "entrypointId": "webhook",
    "channel": "/channel1"
  }
}

Response

State of the successfully created Subscription

hridstring required

A unique human readable id identifying this resource

applicationHridstring required

Application's hrid selected to subscribe an API.

planHridstring required

API plan's hrid

endingAtstring date-time
metadataobject

Key-value metadata for this subscription.

idstring

Resource UUID.

environmentIdstring

The environment ID.

organizationIdstring

The organization ID.

apiHridstring

The API's Hrid.

startingAtstring date-time

Start validity date time of this Subscription

Example response

{
  "hrid": "demo_api",
  "applicationHrid": "demo-app",
  "planHrid": "demo-plan",
  "endingAt": "2040-12-25T09:12:28Z",
  "metadata": {
    "key1": "value1",
    "key2": "value2"
  },
  "apiKeys": [
    {
      "key": "my-custom-api-key",
      "expireAt": "2040-12-25T09:12:28Z"
    }
  ],
  "consumerConfiguration": {
    "entrypointId": "webhook",
    "channel": "/channel1"
  },
  "apiHrid": "demo-api",
  "startingAt": "2040-12-25T09:12:28+01:00"
}