Get a trader's field history
List every recorded change to one trader's value for one user field, newest first, a page at a time.
- Method
- GET
- Path
https://api.returning.ai / v1/ communities/ {communityId}/ users/ {userId}/ user-fields/ {fieldIdOrName}/ histories - Permission
- userFields
- Retries
- Read-only; exact retries are safe
When to use this
- Confirm that a value you wrote with Update a user field value was saved, and what the trader's value is now.
- A write timed out or returned an unclear result, and you need to know whether it was applied before you send it again.
- Audit how a trader's value for a field changed over time, such as when their KYC status moved to
verified.
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#
Each change to the trader's value adds one entry, and the newest entry comes first, so data[0] is the latest change. Its storedValue is the trader's value after that change; for numerical fields it is the running total.
Entries are tied to the field's _id. If you delete a field and create a new one with the same key, the old field's entries don't appear here.
For the built-in total_xp and total_coins fields, the list holds the trader's XP or coin changes instead, and action uses the platform's own labels rather than overwrite, increase and decrease.
Request#
Path parameters#
Rule24 hex characters
Eg"66f000000000000000000010"
RulePlatform user ID recommended
Eg"3247779"
_id. Not the display name.RuleField key or 24-character ID
Eg"kycstatus"
Query parameters#
Headers#
userFields.RuleBearer <API_KEY>
curl --request GET \
--url 'https://api.returning.ai/v1/communities/66f000000000000000000010/users/3247779/user-fields/kycstatus/histories?page=1&limit=20' \
--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 for the field returns 200 with an empty list, not 404.
Eg{ ... }
success.Eg"success"
200.Eg200
RuleUSER_FIELD_HISTORIES_LISTED
user_field on this endpoint.Eg2
Eg1
Eg20
true when there are more entries after this page. Ask for page + 1.Eg"Read user field histories for specific user and user field api success."
Eg[ ... ]
Eg"66f000000000000000000511"
total_xp and total_coins, their platform user ID instead; use userNumericID to be safe.null when the entry doesn't hold one._id.increase and decrease the amount.Eg"verified"
null when no value after the change was recorded.overwrite, increase or decrease. For total_xp and total_coins, the platform's own label for the change instead, such as adjust xps or edit.Eg"overwrite"
RuleDate-time
Eg"2026-09-26T08:30:00.000Z"
{
"meta": {
"status": "success",
"statusCode": 200,
"code": "USER_FIELD_HISTORIES_LISTED",
"scope": "user_field",
"total": 2,
"page": 1,
"limit": 20,
"hasNext": false
},
"message": "Read user field histories for specific user and user field 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": "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. The trader is looked up before the field, so if both are wrong you get USER_NOT_FOUND.
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. Use your own community's ID.Fix the data03
USER_NOT_FOUNDFix the datauserId; a trader who isn't a member 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.USER_FIELD_NOT_FOUNDFix the datameta.fieldIdOrName 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."
}