Skip to main content
POST
Typescript (SDK)

Body Parameters

Response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string
default:2.3.0
required

Body

application/json
customer_id
string
required

The ID of the customer.

feature_id
string
required

The ID of the feature.

entity_id
string

The ID of the entity for entity-scoped balances (e.g., per-seat limits).

included_grant
number

The initial balance amount to grant. For metered features, this is the number of units the customer can use.

unlimited
boolean

If true, the balance has unlimited usage. Cannot be combined with 'included_grant'.

reset
object

Reset configuration for the balance. If not provided, the balance is a one-time grant that never resets.

rollover
object

Rollover configuration for the balance.

expires_at
number

Unix timestamp (milliseconds) when the balance expires. Mutually exclusive with reset.

next_reset_at
number

Unix timestamp (milliseconds) for the first reset boundary, allowing a custom (e.g. shorter) first period. Requires 'reset', and must occur before 'expires_at' if both are provided. Subsequent resets advance by one reset interval from this boundary.

balance_id
string

A unique identifier for this balance. Use this to target the balance in future update / delete calls.

Response

200 - application/json

OK

success
boolean
required