404 USER_NOT_FOUND response.{
"idOrEmail": "user@example.com",
"customFields": ["customerid", "trading_volume"]
}getUserData. The key limits the lookup to its own community. Do not broaden the search after a privacy-safe 404 or expose whether the same identity exists elsewhere.{ "idOrEmail": "user@example.com" }{ "idOrEmail": "3247779" }{ "identifier": { "key": "id", "value": "3247779" } }{ "identifier": { "key": "customerid", "value": "<brokerCustomerId>" } }customFields is an optional allowlist of field keys to return. Prefer email or numeric platform ID for the most portable lookup. A custom identifier works only when that identifier is active and its projection is ready.{
"status": "success",
"code": "USER_DATA_RETRIEVED",
"message": "User data retrieved successfully",
"data": {
"_id": "<mongoUserId>",
"userId": "3247779",
"username": "ada_lovelace_123",
"xp": 1250,
"coins": 340,
"roles": [
"@all"
],
"highestRole": "@all",
"firstName": "Ada",
"lastName": "Lovelace",
"xpEarnedToday": 25,
"coinsEarnedToday": 10,
"language": "English",
"totalMessages": 42,
"totalReactions": 17,
"visitCount": 63,
"replySent": 8,
"timeSpent": 312.5,
"loginStreak": 12,
"tags": [
"VIP"
],
"current_tier": "Gold",
"current_level": 3,
"to_next_level": 150,
"customFields": {
"customerid": "<brokerCustomerId>"
}
}
}| Field | Type | Meaning |
|---|---|---|
_id | string | Internal platform user ID. |
userId | string | Numeric platform user ID. Treat it as an opaque decimal string. |
username | string | Display username. |
xp, coins | number | Current XP total and coin balance in this community. |
roles, highestRole | string[], string | Role names; highestRole is the highest-ranked role other than @all. |
firstName, lastName | string | Masked as ******** when the member's GDPR consent does not allow sharing. |
language | string | Selected language display name; English when none is set. |
xpEarnedToday, coinsEarnedToday | number | Net XP and coin change for the current UTC day, including deductions. |
totalMessages, totalReactions, replySent | integer | Lifetime messages, reactions, and replies in this community. |
visitCount | integer | Lifetime recorded visits to this community (daily visits, not sessions). |
timeSpent | number | Total active time in minutes, measured on the platform account rather than per community. |
loginStreak | integer | Longest run of consecutive UTC days with a visit. This is the best-ever streak, not the current one. |
tags | string[] | Tag names assigned to the member in this community. |
current_tier | string | Tier calculated now from current XP and the tier configuration. Absent when no tiers are configured. |
current_level | integer | null | Level within the tier for level-based progression; null for value-range progression. |
to_next_level | number | XP needed for the next level; level-based progression only, omitted at the top level. |
customFields | object | Values for the requested customFields keys. |
data.userId as an opaque decimal string. For post-write verification, compare the returned identifier, roles, profile values, and requested custom fields with the preceding mutation.400 CUSTOM_FIELD_IDENTIFIER_NOT_FOUND: the supplied structured key is not an active custom identifier. Correct the key or use email/platform ID.401 AUTHENTICATION_REQUIRED: the key is missing, malformed, invalid, or expired.403 API_KEY_PERMISSION_DENIED: the key is valid but lacks getUserData.404 USER_NOT_FOUND: no active user is visible to this community. Do not probe other communities or leak existence.503 CUSTOM_FIELD_IDENTIFIER_NOT_READY: the configured custom-field lookup projection is unavailable. Use email/platform ID when possible or retry later with bounded backoff.500 USER_DATA_RETRIEVAL_FAILED: preserve the request identifiers and correlation time for support; the request is read-only.curl --location 'https://sgtr-integration.returning.ai/apis/v1/users/info' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"idOrEmail": "user@example.com",
"customFields": [
"customerid"
]
}'{
"status": "success",
"code": "USER_DATA_RETRIEVED",
"message": "User data retrieved successfully",
"data": {
"_id": "<mongoUserId>",
"userId": "3247779",
"username": "ada_lovelace_123",
"xp": 1250,
"coins": 340,
"roles": [
"@all"
],
"highestRole": "@all",
"firstName": "Ada",
"lastName": "Lovelace",
"xpEarnedToday": 25,
"coinsEarnedToday": 10,
"language": "English",
"totalMessages": 42,
"totalReactions": 17,
"visitCount": 63,
"replySent": 8,
"timeSpent": 312.5,
"loginStreak": 12,
"tags": [
"VIP"
],
"current_tier": "Gold",
"current_level": 3,
"to_next_level": 150,
"customFields": {
"customerid": "<brokerCustomerId>"
}
}
}