Skip to navigation

List users

Returns users in your organization with usage analytics and budget settings. Filter fields include customer_identifier, name, email, number_of_requests, total_tokens, total_cost, and active_days.

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

OR
AuthorizationBearer

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

Query parameters

pageintegerOptionalDefaults to 1
Page number.
page_sizeintegerOptional<=1000Defaults to 50
Number of users per page. Maximum is 1000.
sort_bystringOptionalDefaults to -first_seen

Sort field. Prefix with - for descending. Common values include customer_identifier, email, name, -first_seen, -number_of_requests, and -total_cost.

environmentenumOptional
Optional environment filter. If omitted, the backend uses the environment implied by your auth context when applicable.
Allowed values:

Request

This endpoint expects an object.
filtersobjectOptional

Each key is a field to filter on, and each value is a condition: {"<field>": {"operator": "<operator>", "value": [...]}}. A user must match every condition. To set two conditions on one field, such as a range, pass a list of conditions.

Operators: "" (equals, the default), not, in, not_in, lt, lte, gt, gte, contains, not_contains, icontains (ignores case), startswith, not_startswith, endswith, not_endswith, empty, not_empty. Put values in a list: "" and in match any of the listed values, and not and not_in match none of them. Other operators take one value; for empty and not_empty, send [""].

Fields: customer_identifier, name, email, environment, number_of_requests, total_cost, total_tokens, total_prompt_tokens, total_completion_tokens, average_latency, average_ttft, active_days. Unsupported fields, including metadata__<key>, return a 400 error.

Example:

{
  "total_cost": {"operator": "gte", "value": [10]},
  "email": {"operator": "endswith", "value": ["@acme.dev"]}
}

Response

Paginated list of users.
countinteger

Number of results on this page, not the total. Request pages until next is null to get every result.

resultslist of objects
Users for the current page.
nextstring or nullOptional
Next page URL.
previousstring or nullOptional
Previous page URL.

Errors

400
Bad Request Error
403
Forbidden Error
413
Content Too Large Error
429
Too Many Requests Error
500
Internal Server Error