Create a feature
Requires billing:write. Declares one thing your product does, that your plans may or may not include. Yours, not UserKit’s — the key is a string your code gates on, and this namespace never meets the one our own plans use.
The kind decides what else the feature must carry, in both directions:
boolean— nounit_nameand noreset_period. It counts nothing.metered— both are required. A limit with no unit is a number nobody can read, and the reset period is what makes “how much this period” answerable.credit—unit_nameis required andreset_periodis forbidden: a balance is granted and spent, never reset. The grant’s cadence belongs to the plan.
How a feature is measured is permanent once created — see PATCH /v1/organization/catalogue/features/{id}.
A feature created here is on no plan. Put it on one with PUT /v1/organization/catalogue/plans/{planId}/features/{featureId}.
Autorizações
A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange.
Cabeçalhos
The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing. Absent, the session's default organization answers.
Parâmetros de consulta
Which environment to act in. A view parameter, valid only on the staff surface — a machine credential never chooses its environment, it is resolved from the key.
live, test Corpo
Lowercase letters, digits, _, - and .. Unique within the environment. What your own code compares against.
64"api_calls"
boolean, metered, credit What one unit is called (seats, runs, tokens). Required for metered and credit, forbidden for boolean.
Required for metered and forbidden for the other kinds. billing_period is renewal to renewal rather than a calendar unit.
day, week, month, year, billing_period Resposta
The feature.
One thing your product does, that your plans may or may not include. Yours, not UserKit's — the key is a string your code gates on.
Lowercase letters, digits, _, - and .. What your own code compares against.
"api_calls"
boolean is on or off. metered is counted against a ceiling that resets. credit is spent from a balance — a counter answers “how much this period”, a balance answers “how much is left”.
boolean, metered, credit What one unit is called (seats, runs, tokens). Empty on a boolean feature and required on the others: a limit with no unit is a number nobody can read.
How a metered feature's counter is bucketed; null for the other kinds. It belongs to the feature rather than to the plan, so a counter keeps its shape when a customer changes plan mid-period.
day, week, month, year, billing_period, null