Skip to content

Track / Enrich User

POST /v1/user-journeys/users

Creates or updates a user profile. If a profile with the same externalId already exists for your account and environment, the enrichment fields are updated. The externalId is your unique identifier for the user in your system.

HeaderRequiredValue
X-API-KeyYesYour public key
Content-TypeYesapplication/json
FieldTypeRequiredDescription
externalIdstringYesYour unique user identifier
displayNamestringNoUser’s display name
emailstringNoUser’s email address
phonestringNoPhone number (max 20 chars)
countrystringNoISO 3166-1 alpha-2 code (e.g., NG, US, GB)
devicestringNoDevice type: mobile, desktop, tablet
sourcestringNoAcquisition channel (e.g., organic, facebook_ads, referral)
tagsobjectNoCustom key-value tags for filtering
metadataobjectNoArbitrary metadata stored with the profile
Terminal window
curl -X POST https://api.gamifyhost.com/v1/user-journeys/users \
-H "X-API-Key: pk_live_your_public_key" \
-H "Content-Type: application/json" \
-d '{
"externalId": "user_12345",
"displayName": "Jane Doe",
"email": "jane@example.com",
"country": "NG",
"device": "mobile",
"source": "referral",
"tags": { "plan": "premium", "cohort": "2025-Q1" },
"metadata": { "signupDate": "2025-01-15" }
}'

Status: 200 OK

{
"status": "success",
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"partnerId": "partner-uuid",
"externalId": "user_12345",
"environment": "LIVE",
"displayName": "Jane Doe",
"email": "jane@example.com",
"phone": "",
"country": "NG",
"device": "mobile",
"source": "referral",
"firstSeenAt": "2025-01-15T10:30:00Z",
"lastSeenAt": "2025-03-05T14:22:00Z",
"lifecycleStage": "new",
"engagementTier": "casual",
"engagementScore": 0,
"totalPlays": 0,
"plays7d": 0,
"plays30d": 0,
"pointsEarned7d": 0,
"pointsEarned30d": 0,
"campaignsJoined": 0,
"winRate": 0,
"totalEvents": 0,
"tags": { "plan": "premium", "cohort": "2025-Q1" },
"metadata": { "signupDate": "2025-01-15" }
}
}
CodeMessage
400Invalid request body (missing externalId)
500Failed to track user