canonical: https://jentic.com/apis/chartmogul.com/chartmogul-api

# ChartMogul API

Jentic publishes the only available OpenAPI specification for ChartMogul API, keeping it validated and agent-ready. ChartMogul is a subscription-analytics platform that turns billing data into SaaS metrics like MRR, ARR, ARPA, customer churn rate, LTV, and customer count. The API uses HTTP basic authentication (API key as username, empty password) and exposes 13 endpoints covering account info, data sources, customers, plans, invoices, and the core metric series.

## For AI agents

Read SaaS subscription metrics - MRR, ARR, ARPA, churn, LTV - plus customers, plans, and invoices from ChartMogul. Basic-auth REST API with 13 endpoints.

## Scope

Does not handle invoice generation, payment processing, or dunning - use for reading SaaS subscription metrics and billing data already imported into ChartMogul only.

## Capabilities

- Retrieve current account info and connected data sources via /account and /data_sources
- Pull MRR and ARR time series from /metrics/mrr and /metrics/arr for revenue dashboards
- Track customer churn rate and customer count over time via the /metrics/customer-* endpoints
- Fetch ARPA and LTV trends to monitor unit economics
- List customers, plans, and invoices to reconcile billing data with revenue metrics
- Delete a data source connection when sunsetting an integration via DELETE /data_sources/{data_source_uuid}
- Retrieve a single data source by UUID to verify status before relying on its metrics

## Use cases

### Power an executive SaaS metrics dashboard

Pull MRR, ARR, ARPA, churn rate, LTV, and customer count from the metrics endpoints to populate a weekly executive dashboard. ChartMogul already normalises billing data from Stripe, Recurly, and other sources, so a single agent can refresh six headline metrics with six API calls and avoid building any of the math from raw invoices.

Example prompt: Call /metrics/mrr, /metrics/arr, /metrics/arpa, /metrics/customer-churn-rate, /metrics/ltv, and /metrics/customer-count for the last 13 weeks and emit the values as a single JSON payload

### Reconcile billing data with revenue metrics

List customers, plans, and invoices then cross-check counts against /metrics/customer-count and the MRR series to spot data-source drift. This is the right sanity check after a billing migration or when ChartMogul numbers diverge from the internal source of truth.

Example prompt: List customers and invoices for the last 30 days, then call /metrics/customer-count and /metrics/mrr for the same window and report any deltas greater than 5%

### Sunset a deprecated billing data source

When migrating from one billing provider to another, list /data_sources to identify the deprecated connection and call DELETE /data_sources/{data_source_uuid} once cutover is complete. The agent can verify by re-listing data sources and confirming the deprecated entry is gone.

Example prompt: List ChartMogul data sources, find the one named 'Stripe (legacy)', call DELETE /data_sources/{data_source_uuid}, and confirm it no longer appears in the list

### Answer SaaS-metric questions inside an AI agent

An AI agent uses Jentic to discover ChartMogul's metric endpoints, loads the schema for /metrics/mrr, and answers questions like 'what was MRR last Friday?' or 'is churn rising?' without bespoke code. Because basic auth is handled by Jentic's vault, the API key never enters the agent's prompt.

Example prompt: Search Jentic for 'get chartmogul mrr', load the operation schema, retrieve the MRR series for the last 90 days, and report whether MRR grew or shrank week over week

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /metrics/mrr | Retrieve MRR time series |
| GET | /metrics/arr | Retrieve ARR time series |
| GET | /metrics/customer-churn-rate | Retrieve customer churn rate |
| GET | /metrics/ltv | Retrieve LTV |
| GET | /metrics/customer-count | Retrieve customer count |
| GET | /customers | List customers |
| GET | /invoices | List invoices |
| GET | /data_sources | List data sources |

## Key resources

- **Account** — Retrieve account-level identity and configuration
- **Data Sources** — List, retrieve, and delete billing data source connections
- **Customers** — List customer records normalised across data sources
- **Plans** — List subscription plans imported from billing systems
- **Invoices** — List invoices imported from connected billing systems
- **Metrics** — Retrieve MRR, ARR, ARPA, customer count, customer churn rate, and LTV time series

## Why Jentic

- **Setup:** Wiring ChartMogul by hand means handling its HTTP Basic auth with the API key, targeting the v1 host, and attaching credentials to every metrics and customer call yourself. Through Jentic you install once, import ChartMogul from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** This ChartMogul surface reads metrics and billing data through flat operation paths rather than a per-resource URL, so limit the agent to the operations it needs, such as reading MRR or listing customers. You choose which operations it may call, and this surface is read-only over already-imported data.
- **Credential handling:** Your ChartMogul API key is stored once, encrypted, by your own Jentic One instance and used to sign the Basic auth header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get chartmogul mrr' or 'list chartmogul customers', and Jentic returns the matching ChartMogul operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **ChartMogul (main)** — Companion ChartMogul surface - same vendor, different operation slice.
- **Stripe API** — Stripe is a common upstream billing source for ChartMogul.
- **Chartbrew API** — Chartbrew is a self-hosted BI tool - chart ChartMogul metrics there for fully owned dashboards.

## FAQ

### Why is there no official OpenAPI spec for ChartMogul API?

ChartMogul does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call ChartMogul API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the ChartMogul API use?

The ChartMogul API uses HTTP basic authentication. Send your ChartMogul API key as the username and an empty string as the password. Through Jentic, the API key is stored in your encrypted Jentic One instance and injected at execution time so it never enters the agent's prompt.

### Can I retrieve MRR with the ChartMogul API?

Yes - call GET /metrics/mrr. The endpoint returns an MRR series for the requested date range. Pair it with /metrics/arr, /metrics/arpa, /metrics/customer-churn-rate, /metrics/customer-count, and /metrics/ltv to populate a complete SaaS-metrics dashboard.

### How do I delete an old billing data source?

List data sources with GET /data_sources to find the UUID, then call DELETE /data_sources/{data_source_uuid}. ChartMogul will stop ingesting from that source going forward; historical metrics derived from it remain in the underlying record.

### How do I get ChartMogul metrics through Jentic?

Run pip install jentic, set JENTIC_AGENT_API_KEY, then search 'get chartmogul mrr'. Jentic returns the /metrics/mrr operation with its query parameter schema, so the agent can supply start-date and end-date and execute without browsing the docs.

### Are there documented rate limits for the ChartMogul API?

The OpenAPI spec does not declare per-key rate-limit quotas. ChartMogul publishes limits in its developer documentation rather than the spec; build retry-with-backoff logic for 429 responses and read any RateLimit headers the live service returns.

### Can I limit what my agent is allowed to do with the ChartMogul API?

Yes. Because Jentic One is self-hosted, you set the rules that decide which ChartMogul operations and credentials your agent can use, granting only the flat operation paths it needs, such as reading MRR from GET /metrics/mrr or listing customers from GET /customers. This surface is read-only over data already imported into ChartMogul, so an agent scoped to it cannot alter billing records, and your API key is signed into the Basic auth header at execution time rather than exposed to the agent. If you never grant DELETE /data_sources/{data_source_uuid}, the agent cannot remove a data source.
