{% extends "docs/base.html" %} {% block docs_content %}

Suggest users

Autocomplete user suggestions by username or name, with optional scope-based ranking.

Endpoint

GET /api/v1/suggest-users?search=text&scope=repo:teams/pearing/pearing

Authentication

None required for public repos and teams. Optional for private repo scopes.

When scope=repo:<locator> targets a private repo, a valid API token with access to that repo is required for scoped ranking. Without a token (or without access), the request silently falls back to global suggestions.

Parameters

Usage

curl "$PEARING_API_URL/v1/suggest-users?search=ben"
curl \
  "$PEARING_API_URL/v1/suggest-users?search=ben&scope=repo:teams/pearing/pearing"
curl "$PEARING_API_URL/v1/suggest-users?search=cl&scope=team:pearing"

Success

200 OK

{
  "next": null,
  "previous": null,
  "results": [
    { "uuid": "...", "username": "benwilber", "name": "Ben Wilber" },
    { "uuid": "...", "username": "bendev", "name": "Ben Developer" }
  ]
}

Returns up to 15 results. Only active users are included. Results are ranked by exact match, prefix match, scope participation, and trigram similarity.

Errors

{% endblock %}