Skip to content

Get User Balance

GET /v1/users/:userId/balance

Returns a user’s full profile including balance, display name, email, metadata, and account creation date. This is the detailed server-side variant; see Get User Balance (SDK) for the lightweight client-side version.

HeaderRequiredValue
X-API-SecretYesYour secret key
ParamTypeDescription
userIdstringThe user’s external ID
Terminal window
curl -X GET https://api.gamifyhost.com/v1/users/user_12345/balance \
-H "X-API-Secret: sk_live_your_secret_key"

Status: 200 OK

{
"message": "User balance retrieved",
"code": 200,
"status": "success",
"data": {
"userId": "user_12345",
"totalPoints": 5500,
"displayName": "Alice",
"email": "alice@example.com",
"metadata": {
"source": "ios_app"
},
"createdAt": "2025-06-01T08:00:00Z"
}
}
FieldTypeDescription
userIdstringThe user’s external ID
totalPointsintegerCurrent point balance
displayNamestringDisplay name
emailstringEmail address
metadataobjectUser metadata
createdAtdatetimeAccount creation timestamp
CodeMessage
404User not found