Track an event
Records one thing that happened. Your configuration decides what it does. An event named in a plan rate is usage and is charged at once. An event matching an outcome definition’s event_name creates a pending outcome charge. An event named in a reversal rule is a signal about an earlier outcome charge with the same reference. Any other event is stored unpriced, with a warning. Pass hold to capture from a hold placed by check(); the rest of the hold is released unless release_remainder is false. Tracking never fails for lack of balance, because the work already happened: a shortfall shows as an overdrawn balance and later checks are denied. Events are deduplicated on idempotency_key for 35 days.
Authentication
A secret key (rl_sk_test_..., rl_sk_live_...) or a restricted key with limited scopes (rl_rk_test_..., rl_rk_live_...). A restricted key can carry agent: true and an expires_at, and is what a coding agent should hold. Keys end in a checksum so secret scanners can recognize them. People create, roll and revoke keys in the dashboard; GET /v1/api_keys lists them, masked.
Request
The event name. Your plans, outcome definitions and reversal rules decide what it does. Once recorded, an event’s name never changes: to fix a mistake, send a correcting event.
Your ID for the thing the event is about, such as a conversation or ticket. Signals find their outcome charge by customer and reference.
Capture this event’s price from this hold (hold_...).
Your ID for the person using your product, inside this customer. Spend limits, per-member allowances and usage summaries can use it. Recorded on the hold, event and ledger entries.
Up to 50 flat key-value pairs. Reversal rule conditions read these. Price rules read them too, as the dimension values and quantities that set the price.
What shows an outcome happened, stamped on the outcome charge. Keep it short and factual; it is shown to people deciding disputes. Free text is sanitized before it reaches dashboards or agent tools.
Response
What the event turned out to be. usage: charged at once. outcome: created a pending outcome charge. signal: evaluated against reversal rules. unpriced: stored with no effect.
What shows an outcome happened, stamped on the outcome charge. Keep it short and factual; it is shown to people deciding disputes. Free text is sanitized before it reaches dashboards or agent tools.