Authentication
Authentication is required for most endpoints, via an API key provided in theAuthorization
header as:
HTTP status codes
HTTP status codes communicate the outcome of each API request. For example, a successful request returns200 OK
, while a malformed request returns 400 Bad Request
. More information about error codes can be found in the Errors section.
Request and response body
Unless otherwise noted, both requests and responses use a JSON body, and theContent-Type
header is expected to be set to application/json
.
Query parameters
Query parameters allow you to filter, search, and paginate API results. The Lago API supports several types of query parameters, described below.Simple parameters
Simple query parameters are sent as key-value pairs. These parameters are used for pagination or to filter results by a single value:List subscriptions
The customer external unique identifier (provided by your own application)Example:
"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
Array parameters
Array parameters are sent as multiple entries of the same key, always ending with square brackets ([]
). These parameters are used to filter results by multiple values:
List applied coupons
The coupon codes to filter the applied coupons by.