Skip to content
TriedDocs
Account

List invoices

List the workspace's purchase, auto-recharge and usage invoices.

GEThttps://api.tried.com.au/billing/invoices

Returns the workspace's invoices, newest first, up to 200. Any role can call it.

Request#

This endpoint takes no path, query or body parameters.

Example request#

curl https://api.tried.com.au/billing/invoices \
  -H "Authorization: Bearer $TRIED_API_KEY"
const res = await fetch("https://api.tried.com.au/billing/invoices", {
  headers: { Authorization: `Bearer ${process.env.TRIED_API_KEY}` },
});
const invoices = await res.json();
import os, requests

res = requests.get(
    "https://api.tried.com.au/billing/invoices",
    headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
)
invoices = res.json()

Response#

200 OK

[
  {
    "invoice_id": "inv_3d5f7a9c1e3b5d7f9a1c3e5b",
    "number": "TR-202610-3138402",
    "kind": "purchase",
    "amount": 50,
    "currency": "AUD",
    "status": "paid",
    "lines": [
      {
        "description": "Credit purchase ($50.00)",
        "quantity": 1,
        "unit_amount": 50,
        "amount": 50
      }
    ],
    "period_start": null,
    "period_end": null,
    "provider": "mock",
    "created_timestamp": 1760313600000,
    "html_url": "/billing/invoices/inv_3d5f7a9c1e3b5d7f9a1c3e5b/html"
  }
]

An array of invoices.

Field Type Description
invoice_id string Invoice ID, prefix inv_.
number string Invoice number, TR-YYYYMM- plus 7 digits.
kind string purchase, auto_recharge or usage.
amount number Total in AUD.
status string paid for invoices Tried creates. Unpaid statuses (open, unpaid, past_due, failed) drive the account state.
lines object[] Line items: description, quantity, unit_amount and amount.
period_start, period_end integer or null Billing period for usage invoices, Unix ms. null for purchases.
provider string stripe or mock.
html_url string Path of the printable invoice. See Get invoice HTML.

Errors#

Status When
401 Missing or invalid API key.
403 The key's IP allowlist or scopes reject the request. This route needs the agents scope (the path contains invoices, which matches the voice scope rule), or a key with admin.
429 Rate limit exceeded. See Rate limits.

See Errors for the body format.