Skip to main content
Fetch User Suggestions
Returns up to 5 users whose usernames contain the provided query string, ranked by prefix match first, then alphabetically. Designed for @mention autocomplete and user search UIs. When the request has a viewer — the signed-in user, or the user a service key names in actingUserId — users with a block between them and the viewer, in either direction, are left out. Block filtering requires the moderation bundle.
Sensitive fields (email, hash, salt, isVerified, isActive, lastActive) are excluded from suggestions results.

Query Parameters

Acting user

string
Service key only: the user to read as. The response is exactly what that user’s own access token would get — users block-edged with them are left out. Leave it out for the anonymous view. A user token always acts as its own user and must not send it, and neither may a request with no credentials (400 user/acting-user-not-allowed).
string
required
The search string. Matches usernames that contain this value (case-insensitive). Users whose usernames start with query are ranked first.

Space-scoped reputation

This endpoint has no space in context, so the opt-in spaceReputation object accepts a spaceId of a space <uuid> or none only — context is rejected (400). It adds a spaceReputation field to each returned user, alongside the always-present reputation total. Requires the reputation bundle. See the Reputation data model.

Response

On success, returns HTTP 200 with an array of up to 5 user objects:
string
Unique user ID (UUID).
string | null
External identifier from your system.
string | null
Display name.
string | null
The user’s username.
string | null
Avatar image URL.
string | null
Short bio text.
object | null
Public custom key-value data.
number
Reputation score.
string
ISO timestamp of account creation.

Error Responses

A user token, or a request with no credentials, sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.

See Also