Documentation Index
Fetch the complete documentation index at: https://getlago.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Events list
You can monitor every event flowing into Lago from the UI. This is your primary tool for verifying that your integration is working and debugging any issues.Inspect a specific event
Click any event to see its details:
- Time: timestamp of the received event
- Customer ID: the ID of your customer
- Billable metric code: code of the billable metric linked to the event
- Billable metric name: name of the billable metric linked to the event
- Transaction ID: unique
transaction_idused as the idempotency key - IP Address: IP address of the event sender
- Client API: Lago Client API used to send the event
- Event payload: the full JSON arguments sent in the request

Possible warnings
Some events can be ingested but trigger unexpected behavior. Lago displays two possible warnings in the UI:- The event
codeis not related to an existing billable metric - The billable metric’s property used for the aggregation is not sent through this event
Retrieve current usage
- Dashboard
- API
The current usage endpoint retrieves real-time usage data for the current open billing period.
Because this billing period is still ongoing, invoice details are subject to change as new usage continues to accrue.Whether it’s fetched from the UI or the API, the response includes:Notice that if the events were sent with a timestamp in the future, they are taken into account in current usage. Yet, if you terminate the
subscription before the timestamp of this event, it will be ignored in the termination invoice.
- Aggregated usage data for the current period: Total units consumed and total customers’ cost (so far)
- Detailed breakdowns per metric: Units and amounts by metric and optional sub-breakdowns by filters or groupings (e.g., per project, environment, or AI models)
Note: Since the billing period is not yet finalized, the retrieved data should be treated as provisional. Final invoice values may differ.

Retrieve projected usage
- Dashboard
- API
Another endpoint provides an estimate of usage and billing amounts projected through the end of the current billing period.
It uses current consumption trends and billing configuration to forecast the likely totals at period close. Projected usage is listed under the projected usage endpoint.Whether it’s fetched from the UI or the API, the response includes:
- Projected total usage units and estimated billing amount for the full billing period
- Per-metric projections, including: Forecasted units and amounts for each billable metric and projections broken down by optional sub-filters or groups (e.g., per project, environment, or AI models)
Note: Recurring metrics, such as Seats, typically remain stable over time, unlike metered metrics which fluctuate. Therefore, the projected usage for a recurring metric is assumed to be equal to its current usage.

Retrieve past usage
- Dashboard
- API
The past usage endpoint allows you to retrieve customer usage data for closed billing periods.
Once a billing period has ended and is marked as closed, the associated usage data becomes final and immutable, ensuring consistency in billing and reporting.Modifying the price of a metric, or even deleting a metric, has no effect on past usage or previously issued invoices.
Once a billing period is closed and its associated invoice is finalized, the past usage quantities, pricing, and resulting fees are locked.
Retrieve usage analytics
The current, projected, and past usage endpoints above are scoped to a single subscription. When you need to look at usage across customers, plans, or metrics, or to break consumption down over a time window, use the usage analytics endpoint (GET /analytics/usage).
This endpoint aggregates the units consumed and the amounts billed, and lets you slice that data with a set of filters. It is the right tool when you want to answer questions like “how many units did this metric generate per day last month?” or “why was this invoice billed the way it was?”.
Usage analytics is part of Lago’s analytics layer and is a premium feature. The same data also powers the analytics dashboards in the UI.
Filters
All filters are optional and can be combined. When several filters are set, they are applied together (logicalAND), progressively narrowing the result set.
| Filter | Type | Description |
|---|---|---|
time_granularity | daily | weekly | monthly | Splits the result into time buckets at the chosen resolution. See The date window below. |
from_date | date (YYYY-MM-DD) | Start of the period the analytics are computed for. |
to_date | date (YYYY-MM-DD) | End of the period the analytics are computed for. |
currency | ISO 4217 (e.g. USD) | Returns amounts converted to this currency, so usage billed in different currencies can be compared on a single scale. |
external_customer_id | string | Restricts the analytics to a single customer. |
external_subscription_id | string | Restricts the analytics to a single subscription. |
plan_code | string | Restricts the analytics to subscriptions on a given plan. |
billable_metric_code | string | Restricts the analytics to a single usage-based billable metric. |
is_billable_metric_recurring | boolean | Keeps only recurring (true) or non-recurring (false) metrics. |
customer_type | individual | company | Filters by the type of customer. |
customer_country | ISO 3166-1 alpha-2 (e.g. US) | Filters by the customer’s billing country. |
start_of_period_dt, end_of_period_dt), the billable_metric_code, the units consumed, and the billed amount_cents in amount_currency.
The date window
The combination offrom_date, to_date, and time_granularity is what makes this endpoint useful for reconciliation.
from_date/to_datedefine the window the analytics cover. Set them to the start and end of a billing period to look at exactly what a given invoice was computed from.time_granularitycontrols how that window is sliced. Withdaily, you get one row per day per metric, so you can see the units that accrued each day and the corresponding amount, rather than a single aggregated total.
/analytics/usage over that invoice’s billing period with time_granularity=daily, filtered on the relevant external_subscription_id and billable_metric_code. The day-by-day series shows exactly when consumption spiked, lets you tie each day’s units to the amount they generated, and makes it possible to trace the invoiced total back to the underlying daily usage.