API reference
The same JSON API that powers the dashboard. Requests are authenticated with your session cookie.
Conventions
- All bodies are JSON. Dates use
YYYY-MM-DD; percentages are 0-100. - Errors return
{ "error": "message", "code"?: "PLAN_LIMIT" }with status 400, 401, 402, 403, 404 or 500. - Every request is scoped to the signed-in user by database row-level security.
Invoices
- GET
/api/invoicesList invoices. Query: status, q (client name), limit (≤500), offset.
- POST
/api/invoicesCreate an invoice. Returns 402 PLAN_LIMIT when the Free plan monthly limit is reached.
{ "invoiceNumber": 42, "currency": "USD", "businessName": "Acme Studio", "clientName": "Globex Ltd", "issueDate": "2026-10-05", "dueDate": "2026-10-19", "lineItems": [{ "description": "Design", "quantity": 10, "rate": 80, "discount": 0, "amount": 800 }], "subtotal": 800, "overallDiscount": 0, "taxRate": 20, "totalAmount": 960, "status": "pending" } - GET
/api/invoices/:idFetch one invoice with all fields.
- PATCH
/api/invoices/:idUpdate any fields, e.g. { "status": "paid" }.
- DELETE
/api/invoices/:idDelete an invoice.
- POST
/api/invoices/:id/duplicateCopy an invoice with the next number and today's date.
- GET
/api/invoices/nextNext sequential invoice number for the account.
- GET
/api/invoices/exportDownload all invoices as CSV (Pro & Business).
Clients
- GET
/api/clientsList saved clients.
- POST
/api/clientsCreate a client.
{ "name": "Globex Ltd", "email": "ap@globex.com", "address": "…", "taxId": "GB123" } - PATCH
/api/clients/:idUpdate a client.
- DELETE
/api/clients/:idDelete a client (invoices keep their copy of the details).
Account
- GET
/api/profileProfile, business defaults and current subscription.
- PATCH
/api/profileUpdate profile and invoice defaults.
- GET
/api/account/exportDownload all your data as JSON.
- DELETE
/api/accountPermanently delete the account and all data.
Billing
- POST
/api/billing/checkoutStart a Stripe Checkout session.
{ "plan": "pro", "interval": "month" } - POST
/api/billing/portalOpen the Stripe customer portal.
Public
- GET
/api/healthService health for monitors.
- POST
/api/contactSend a message to support.