Get community users
Get one page of your community's traders, with their names, email, online status and last sign-in.
- Method
- GET
- Path
https://api.returning.ai / v1/ communities/ {communityId}/ users - Permission
- None
- Retries
- Read-only; exact retries are safe
When to use this
- You show a simple member list in your own admin tools, with who is online first.
- You want to see which of your traders are online right now.
- You need the platform user IDs of recently active traders.
Authentication#
- Header
Authorization: Bearer <API_KEY>- Permission
- NoneAny Community API key for this community works
Send a Community API key as Authorization: Bearer <API_KEY>, and keep it on your server. This endpoint needs no specific permission, but communityId must be the community that owns your key.
Behaviour#
Traders are sorted online first, then by most recent sign-in, so the order shifts as traders come and go; don't rely on paging to visit every trader exactly once. Results are cached, so a trader who just joined, or a profile that just changed, may not show straight away. To check one trader, use Get User Data.
By default every trader includes all ten fields. Send one or more field flags, such as email=true&id=true, to get only those fields.
Request#
Path parameters#
Rule24 hex characters
Eg"66f000000000000000000010"
Query parameters#
RuleMin 1; default 1
Eg1
RuleDefault 20; max 100
Eg20
true to include _id. Sending any field flag returns only the flagged fields.Egtrue
true to include id, the platform user ID.Egtrue
true to include avatar.Egtrue
true to include displayName.Egtrue
true to include username.Egtrue
true to include firstName.Egtrue
true to include lastName.Egtrue
true to include email.Egtrue
true to include isOnline.Egtrue
true to include lastLogin.Egtrue
Headers#
RuleBearer <API_KEY>
curl --request GET \
--url 'https://api.returning.ai/v1/communities/66f000000000000000000010/users?page=1&limit=20' \
--header 'Authorization: Bearer <API_KEY>'
Response#
A 200 returns up to limit traders in data, with the page details in meta. A trader whose profile is missing a required value, such as an email, is left out of data and listed in meta.validationErrors instead.
Eg{ ... }
Eg"success"
Eg200
Eg1
Eg1
Eg20
Eg"Get community users success."
limit traders, online traders first, then by most recent sign-in.Eg[ ... ]
Eg"<userObjectId>"
Eg3247779
null.RuleNullable
Egnull
Eg"Sample Trader"
Eg"sample_trader"
******** when the trader's privacy settings hide it.Eg"Sample"
******** when hidden.Eg"Trader"
******** when hidden.Eg"trader@example.com"
true while the trader is online.Egfalse
RuleDate-time
Eg"2026-09-26T08:30:00.000Z"
{
"meta": {
"status": "success",
"statusCode": 200,
"total": 1,
"page": 1,
"limit": 20
},
"message": "Get community users success.",
"data": [
{
"_id": "<userObjectId>",
"id": 3247779,
"avatar": null,
"displayName": "Sample Trader",
"username": "sample_trader",
"firstName": "Sample",
"lastName": "Trader",
"email": "trader@example.com",
"isOnline": false,
"lastLogin": "2026-09-26T08:30:00.000Z"
}
]
}
Errors#
Errors on this endpoint have no machine-readable code; branch on the HTTP status. Without an Authorization header the 401 body is not JSON. An unexpected failure returns 500; retry it with backoff.
Fix the request02
page is below 1, limit is outside 1-100, either isn't a number, or communityId isn't a valid ID. detail names the parameter.Authorization: Bearer <API_KEY> with a current key for your own community.{
"meta": {
"status": "error",
"statusCode": 400
},
"message": "Get community users error.",
"detail": {
"limit": "Limit cannot exceed 100"
},
"solution": "Read error detail and try again."
}