--help with its full flag list. Four rules apply everywhere:
- Flags are API fields. A
snake_casefield becomes a--kebab-caseflag. Nested fields carry their parent as a prefix:invoice_custom_section.skip_invoice_custom_sectionsis--invoice-custom-section-skip-invoice-custom-sections. - Objects and arrays take JSON.
--values '[{"key":"region","value":"eu"}]'. --inputtakes the whole body. Inline JSON or@file.json, sent as written. Include the resource wrapper, such as{"contract": {...}}. Other body flags are ignored when--inputis set.- Identifiers are positional, and nested resources take their parent first. Passing the wrong kind returns a not-found error that names the missing identifier, exit code 4.
Organizations take no identifier:
lago v2 organizations get reads the organization of the API key.
Resources in v2
lago v2 covers every operation of the pinned API v2 document: the product catalog (billable metrics, product categories, products, product filters, rate cards and rates), catalog plans with their applied rate cards and rate phases, Contracts with their applied rate cards, rate phases and current usage, plus customers, events, invoices, fees, credit notes, payments, taxes, webhook endpoints, logs, the organization and billing entities. Run lago --help for the v1 commands, documented in the v1 command reference.
The live API can be ahead of the spec pinned in your CLI release. lago version prints the pinned SPEC_V2_VERSION and SPEC_V2_SHA256. Reach an endpoint newer than your CLI, such as Contract alerts, with lago api.
Output on these pages
The right column shows what each command prints. Creates and updates print the identifier block by default. Reads print the resource, shown here as abridged--output json because that is the form to script against. Response bodies follow the Lago API v2 schema, so the API reference documents every field.
The global flags (--output, --query, --dry-run, --confirm, --profile, --mode), exit codes, pagination and safety gates are covered in the Lago CLI overview.
Command groups
Setup and diagnostics
init, whoami, doctor, version, upgrade, profile, completion
Helpers
api, alias, fixtures
Catalog as code
Reconcile the catalog with YAML files.
Billable metrics
Define what you meter.
Product catalog
Product categories, products, product filters.
Rate cards
Rate cards and their effective-dated rates.
Plans
Catalog plans, applied rate cards, rate phases.
Contracts
Create, publish, override, read usage, end.
Customers
Customers, their invoices, payments and payment methods.
Events
Send one, stream NDJSON, batch, list.
Invoices and fees
List, finalize, void, download, payment URL, fees.
Credit notes
Estimate, issue, void, metadata.
Payments
Payments, payment requests, receipts.
Taxes
Tax rates.
Webhooks
Webhook endpoints and signing keys.
Logs
Activity, API and security logs.
Organization
Organization settings and billing entities.