MRR analytics
GET /v1/analytics/mrr is the single place to read monthly recurring revenue (MRR) out of MarginFront. It returns one of three MRR variants, or all three at once. Use it when you need to answer:
- “What did we actually bill for last month?”
- “If the last 30 days kept going, what would we bill per month?”
- “What is the contractual floor we will bill regardless of usage?”
- “How does a single customer (or subscription) contribute to each of those?”
The endpoint
Method and URL:x-api-key header.
Query parameters
| Param | Type | Required | Description |
|---|---|---|---|
variant | string | no | Which MRR variant to return. One of canonical, runRate, committed, all. Default: canonical. |
customerId | UUID | no | Narrow to one customer. Use MarginFront’s internal customer UUID, not your externalId. |
subscriptionId | UUID | no | Narrow to one subscription. |
The three MRR variants
canonical (last-calendar-month billed)
Plain English: “What did we actually bill last calendar month?”
Looks at non-draft invoices whose invoice date lands in the most recent complete calendar month. Sums the totals. That is your MRR. This is a backward-looking number based on what finance actually sent out.
Good for: finance reporting, board decks, anything where “actual billed” is what you want.
runRate (last 30 days, monthly-normalized)
Plain English: “If the current pace keeps going, what would we bill per month?”
For each active subscription: take recurring fees plus seat fees plus actual usage from the last 30 days, and normalize everything to a monthly number (yearly subs get divided by 12). Add it up across every active subscription. That is run-rate MRR.
Good for: forecasting, growth dashboards, anything where you want the forward-looking trajectory.
committed (contractual floor)
Plain English: “What will we bill per month even if usage goes to zero?”
Same shape as run-rate, but actual usage is replaced with the subscription’s minimumCommitment times its rate (zero if no minimum is set). So it strips out variability and shows only what is guaranteed by contract.
Good for: revenue predictability, churn-risk analysis, anything where you want to see the floor.
all
Returns all three variants in one response. Use this when you need to render a comparison (e.g., a dashboard tile showing all three side by side).
Example curl calls
Last calendar month’s billed MRR (default):What you get back (200 OK)
variant=canonical
mrris last calendar month’s non-draft invoice total.arrismrr × 12.
variant=runRate
mrris the sum oftotalacross every active subscription.breakdownis one row per active subscription.recurringis the recurring-fee contribution, monthly-normalized (yearly subs divided by 12).seatBasedis the seat-fee contribution:max(seatsCount, minimumCommitment) × rate, monthly-normalized.usageis actual last-30-days usage revenue for the subscription.totalisrecurring + seatBased + usage(the sub’s run-rate MRR contribution).
variant=committed
runRate, but usage is replaced with the strategy’s contractual floor (minimumCommitment × rate, or 0 if no minimum is set).
variant=all
number, not strings.
When to use this vs. other endpoints
Use this endpoint when you specifically want MRR or ARR. Use/v1/analytics/revenue when you want revenue for an arbitrary window (not a monthly roll-up), with cost and margin attached.
Use /v1/invoices when you want the individual invoice records that make up the canonical MRR total.
Using the Node SDK
Common errors
400 Bad Request:variantis not one ofcanonical,runRate,committed,all, or a UUID filter is invalid.401 Unauthorized: API key missing or wrong.

