---
title: "Active clients per month (services Home)"
method: GET
path: "/companies/{companyId}/metrics/active-clients"
tags: ["Overview"]
---

# Active clients per month (services Home)

`GET /companies/{companyId}/metrics/active-clients`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/metrics/active-clients`
- Auth: HTTP bearer

#1967 "Active clients" tile on a services company's Home. For each of the last twelve months (eleven completed months plus the current month to date, UTC), the number of distinct clients whose net POSTED operating revenue in that month is positive. Operating revenue leaves out other income (4100-style) and 4999 Uncategorized Income, as the Books hub does; closing entries are excluded. A revenue entry's client is the AR customer record its invoice provenance names, else the customer its source receipt names (a Stripe `cus_` id or the receipt name, folded onto the matching customer record). A payment that only settles A/R posts no revenue and never counts; a processor payout names no client. When any of a month's revenue has no client, that month is `unattributed_revenue` with `activeClients: null`, never an undercount.

## Query parameters

- `entityId` string, uuid

## Response `200`

Active-clients series

- ActiveClientsResponse
  - `success` true, required
  - `data` ActiveClientsData, required
    - `available` boolean, required
    - `reason` 'no_revenue_accounts' | 'mixed_currencies': Present only when available is false.
    - `basis` 'posted-revenue', required
    - `currentMonth` string, required: The month in progress (UTC), counted month to date.
    - `asOf` string, date, required: The last day counted (UTC today).
    - `months` ActiveClientsMonth[], required: Oldest first; the last entry is currentMonth. Twelve entries when available, empty otherwise.
      - `month` string, required
      - `status` 'counted' | 'unattributed_revenue' | 'no_revenue', required: counted: every revenue cent in the month has a client, so `activeClients` is exact. unattributed_revenue: some revenue has no client, so no count is published. no_revenue: no posted operating revenue lines in the month.
      - `activeClients` integer, nullable, required: Distinct clients with positive net revenue in the month; null unless status is counted.
      - `revenueCents` integer, required: Net posted operating revenue in the month, in cents.
      - `unattributedRevenueCents` integer, required: The part of revenueCents with no client provenance, in cents.

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: The metric is not wired on this deployment
- `422`: Request failed validation
- `503`: The legal-entity scope authority could not be read

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
