Get user field histories for a specific user
List every recorded change to one trader's user field values, XP and coins, newest first, a page at a time.
- Method
- GET
- Path
https://api.returning.ai / v1/ communities/ {communityId}/ users/ {userId}/ user-field-histories - Permission
- userFields
- Retries
- Read-only; exact retries are safe
When to use this
- Support asks why a trader's value, XP or coin balance changed, and you need the full timeline.
- Check everything your platform wrote for one trader after an onboarding or sync.
- Reconcile one trader's record between your systems and Returning.AI.
Authentication#
- Header
Authorization: Bearer <API_KEY>- Permission
- userFieldsShown in the dashboard as “User Fields”
Use a Community API key with the userFields permission, and keep it on your server. communityId must be the ID of the community that owns the key.
Behaviour#
The list holds the trader's changes to every field, newest first, so data[0] is the latest change. It includes:
- Changes to your custom fields. Creating the trader with a broker identifier adds an entry for the identifier field.
- XP and coin changes, as entries for the built-in
total_xpandtotal_coinsfields. Theiractionuses the platform's own labels rather thanoverwrite,increaseanddecrease, andstoredValueis usuallynull. Premium currency changes are not included.
Entries for a field you've deleted stay in the list, with fieldType set to null. Once you delete the trader, their history can't be read.
Request#
Path parameters#
Query parameters#
Headers#
userFields.RuleBearer <API_KEY>
curl --request GET \
--url 'https://api.returning.ai/v1/communities/66f000000000000000000010/users/3247779/user-field-histories?page=1&limit=50' \
--header 'Authorization: Bearer <API_KEY>'
Response#
A 200 returns one page of entries in data. Branch on the HTTP status and meta.code, never on message. To read everything, start at page=1 and ask for the next page while meta.hasNext is true. Only the first 10,000 entries can be paged to. A trader with no changes returns 200 with an empty list, not 404.
Eg{ ... }
success.Eg"success"
200.Eg200
RuleUSER_FIELD_HISTORIES_LISTED
user on this endpoint.Eg3
Eg1
Eg50
true when there are more entries after this page. Ask for page + 1.Eg"Read user field histories for specific user api success."
Eg[ ... ]
Eg"66f000000000000000000511"
total_xp and total_coins, their platform user ID as a number instead; use userNumericID to be safe._id.kycstatus or total_xp.null when the field has since been deleted.increase and decrease the amount. For total_xp and total_coins, the signed change, such as -25.Eg"verified"
null when no value after the change was recorded, which is usual for total_xp and total_coins.overwrite, increase or decrease. For total_xp and total_coins, the platform's own label for the change instead, such as adjust xps,api or add,api.Eg"overwrite"
RuleDate-time
Eg"2026-09-26T08:30:00.000Z"
{
"meta": {
"status": "success",
"statusCode": 200,
"code": "USER_FIELD_HISTORIES_LISTED",
"scope": "user",
"total": 3,
"page": 1,
"limit": 50,
"hasNext": false
},
"message": "Read user field histories for specific user api success.",
"data": [
{
"_id": "66f000000000000000000511",
"communityID": "66f000000000000000000010",
"userID": "<userObjectId>",
"userObjectID": "<userObjectId>",
"userNumericID": 3247779,
"fieldID": "66f000000000000000000510",
"fieldName": "kycstatus",
"fieldType": "single-line-text",
"value": "verified",
"storedValue": "verified",
"action": "overwrite",
"createdAt": "2026-09-26T08:30:00.000Z",
"updatedAt": "2026-09-26T08:30:00.000Z"
},
{
"_id": "66f000000000000000000601",
"communityID": "66f000000000000000000010",
"userID": 3247779,
"userObjectID": "<userObjectId>",
"userNumericID": 3247779,
"fieldID": "66f000000000000000000602",
"fieldName": "total_coins",
"fieldType": "numerical",
"value": -25,
"storedValue": null,
"action": "subtract,api",
"createdAt": "2026-09-26T07:10:00.000Z",
"updatedAt": "2026-09-26T07:10:00.000Z"
},
{
"_id": "66f000000000000000000512",
"communityID": "66f000000000000000000010",
"userID": "<userObjectId>",
"userObjectID": "<userObjectId>",
"userNumericID": 3247779,
"fieldID": "66f000000000000000000510",
"fieldName": "kycstatus",
"fieldType": "single-line-text",
"value": "pending",
"storedValue": "pending",
"action": "overwrite",
"createdAt": "2026-09-20T10:05:00.000Z",
"updatedAt": "2026-09-20T10:05:00.000Z"
}
]
}
Errors#
Every error carries its code in meta.code.
Fix the request04
INVALID_PAGINATIONFix the requestpage or limit isn't a whole number from 1, limit is over 100, or page × limit is over 10,000. detail names the limit and 10,000 rules; a bad page only says Invalid input.AUTHENTICATION_REQUIREDFix the requestAuthorization: Bearer <API_KEY> with a current Community API key.API_KEY_PERMISSION_DENIEDFix the requestuserFields. Add the permission in Settings > Integration > API Keys.API_KEY_COMMUNITY_MISMATCHFix the requestcommunityId is not the community that owns your key, or isn't a valid ID. Use your own community's ID.Fix the data02
USER_NOT_FOUNDFix the datauserId. A trader who isn't a member, or whom you deleted, returns this too. A 12-character username or email can't be matched, so use the platform user ID. meta.userIdentifier echoes what you sent.COMMUNITY_NOT_FOUNDFix the dataRetry with backoff01
USER_FIELD_OPERATION_FAILEDRetry with backoff{
"meta": {
"status": "error",
"statusCode": 400,
"code": "INVALID_PAGINATION"
},
"message": "Read user field histories api validation error.",
"detail": "Limit must be at most 100",
"solution": "Use integer pagination within the supported window."
}