For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • API Reference
      • POSTList customers
      • GETRetrieve a customer
      • PATCHUpdate a customer
      • DELDelete a customer
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceUsers

List customers

POST
https://api.respan.ai/api/users/list/
POST
/api/users/list/
$curl -X POST "https://api.respan.ai/api/users/list/?page=1&page_size=50&sort_by=-total_cost&environment=prod" \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json" \
> -d '{
> "filters": {
> "total_cost": {
> "operator": "gte",
> "value": [
> 10
> ]
> },
> "email": {
> "operator": "contains",
> "value": [
> "example.com"
> ]
> }
> }
>}'
1{
2 "count": 51,
3 "results": [
4 {
5 "id": "user_123prod8264a3f4-40c7-476a-97d1-96908127ea21",
6 "customer_identifier": "user_123",
7 "unique_organization_id": "8264a3f4-40c7-476a-97d1-96908127ea21",
8 "environment": "prod",
9 "name": "John Doe",
10 "email": "john@example.com",
11 "first_seen": "2025-10-15T08:00:00Z",
12 "last_active_timeframe": "2025-12-29T10:30:00Z",
13 "active_days": 75,
14 "number_of_requests": 15420,
15 "total_requests": 15420,
16 "total_tokens": 170000,
17 "tokens": 170000,
18 "total_cost": 523.45,
19 "cost": 523.45,
20 "average_latency": 1.23,
21 "average_ttft": 0.45,
22 "average_monthly_cost": 6.98,
23 "period_budget": 100,
24 "budget_duration": "monthly",
25 "total_budget": 1000
26 }
27 ],
28 "next": "https://api.respan.ai/api/users/list/?page=2",
29 "previous": null
30}

Retrieve customers in your organization with analytics and budget fields. Available filter fields include customer_identifier, name, email, number_of_requests, total_tokens, total_cost, and active_days.

Was this page helpful?
Previous

Retrieve a customer

Next
Built with

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Query parameters

pageintegerOptionalDefaults to 1
Page number.
page_sizeintegerOptional<=1000Defaults to 50
Number of customers 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

Filter criteria. See Filters API Reference for operator syntax.

operatorenumOptionalDefaults to AND
Logical operator for combining filters when supported by the client payload.
Allowed values:

Response

Paginated list of customers.
countinteger
Total number of matching customers.
resultslist of objects
Customers for the current page.
nextstring or null
Next page URL.
previousstring or null
Previous page URL.

Errors

400
Bad Request Error
401
Unauthorized Error
429
Too Many Requests Error
500
Internal Server Error