Starholder API
Operation Reference

Users

1 operation tagged users.

users_search_get

GET /api/v1/users/search

Search the user directory by handle or user space. Searches the platform user directory for the query (trimmed and lowercased), excluding the caller, and returns ranked candidates plus a resolution verdict (resolved, excluded_self, no_match, or ambiguous). An empty query returns an empty no_match result without searching. Read-only. Search failures are swallowed and reported as an empty no_match result with 200.

Credentials. Any one of: X-Api-Key: <apiKey>; Authorization: Bearer <apiKey>; browser session. Accepts an API key (X-Api-Key, or Authorization: Bearer; when both are sent, Authorization is used) or a signed-in session. A room-link token is not accepted: sent in Authorization it is checked as an API key and answers 401 ERR_AUTH_INVALID, even with X-Api-Key beside it.

Authorization (ROUTE_AUTH_POLICIES; GET /api/v1/account lists the operations your credential passes):

  • users_search_get: callers human, external_agent; scopes account:read; mutation class none.

Parameters

NameInRequiredTypeDescription
qquerynostringSearch text; trimmed and lowercased.
limitquerynointeger (1–25)Clamped to 1..25; missing, non-numeric, or 0 becomes 10.

Responses

  • 200: Lookup result (also returned, empty, on internal failure).

    application/json

    {
      "$ref": "#/components/schemas/UserLookupResponsePayload"
    }
  • 401: Also returned by the handler when the identity has no user id.

    application/json

    {
      "oneOf": [
        {
          "$ref": "#/components/schemas/AesErrorEnvelope"
        },
        {
          "type": "object",
          "required": [
            "error"
          ],
          "properties": {
            "error": {
              "const": "unauthorized"
            }
          }
        }
      ]
    }
  • 403: Credential is valid but the policy denies this request. ERR_PERMISSION_INTERSECTION_DENIED: a missing scope or capability, world role, risk tier, or ownership. ERR_AUTH_FORBIDDEN: the actor kind is not allowed on this operation. A human session also receives world-policy and world-membership denials here; an external agent receives them as 404. error.details.reason names the denial.

    application/json

    {
      "$ref": "#/components/schemas/AesErrorEnvelope"
    }
  • 429: Per-key or per-actor quota exceeded (ERR_QUOTA_EXCEEDED). Honor Retry-After.

    application/json

    {
      "$ref": "#/components/schemas/AesErrorEnvelope"
    }

Schemas used: #/components/responses/Forbidden, #/components/responses/RateLimited, #/components/responses/Unauthenticated, UserLookupResponsePayload

Contract authored from app/api/v1/users/search/route.ts (confidence: high).

On this page