List invoices
Owners and admins only. Newest first.
GET
/billing/invoicesAuthorization
AuthorizationBearer token · headerrequired`MEDIAN_KEY` from Settings under API, or an MCP OAuth access token. A key acts as the organization; a token acts as the person who approved it.
Query parameters
limitintegerInvoices per page.
min 1 · max 100 · default: 25
cursorstringContinuation cursor from the previous page.
Responses
200A page of invoices.
pageobject[]requiredShow propertiesHide properties
Array of
objectidstringstatusstringamountPaidCentsintegeramountDueCentsintegercurrencystringoccurredAtnumberhostedUrlstring | nullisDonebooleanrequiredcontinueCursorstringrequired400The request is malformed, and the message names the field.
errorobjectShow propertiesHide properties
codestringmessagestring401The bearer token is missing, revoked, or expired.
errorobjectShow propertiesHide properties
codestringmessagestring403The token's person does not hold the role this needs.
errorobjectShow propertiesHide properties
codestringmessagestring429Too many requests. Wait the seconds in `Retry-After`. Limits depend on the plan. See [rate limits](/api/errors-and-limits#rate-limits).
errorobjectShow propertiesHide properties
codestringmessagestringRequest
curl -X GET "https://api.median.sh/v1/billing/invoices" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.median.sh/v1/billing/invoices", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});Response
{
"page": [
{
"id": "string",
"status": "string",
"amountPaidCents": 0,
"amountDueCents": 0,
"currency": "string",
"occurredAt": 0,
"hostedUrl": "string"
}
],
"isDone": true,
"continueCursor": "string"
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}