https://api.getlago.com/api/v1. Keep credentials in server-side infrastructure and never paste a production key into a prompt, browser, mobile application, source file, or client-visible log.
1. Discover
Read the API overview, thebearerAuth security scheme in the OpenAPI discovery profile, and the complete OpenAPI specification. These are the authoritative discovery sources for the API base URL, operations, and request shapes.
2. Pick a method
Use a Lago organization API key for server-to-server REST requests. Do not assume delegated authorization, federated identity, or anonymous agent registration is available unless Lago publishes a new supported flow in these docs. For documentation search and retrieval, the Lago Docs MCP server does not require a Lago organization API key. That read-only documentation surface is separate from the authenticated billing API.3. Register
There is no agent-callable registration endpoint. An authorized organization administrator creates an API key in Lago organization settings and transfers it through the organization’s approved secret-management process. Agents must not automate account creation, key generation, or credential transfer by scraping the Lago interface.4. Claim
Lago does not expose an automated claim ceremony for API credentials. The human administrator remains responsible for approving the workload, environment, scope, and secret store that receive a key. If an agent lacks a credential, it must ask an authorized operator rather than inventing or harvesting one.5. Use the credential
Send the key in the HTTPAuthorization header:
6. Errors
401 Unauthorizedmeans the key is missing, invalid, expired, or no longer accepted.403 Forbiddenmeans the authenticated organization cannot use the requested feature or action.422 Unprocessable Entitymeans the request is authenticated but fails validation.429 Too Many Requestsmeans the organization exceeded its REST API rate limit. Use the documented rate-limit headers before retrying.
401, 403, or validation failures without operator intervention or a corrected request.