> ## Documentation Index
> Fetch the complete documentation index at: https://docs.certgovernance.app/llms.txt
> Use this file to discover all available pages before exploring further.

# MSP Usage & Billing

> Track per-customer usage, monitor cert limits, and pull billing data via API.

## Overview

The **Usage & Billing** page (`/msp/usage`) gives a monthly view of what each customer org is consuming. It is the source of truth for billing your customers and for identifying orgs approaching their certificate limits.

## Reading the usage table

Each row is one customer org for the selected month.

| Column             | Description                                             |
| ------------------ | ------------------------------------------------------- |
| **Org**            | Customer organization name                              |
| **Region**         | Data node the org lives on                              |
| **Certs managed**  | Active certificates in the org at end of period         |
| **Expiring (30d)** | Certificates expiring within 30 days                    |
| **Expired**        | Certificates past their expiry date                     |
| **DTPs**           | Number of Domain Trust Profiles                         |
| **Active users**   | Users who logged in or made API calls during the period |
| **API requests**   | Total API calls made by the org                         |
| **Issued**         | New certificates issued (not renewals)                  |
| **Renewals**       | Automated renewals completed                            |
| **Approvals**      | Approval decisions made (approve + reject)              |
| **Cert limit**     | The org's licensed certificate ceiling                  |

Orgs **at or near their cert limit** are highlighted — amber for ≥80%, red for at or over limit.

## Selecting a period

Use the **Month** dropdown to view any past month. Usage data is captured in daily snapshots, so historical months reflect actual usage at that time — not a recalculation from current state.

<Note>
  The current month shows live data pulled directly from the database, not a snapshot. Past months always serve from the stored snapshot.
</Note>

## Exporting to CSV

Click **Export CSV** to download the current month's usage table. The CSV includes all columns and can be imported directly into billing spreadsheets or your PSA tool.

## Billing API tokens

External billing systems can pull usage data programmatically using a billing API token.

**Creating a token:**

1. Scroll to the **Billing API Tokens** section on the Usage & Billing page
2. Click **Generate Token**
3. Copy the token immediately — it is shown only once

**Using the token:**

```bash theme={null}
GET /msp/usage?month=2026-06&format=json
Authorization: Bearer <token>
```

Response is a JSON array of org usage rows for the requested month, in the same structure as the page table.

<Warning>
  Billing tokens have full read access to usage data across all your customer orgs. Store them as secrets and rotate them if compromised.
</Warning>

**Revoking a token:**

Click **Revoke** next to the token on the Usage & Billing page. It is invalidated immediately.

## Cert limit alerts

CertForge does not automatically enforce a hard stop when an org exceeds its cert limit — existing certificates continue to work. However:

* New issuances are blocked for orgs over their limit
* Orgs over limit appear highlighted in the Usage & Billing table
* The customer's dashboard shows a warning banner

When you see an org at or near its limit, you can either upgrade their license or work with them to retire unused certificates.
