List invoices
The organization's invoices, newest first, without their lines. Pass the last id as after to get the next page while has_more is true.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
status?stringOnly invoices in this status.
"open""paid""void""uncollectible"after?stringContinue after this id (the last of the previous page).
length <= 64limit?integerAt most this many (default 20).
1 <= value <= 100Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"A page of invoices.
application/json- response
object*"list""list"data*array<>has_more*booleanimport { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.billing.invoices.list();{ "object": "list", "data": [ { "object": "invoice", "id": "inv_01k7c8m4q2f3e9v6t5r1n0p8yz", "number": "COSS-000042", "kind": "period", "status": "paid", "currency": "usd", "period": { "start": "2026-10-01T00:00:00.000Z", "end": "2026-11-01T00:00:00.000Z" }, "subtotal": 7300, "discount": 0, "credit": 2500, "tax": 0, "total": 4800, "amount_paid": 4800, "amount_due": 0, "collection_method": "charge_automatically", "due_at": "2026-11-01T00:20:00.000Z", "finalized_at": "2026-11-01T00:20:00.000Z", "paid_at": "2026-11-01T00:21:00.000Z", "voided_at": null, "hosted_url": "https://invoice.stripe.com/i/acct_123/test_YWNjdF8x", "pdf_url": "https://pay.stripe.com/invoice/acct_123/test_YWNjdF8x/pdf" } ], "has_more": false}List credits GET
The organization's credits, newest first: each month's plan credit, prepaid commitments and credits from COSS support (in dollars, or free units of a product), with what's left. Only usable ones by default (`status=all` for every one). Pass the last `id` as `after` to get the next page while `has_more` is true.
Add a sending domain POST
Claims the domain for the organization and returns the DNS records to publish. Domains belong to the organization, not to one environment, so every API key of the organization sees the same domains. The records are checked repeatedly in the background and verification gives up after 72 hours; until the domain is `verified`, live keys cannot send from it.