Skip to main content
POST
/
api
/
v1
/
subscriptions
/
{id}
/
add-feature
Add Feature to Subscription
curl --request POST \
  --url https://app.flowglad.com/api/v1/subscriptions/{id}/add-feature \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "featureId": "<string>",
  "featureSlug": "<string>",
  "grantCreditsImmediately": false
}
'
{
  "subscriptionItemFeature": {
    "id": "<string>",
    "createdAt": 0,
    "updatedAt": 0,
    "livemode": true,
    "subscriptionItemId": "<string>",
    "featureId": "<string>",
    "type": "<string>",
    "manuallyCreated": true,
    "pricingModelId": "<string>",
    "name": "<string>",
    "slug": "<string>",
    "productFeatureId": "<string>",
    "amount": "<unknown>",
    "usageMeterId": "<unknown>",
    "renewalFrequency": "<unknown>",
    "expiredAt": 0,
    "detachedAt": 0,
    "detachedReason": "<string>",
    "resourceId": "<unknown>"
  }
}

Authorizations

Authorization
string
header
required

Path Parameters

id
string
required

The subscription ID

Body

application/json
featureId
string

The feature ID to add. Exactly one of featureId or featureSlug must be provided.

featureSlug
string

The feature slug to add. The feature will be resolved from the subscription pricing model. Exactly one of featureId or featureSlug must be provided.

grantCreditsImmediately
boolean
default:false

If true and the feature is a usage credit grant, credits will be granted immediately for the current billing period

Response

Successful response

subscriptionItemFeature
object
required