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": 0,
"coins": 0,
"roles": ["@all"],
"highestRole": "@all",
"customFields": {
"customerid": "<brokerCustomerId>"
}
}
}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://api.returning.ai/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": 0,
"coins": 0,
"roles": [
"@all"
],
"highestRole": "@all",
"customFields": {
"customerid": "<brokerCustomerId>"
}
}
}