Skip to Content
SaaSFlow
DevelopersAPIReferencedata

Analytics

Use this when the user asks for summary SaaS metrics (MRR, ARR, NRR, GRR, churn, LTV, CAC, burn rate, runway) over a period.

Authentication

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

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
Formatuuid

Request Body

application/json
  1. body
metricNames*array<>
startDate*string
Match^\d{4}-\d{2}$
endDate*string
Match^\d{4}-\d{2}$
mrrType*string

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

Value in"cmrr""mrr"
timeZone?string

IANA time zone. Defaults to BatchContext.timeZone, then UTC.

smoothingMonths?integer
Range1 <= value <= 12
Default1
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

analytics result

application/json
  1. response
[key: string]?
Example Request
curl -X POST 'https://api.saasflow.com/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/data/analytics' \  -H 'Content-Type: application/json' \  -d '{  "metricNames": [    "mrr"  ],  "startDate": "string",  "endDate": "string",  "mrrType": "cmrr"}'
Example Response
{  "property1": {    "title": "string",    "subTitle": "string",    "format": "string",    "values": {      "property1": 0,      "property2": 0    },    "rawValues": {      "property1": 0,      "property2": 0    }  },  "property2": {    "title": "string",    "subTitle": "string",    "format": "string",    "values": {      "property1": 0,      "property2": 0    },    "rawValues": {      "property1": 0,      "property2": 0    }  }}