TheDocumentation Index
Fetch the complete documentation index at: https://docs.vibefollow.com/llms.txt
Use this file to discover all available pages before exploring further.
vf.users resource handles user upsert and lifecycle event emission. It wraps POST /api/v1/users (for identify) and POST /api/v1/events (for every helper).
identify(userId, traits)
Upserts a user. Same call works for first-touch and updates — the backend deduplicates by external_user_id.
Your primary key for the user. Used as
external_user_id server-side. Stable across re-identifies.Trait bag. The known fields
email, name, plan, signupDate, company, role are stored in dedicated columns; everything else flows into the traits JSON column.Promise<void>. Throws on validation / network / auth failure — see Errors.
Lifecycle helpers
All nine returnPromise<void> and emit the canonical event name from STANDARD_EVENT_NAMES. Properties are optional unless flagged required.
signedUp(userId, properties?)
Emits user_signed_up.
External user ID.
Plan the user signed up on (
trial, pro, enterprise).Marketing source (
organic, referral, ads, …).trialStarted(userId, properties?)
Emits trial_started.
Duration of the trial in days.
featureUsed(userId, properties)
Emits feature_used. feature is required.
Stable feature identifier (snake_case recommended).
Times used in this interaction. Default
1 server-side.onboardingStep(userId, properties)
Emits onboarding_step. step is required.
Onboarding step identifier.
Whether this step was just completed (
true) or merely started (false).subscriptionChanged(userId, properties)
Emits subscription_changed. to is required. interval is denormalised onto the user row for audience filters.
Previous plan.
New plan.
Billing interval.
Monthly recurring revenue, in cents.
9900 = $99/mo.subscriptionCancelled(userId, properties?)
Emits subscription_cancelled. Flips the user to the cancelled lifecycle stage (active-but-departing). Distinct from churned (truly gone after grace period).
Free-text cancellation reason.
ISO 8601 timestamp at which access actually ends. Defaults to “now” server-side if omitted.
paymentFailed(userId, properties?)
Emits payment_failed.
Decline reason from your billing system (
card_declined, insufficient_funds, …).trialExpiring(userId, properties)
Emits trial_expiring. daysLeft is required.
Days remaining in the trial. Your billing system controls the cadence.
userInvited(userId, properties)
Emits user_invited. invitedEmail is required.
Email address that received the invitation.
Why typed helpers vs events.track()
You can emit the same nine events through vf.events.track('user_signed_up', …). You shouldn’t, because:
Typo protection
signedUp autocompletes; siignedUp is a type error.Property shapes
Validated by TypeScript at the call site, not just server-side.
Discoverable
vf.users.<dot> lists the canonical set in IDE autocomplete.events.track().