/api/v2 operations: product catalog, rate cards, plans, contracts, billing, customers, organizations, billing entities, billable metrics, events, logs, and webhook endpoints. It lists request fields, responses, and authentication for each operation. Read or download it without a Lago account. You need an organization’s API key to call its authenticated operations.
API v2 is in beta. Endpoints return the
X-Lago-Endpoint-Status: beta header.
The v2 document only lists endpoints checked against their v2 implementation. Some other
/api/v2 paths fall back to v1 controllers and are not described in it. Do not assume a v1 endpoint exists in v2 or returns the same shape. Features v2 does not cover yet work with /api/v1 only and are described in the v1 specification.
Choose the right interface
OpenAPI describes the API. The CLI, SDKs, and tools execute requests. An agent with HTTP access can use the API directly. Neither the CLI nor the Lago plugin is a prerequisite for that path.
The Python, JavaScript, Ruby, and Go SDKs ship a v2 client generated from this specification, in beta. The Lago MCP server exposes v1 operations only. It has no contract or product catalog tools.
Use the contract with an agent or generator
- Select the API region and organization explicitly. Cloud US uses
https://api.getlago.com/api/v2. Cloud EU useshttps://api.eu.getlago.com/api/v2. Self-hosted instances expose the same paths under/api/v2on your API host. - Keep API keys server-side and outside prompts or generated source files.
- Most catalog and contract operations require the product catalog to be enabled on the organization. A valid schema does not mean the organization can call the operation.
- v2 lists use cursor pagination (
limit,after,before), related objects are returned only throughexpands[], and errors carry acodeand adetailsarray. Generated clients must handle these. See Pagination, Expansions, and Errors. - Pin the contract revision when generating a client or tool, and review contract changes before regenerating. v2 is in beta, so operation and field names can change between revisions. The OpenAPI repository tracks the source in
src/v2/and the bundle inopenapi-v2.yaml.lago versionreports the v2 contract bundled with an installed CLI release asspec_v2_versionandspec_v2_sha256. - Review write requests and test in an isolated organization before changing production billing. A schema describes a request’s shape. It does not authorize the operation or confirm the intended amount.
Explore with Swagger or Postman
Browse the v2 operations in Swagger. The selector at the top of the page switches between v1 and v2. Lago does not publish a Postman collection for v2. To import the contract into Postman:- Open Import and choose the option to import from a link.
- Enter
https://swagger.getlago.com/openapi-v2.yamland complete the import. - Generate a collection from the imported API if needed.
- Set the base URL for your region:
https://api.getlago.com/api/v2(US),https://api.eu.getlago.com/api/v2(EU), or your self-hosted host followed by/api/v2. Provide your organization’s API key through Postman’s secret or environment controls.