Overview
The Flywheel Events API allows you to track user actions, behaviors, and interactions with your product. Events are the foundation for building comprehensive user profiles and triggering automated workflows in Flywheel. Events represent any meaningful user action you want to track and analyze, such as:- User signups and registrations
- Product purchases and transactions
- Page views and navigation
- Feature usage and engagement
- Profile updates and changes
Authentication
All events endpoints require authentication using an API key and authentication type header. Include both headers in your requests:User Identification
The identify
Parameter
The identify
parameter is a powerful boolean flag that controls whether user identification and profile updates occur before the event is processed. When set to true
, Flywheel will:
- Extract User Data: Pull identifiable information from the event properties
- Find or Create User: Locate existing users or create new profiles
- Update Profile: Merge new information with existing user data
- Link Event: Associate the event with the identified user
When to Use identify: true
Use the identify parameter when your event contains user profile information that should update the user’s record:
Identifiable Properties
Whenidentify: true
is set, Flywheel extracts these properties from the event data to update user profiles:
- email: User’s email address
- first_name: User’s first name
- last_name: User’s last name
- full_name: Full name (automatically split into first/last)
- phone: Phone number
- primary_email: Primary email address
- primary_phone: Primary phone number
- stripe_customer_id: Stripe customer identifier
User Lookup Priority
Flywheel uses this priority order to find existing users:- Direct user ID (
user_id
parameter) - Organization assigned user ID (
org_assigned_user_id
) - Identifiable properties in order:
stripe_customer_id
email
anonymous_id
primary_email
primary_phone
phone
Examples with identify
User Registration with Profile Data
Performance Considerations
- Use sparingly: Only set
identify: true
when you need to update user profiles - Batch updates: Consider batching profile updates rather than identifying on every event
- Profile-specific events: Best used for events that inherently involve profile changes
Event Properties
Event properties can include any additional data relevant to the event:Supported Property Types
- String: Text values, names, IDs
- Number: Prices, quantities, scores, durations
- Boolean: True/false flags
- DateTime: ISO 8601 formatted timestamps
Property Examples
Anonymous Events
You can track events for users who haven’t been identified yet using theanonymous_id
parameter:
Endpoints
The following endpoint is available with interactive API playground for testing:Event Processing
All events are processed through Flywheel’s event pipeline which:- Validates the event data against your schema (if configured)
- Identifies the user (if
identify: true
is set) - Stores the event in your organization’s database
- Triggers any configured workflows and automations
- Updates user profiles and segments in real-time
Best Practices
Event Naming
- Use descriptive, consistent names:
user_signup
,product_purchased
,trial_started
- Use snake_case for event names
- Be specific but not overly verbose
- Group related events with common prefixes:
checkout_started
,checkout_completed
Properties
- Include relevant context in properties
- Use consistent property names across events
- Avoid nested objects when possible
- Include timestamps for time-sensitive data
Performance
- Batch events when possible for high-volume applications
- Use
identify: true
sparingly to avoid unnecessary processing - Consider using anonymous tracking for non-critical events