Skip to main content
Omit featureKey to get every QUOTA feature’s current usage record in one call:
Each record: { id, feature_key, value, period_start, period_end, status, ... } - one per feature per open billing period. For the derived remaining/limit view (accounting for overrides and rollover), prefer useAccess or useEntitlements - this hook is the raw counter.

Recording usage

useReportUsage() is the write side, always for the signed-in user:
  • consume(featureKey, { delta, dimension }) - checks the limit and records, returns the resulting EntitlementCheck. Throws a ValidationError (with .fields) if delta isn’t a whole number.
  • report(featureKey, { delta, operation, dimension }) - records without a limit check. dimension routes the write to the same per-machine/per-project/per-seat counter as consume(), but is never required here - omit it and the write lands on the feature’s shared counter instead.
  • reportBatch(events) - up to 100 at once; returns { index, status, usage?, error? }[], one bad event doesn’t sink the rest.