admin

Admin Stats Clients

Per-client revenue vs AI cost vs comped credits → gross margin, over the window. Sorted server-side (default: margin desc). Two grouped scans (BillingEvent, AIUsageLog) joined in memory — no per-client N+1.

get/api/v1/admin/stats/clients

Request

  • Base URL: https://api.nudgelink.co (the document declares no server; this is the origin it was published from)
  • URL: https://api.nudgelink.co/api/v1/admin/stats/clients
  • Auth: HTTP bearer

Query parameters

daysinteger
sort'margin' | 'revenue' | 'ai_cost'
limitinteger

Response

Successful Response

client_idstring uuid required
emailstring required
company_namestring required
subscription_planstring nullable required
revenue_usdnumber required
refunds_usdnumber required
ai_cost_usdnumber required
comped_creditsinteger required
gross_margin_usdnumber required
margin_pctnumber required

Changes

No recorded changes to this operation across all 1 revision of this API.