Documentation Index
Fetch the complete documentation index at: https://docs.flowsbuilt.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
event() records a single behavioral event. Events are the primary signal ChurnKit uses to calculate churn risk — frequent, diverse events indicate healthy engagement, while gaps or negative events (e.g. support tickets) raise risk scores.
Signature
Parameters
The user who performed the action.
Event name — use
snake_case by convention. Must be non-empty.Optional key-value metadata. Values must be
string | number | boolean | null.Cancel the request via an
AbortSignal.What events to track
Track events that signal engagement or disengagement:Examples
Simple event
Event with properties
In a Next.js Route Handler
Fire and forget (non-blocking)
Return value
Errors
| Code | When |
|---|---|
VALIDATION_ERROR | userId or event is empty |
UNAUTHORIZED | API key is invalid |
RATE_LIMITED | Too many requests — back off and retry |
TIMEOUT | Request exceeded timeout |