API ReferenceCompanies

Top companies

GET
/companies/top

List your organization's top companies (B2B accounts) over a window, sortable by active users, events, last-seen, or revenue. Covers all projects in your organization unless project_id is given; requires owner/admin. Returns company_id, name, domain, events, users, last_seen, and revenue per company, with revenue in your organization's reporting currency.

Authorization

AuthorizationBearer <token>

Organization API Token (prefixed sk_) sent as Authorization: Bearer sk_.... Create one in Settings and grant it scopes. Server-side only.

In: header

Query Parameters

project_id?string

Limit results to one project (a project_id from list_projects). Omit to include every project in your organization.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
range_days?integer

Look-back window in days (1-365). Defaults to 30.

Range1 <= value <= 365
sort?string

Sort field. Defaults to "users".

Value in

  • "users"
  • "events"
  • "last_seen"
  • "revenue"
limit?integer

Maximum companies to return (1-200). Defaults to 50.

Range1 <= value <= 200

Response Body

curl -X GET "https://example.com/companies/top"
Empty