Get a user field definition
Read one user field's definition by its key or ID, to check its name, type and default before you write values.
- Method
- GET
- Path
https://api.returning.ai / v1/ communities/ {communityId}/ user-fields/ {fieldIdOrName} - Permission
- userFields
- Retries
- Read-only; exact retries are safe
When to use this
- Before you write a trader's value, confirm the field's type so the value suits it.
- After you create or update a field, read it back to check what was saved.
- Your integration stores field keys and you want to check that one still exists.
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. The key only reads its own community: communityId must be the ID of the community that owns the key.
Behaviour#
This returns the field's definition, not any trader's value. It works for built-in fields, such as email or total_xp, as well as your own. Look the field up by its key or by its _id; the display name is not accepted.
Request#
Path parameters#
Rule24 hex characters
Eg"66f000000000000000000010"
_id. Not the display name. Capitals and spaces are cleaned up as on create, so KYCStatus finds kycstatus.RuleField key or 24-character ID
Eg"kycstatus"
Headers#
userFields.RuleBearer <API_KEY>
curl --request GET \
--url https://api.returning.ai/v1/communities/66f000000000000000000010/user-fields/kycstatus \
--header 'Authorization: Bearer <API_KEY>'
Response#
A 200 returns the definition in data. Branch on the HTTP status and meta.code, never on message. Check type before you write a value, and isCustom before you try to update the field: built-in fields can't be changed.
Eg{ ... }
Rulesuccess
Rule200
RuleUSER_FIELD_RETRIEVED
Eg"Read user field api success."
Eg{ ... }
Rule^[0-9a-fA-F]{24}$
Eg"66f000000000000000000510"
Eg"KYC status"
Rulea-z, 0-9, _, -; up to 120 chars
Eg"kycstatus"
Rulesingle-line-text, multi-line-text, numerical, date, time, date-time, boolean, single-select-dropdown, multi-select-dropdown
Eg"single-line-text"
null or left out when there is none.true for fields your community created, false for built-in fields. Only custom fields can be updated.{
"meta": {
"status": "success",
"statusCode": 200,
"code": "USER_FIELD_RETRIEVED"
},
"message": "Read user field api success.",
"data": {
"_id": "66f000000000000000000510",
"name": "KYC status",
"field": "kycstatus",
"type": "single-line-text",
"isCustom": true,
"createdAt": "2026-09-26T08:30:00.000Z",
"updatedAt": "2026-09-26T08:30:00.000Z"
}
}
Errors#
Every error carries its code in meta.code, except a fieldIdOrName that isn't a valid key or ID: that returns 400 with a detail object and no code. A 404 means the key doesn't exist in your community.
Fix the request04
fieldIdOrName isn't a valid key or ID: after cleanup it must be 1-120 characters of a-z, 0-9, _ and -. detail names the problem. This error has no code.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 data02
USER_FIELD_NOT_FOUNDFix the dataCOMMUNITY_NOT_FOUNDFix the dataRetry with backoff01
USER_FIELD_OPERATION_FAILEDRetry with backoff{
"meta": {
"status": "error",
"statusCode": 400
},
"message": "Read user field api validation error.",
"detail": {
"fieldIdOrName": "field must use ASCII letters, numbers, \"_\", or \"-\" after normalization."
},
"solution": "Check your params in request and try again"
}