API & MCP
Drive the whole product from code, or hand it to an agent
Analytics tools that treat the API as an afterthought make you re-implement their metric definitions in your own code. That is how two numbers for MRR end up in the same company.
What is API & MCP?
REST
The whole surface, not a reporting slice
Read every metric as a daily series, with the customers and plans that drove each movement, and cohort retention as structured cells. Write plans, customers, subscriptions, charges and refunds. Manage segments, custom attributes, annotations, goals and cancellation reasons. Anything the interface can do, code can do.
- Metric series, per-metric customer and plan breakouts, and cohort grids
- Full read and write on plans, customers, subscriptions, charges and refunds
- Segments with an ad-hoc search endpoint, plus attributes, annotations and goals
This is the real product running on sample data. Click to use it.
Webhooks
Events pushed to you, signed and retried
Register endpoints and subscribe to the events you care about, with wildcard patterns for whole families. Deliveries are signed so you can verify they came from Bastle, and failures retry on a backing-off schedule over roughly half a day before giving up, with every attempt recorded. Polling for changes on a timer is not a design; it is what you do when the vendor did not ship webhooks.
- Customer, subscription, charge, refund, trial, dunning and import events
- Signed envelopes, automatic retries with exponential backoff, delivery log
- Wildcard subscriptions, so subscription.* is a single registration
Churn definition
Editable- Delinquency window
- 21 days
- Trials counted
- Never
- Refunds
- Deducted in period
- Downgrades
- Contraction, not churn
Change any rule and every historical figure recalculates against it.
MCP
Tools an agent can actually use
The MCP server exposes subscription analytics as typed, described tools so an agent in your editor, terminal or workflow can query revenue directly. Deliberately narrow tools with clear descriptions are what make agent loops reliable — a single do-everything endpoint produces confident nonsense.
- Metric summaries, single-metric queries, metric explanations and anomaly detection
- Customer search and cohort retention as first-class tools
- Write tools for annotations, goals and data import, scoped by API key
Why did MRR drop last month?
MRR fell $4,180 (−3.1%) in March. Almost all of it is contraction, not cancellations: 31 Scale customers downgraded to Growth after the annual renewal window opened.
Import
Bring in a billing system we do not natively support
Native connectors cover the common providers, but not every business bills through one. Push plans, customers and subscriptions to the import endpoint with their original start and cancellation dates, and the history backfills into the same metrics as native sources. Plan changes carry a business timestamp, so a correction lands in the period it belongs to.
- Backfill full history by supplying start and cancellation dates
- Upgrades, downgrades and cancellations as events with backdatable business time
- Imported sources appear alongside native ones in the same dashboards
MRR
+5.2%$162,400
Net revenue churn
−0.3pp2.1%
Active customers
+381,284
ARPU
+1.4%$126.48
Machine-readable
Built to be read by something other than a human
An OpenAPI specification describes every endpoint, and an llms.txt file describes the product in the form an AI assistant can consume — properly filled in, rather than present and empty. If your team's first move is to point a coding agent at the docs, that path is meant to work.
- OpenAPI specification served from the API itself
- A genuinely populated llms.txt, not a placeholder
- Bearer-token authentication with read and write scopes
12-month MRR forecast
3 scenarios
- Conservative
- $214k
- Base
- $268k
- Aggressive
- $310k
Capabilities
What API & MCP includes
All of it sits in the same workspace. Bastle is free while in beta, so nothing on this list is an add-on, an upgrade or a separate subscription.
One definition of every metric
The API returns figures from the same engine as the dashboards, so your internal tooling cannot drift into a second version of MRR.
Sandbox-friendly
The public demo dataset is reachable through the same endpoints, so you can build against a realistic shape before connecting real billing data.
Integer cents, everywhere
Money is integer cents in every request and response, with zero-decimal currencies handled correctly. No float rounding surprises.
Command line included
A CLI wraps the same API for scripting and one-off queries without writing an HTTP client first.
Related
Where this connects
API & MCP reads the same normalised billing history as the rest of Bastle, so a change in one place shows up in the others without an export.
Ask
A dashboard makes you assemble the answer yourself.
Learn moreMetrics
Most analytics tools hand you a number and ask you to trust it.
Learn moreData Rooms
The quarterly update deck is out of date the day after you send it, and you never find out whether anyone read past slide three.
Learn moreAlerts
Finding out about a bad week when you open the dashboard on Monday is finding out four days late.
Learn moreKeep going: see everything Bastle does, look up the maths behind any number in the metric glossary, or run a figure through the free calculators.
Practical questions are usually answered by the connector list, an honest comparison with the alternatives, or the same product framed for founders and for finance teams.
Frequently asked questions
Does Bastle send outbound webhooks?
What is the MCP server and do I need it?
Is the API included or a paid tier?
Can I push data from a billing system Bastle does not support?
How is the API authenticated?
Are there rate limits?
See your own numbers in about two minutes.
Connect Stripe and Bastle backfills your full history. Free while in beta — no card, no sales call.