SaaSFlow
DevelopersAPIReferencedata

CohortCustomers

Use this when the user asks which customers make up one cohort, or what is behind a single cell of the cohorts matrix.

Authentication

Checking whether you're signed in…
POST
/companies/{companyId}/data/cohortCustomers

Authorization

headerAuthorization<token>

A SaaSFlow API key (format sf_…) or an OAuth bearer token. Paste only the key — the proxy adds the Bearer prefix. Create an API key in Settings → Company settings → API keys — see API keys.

Path Parameters

companyId*string
Length1 <= length

Request Body

application/json
  1. body
cohortMonth*string

The cohort to open, keyed the way the cohorts slice keys it.

Match^\d{4}-\d{2}$
targetMonth*string

The month to read each cohort member’s MRR in.

Match^\d{4}-\d{2}$
mrrType*string

MRR variant. cmrr = committed MRR (CMRR), mrr = recognised MRR.

Value in"cmrr""mrr"
productIds?array<string>|

Restrict subscription metrics to these product ids. Omit or null for all products. Values are unioned; a customer on several selected products counts once.

Defaultnull

Response Body

cohortCustomers result

application/json
  1. response

The customers of one cohort and what each paid in the target month, sorted by that amount. Churned members are included with 0.

[index: integer]?
curl -X POST "https://example.com/companies/string/data/cohortCustomers" \  -H "Content-Type: application/json" \  -d '{    "cohortMonth": "string",    "targetMonth": "string",    "mrrType": "cmrr"  }'
[  {    "customerId": "string",    "customerName": "string",    "mrr": 0  }]