A valid request URL is required to generate request examples{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "api_calls",
"name": "<string>",
"description": "<string>",
"kind": "boolean",
"unit_name": "<string>",
"reset_period": "day",
"archived": true,
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}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}.
A valid request URL is required to generate request examples{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "api_calls",
"name": "<string>",
"description": "<string>",
"kind": "boolean",
"unit_name": "<string>",
"reset_period": "day",
"archived": true,
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}Autorizações
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: the answer is not_a_member (403), which does not mean the session is over. Absent, the session's default organization answers, or — if that membership was revoked while the session was open — any other one the caller still holds.
Parâmetros de consulta
Corpo
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.