SaaSFlow
DevelopersAPIReferencedata

MetricDefinitions

Use this when the user asks how a SaaS metric is defined or calculated (formula, inputs, windows, caps). Static definitions only; use the analytics slice…

Authentication

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

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
metricNames?array<>

Metrics to return definitions for. Omit for all metrics, which needs both subscriptions:read and financials:read; name only subscription metrics (MRR, churn, retention) and subscriptions:read is enough.

mrrType?string

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

Value in"cmrr""mrr"

Response Body

metricDefinitions result

application/json
  1. response
[key: string]?
Example Request
curl -X POST 'https://api.saasflow.com/companies/string/data/metricDefinitions' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "property1": {    "title": "string",    "subTitle": "string",    "format": "number",    "category": "Recurring revenue",    "description": "string",    "formula": {      "kind": "metric",      "name": "mrr",      "monthOffset": 0    },    "notes": [      "string"    ],    "requires": "string"  },  "property2": {    "title": "string",    "subTitle": "string",    "format": "number",    "category": "Recurring revenue",    "description": "string",    "formula": {      "kind": "metric",      "name": "mrr",      "monthOffset": 0    },    "notes": [      "string"    ],    "requires": "string"  }}