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
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
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"
}