Skip to content

User Journeys API

The User Journeys API lets you track your end-users across all gamification touchpoints, automatically segment them by lifecycle stage and engagement tier, and receive campaign recommendations tailored to each user.

  1. Identify users — Send user profiles with POST /v1/user-journeys/users
  2. Track events — Log user actions with POST /v1/user-journeys/events or batch with POST /v1/user-journeys/track
  3. Query profiles — Retrieve enriched user profiles with auto-computed segments via GET /v1/user-journeys/users/{externalId}
  4. View timelines — Get a user’s full event history with GET /v1/user-journeys/users/{externalId}/timeline

Users are automatically classified into lifecycle stages and engagement tiers based on their activity. Segments are recomputed periodically.

StageCriteria
newFirst seen within 7 days, 3 or fewer events
activeSeen within last 7 days, more than 3 events
engaged10+ plays in 30 days, joined at least 1 campaign
power_user30+ plays in 30 days, engagement score 70+
at_riskLast seen 14–30 days ago
churnedLast seen more than 30 days ago
TierCriteria
casualFewer than 5 plays in 30 days
regular5–15 plays in 30 days
power_user15–50 plays in 30 days
whaleMore than 50 plays in 30 days

The engagement score is a weighted composite:

FactorWeightCalculation
Recency30%Based on days since last seen
Frequency30%Based on plays in last 30 days
Monetary20%Based on points earned in last 30 days
Breadth20%Based on campaigns joined

All User Journeys API endpoints require your API Public Key:

HeaderRequiredValue
X-API-KeyYesYour public key (e.g., pk_live_... or pk_test_...)
Content-TypeYesapplication/json (for POST requests)

The environment (live vs test) is automatically determined by your key prefix.

https://api.gamifyhost.com/v1/user-journeys
MethodEndpointDescription
POST/usersTrack/enrich a user profile
POST/eventsTrack a single event
POST/trackBatch track events
GET/users/{externalId}Get user profile + recommendations
GET/users/{externalId}/timelineGet user event timeline

When tracking events, use one of these categories:

CategoryDescription
GAME_PLAYUser played a game (auto-tracked by Game Play API)
CAMPAIGNUser interacted with a campaign (auto-tracked by Campaigns API)
POINTSPoints were awarded or deducted
PAGE_VIEWUser viewed a page (for SDK auto-tracking)
SESSIONSession start/end events (for SDK auto-tracking)
CUSTOMAny custom event you define

When you retrieve a user profile, the API returns personalized campaign recommendations based on the user’s lifecycle stage and engagement tier. Each recommendation includes:

FieldDescription
typeCampaign type (e.g., spin_to_win, referral, daily_streak)
nameHuman-readable campaign name
reasonWhy this campaign is recommended for this user
priorityhigh, medium, or low
User SegmentRecommended Campaigns
New usersWelcome bonus spin, first action reward
Active usersDaily streak challenge, daily spin
Engaged usersReferral program, weekly leaderboard
Power usersAmbassador program, VIP exclusive rewards
At-risk usersRe-engagement streak, win-back instant prize
Churned usersWin-back reward, fresh start bonus