Features
A feature is something a plan controls: a capability (sso), a limit (max_projects), an option (export_format) or a usage allowance (api_calls). Features belong to one environment.
A feature key matches ^[a-z][a-z0-9_]{0,63}$, for example max_projects. Your code uses the key, so it can’t be changed after the feature is created.
The type is fixed when the feature is created.
| Type | Values | granted is true when |
|---|---|---|
boolean |
true or false |
the value is true |
number |
an integer from 0 to 9,007,199,254,740,991 (2^53−1), or "unlimited" |
a value resolved, including 0 |
enum |
one of the feature’s options, such as "csv" |
a valid option resolved |
metered |
a limit per usage period: an integer or "unlimited" |
usage is within the limit plus the grace margin; see Metered usage |
- Unlimited is a value, not a big number. A plan can say
5and an override can say"unlimited"for the same feature. Never encode unlimited as a large integer. falseand0are real values. A number feature with value0is granted and permits zero units; it isn’t “missing”.- Every number is exact in JSON and JavaScript, because it stays within 2^53−1.
- Enum options can be added later, but not removed while a plan or override uses them.
unlimitedisn’t a valid option.
Defaults
Section titled “Defaults”A feature can have an optional default_value. It applies to Customers with an eligible subscription whose plan version doesn’t include the feature. It never applies without an eligible subscription. A free tier is a real subscription to a Free plan, not a default.
Changing a feature
Section titled “Changing a feature”You can change the name, description, default_value, add enum options, and change grace_percent (metered only) at any time. The key and type never change. In the API: PATCH /v1/features/{feature_key}.