Getting started with our API

The ChartMogul API lets you import and export subscription data programmatically — use it when ChartMogul's integrations don't support your billing system, data warehouse, or CRM.

  • Import customer and invoice data from an unsupported billing system.
  • Send lead and trial data from an external CRM.
  • Add custom attributes to customer and contact records for segmentation.
  • Manage contacts — including tasks, sequences, and custom attributes — via the Contacts API.
  • Export subscription metrics for external reporting.

Here’s what we cover in this article:

Resources and further reading:

Setting up the API

You’ll need to be a Staff, Admin or Owner to create a read & write API key.

To get started, create a read & write API key to authenticate your account.

API data is imported using a custom source — a named data container that groups your imported records. Add a new custom source programmatically or in the app by navigating to Settings > Sources. Then:

  1. Click Add Source and select Custom Source.
  2. Enter a unique name in the Name field.
  3. Click NEXT to create the custom source.

Once you're set up, visit our Developer Hub for guides and documentation on building an integration.

How to Use the API for Common Scenarios

Below are common scenarios and the API solutions our customers use.

How to integrate your billing system or data warehouse

Scenario: You want to import data from a billing system that is not integrated with ChartMogul or stored in a data warehouse.

Solution: Use the API to build an integration for importing customer and invoice data. If your business tracks subscriptions directly rather than billing by invoice, you may need a different import method. Learn more in Getting started with importing data for Subscription Analytics.

Your team can customize how data is sent and edit it as needed. The key data points required to build an integration are:

  • Customers — their unique identifier, such as an ID or email address.
  • Plans — sometimes called products, which customers pay for on a recurring basis.
  • Invoices — sometimes called transactions, which must include information about the customer, the amount billed, their plan, their related subscription and the service period dates.
  • Cancellations — the date a subscription was canceled.

View the full list of data points in our Developer Hub.

ChartMogul generates subscriptions from line item data in each invoice. Customers become subscribers and contribute to MRR after their first invoice. Transaction data is optional, but ChartMogul uses it to generate cash flow reports.

Learn how Cronofy integrated the ChartMogul API on our blog.

How to integrate your CRM software

ChartMogul includes built-in CRM capabilities — tools that help you manage leads, track sales activities, and collaborate with your team. Learn more on our blog or follow the CRM quick setup guide.

Scenario: You’ve integrated your billing system and ChartMogul is receiving customer and subscription data. However, your business tracks leads, trials, and other sales activities in a separate CRM and you want to bring this data into ChartMogul.

Solution: Use the API to integrate your CRM and send lead, trial, and free subscriber data to ChartMogul before the customer is created in your billing system. Once connected, you'll be able to analyze this data using the Leads and Free Trials reports.

The API also includes endpoints for opportunities (deals in your sales pipeline), tasks, and call notes — you can also update and delete notes via the API. Use these to sync your sales pipeline and team activities with ChartMogul. Opportunities also support bulk import.

To enrich customer records, use the Add Custom Attributes to a Customer endpoint. Custom attributes are key-value pairs you define — for example, marketing campaign data or product usage. They add extra filters for segmentation and reporting.

How to export metrics to an external reporting tool

Scenario: You want to share your ChartMogul metrics with your team or investors.

Solution: Use the API to export key subscription metrics and add them to reports or presentations. Send a complete overview or segment the data by plan or region.

Still need help? Contact Us Contact Us