Skip to content
Developers

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/invoices

    List invoices. Query: status, q (client name), limit (≤500), offset.

  • POST/api/invoices

    Create 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/:id

    Fetch one invoice with all fields.

  • PATCH/api/invoices/:id

    Update any fields, e.g. { "status": "paid" }.

  • DELETE/api/invoices/:id

    Delete an invoice.

  • POST/api/invoices/:id/duplicate

    Copy an invoice with the next number and today's date.

  • GET/api/invoices/next

    Next sequential invoice number for the account.

  • GET/api/invoices/export

    Download all invoices as CSV (Pro & Business).

Clients

  • GET/api/clients

    List saved clients.

  • POST/api/clients

    Create a client.

    { "name": "Globex Ltd", "email": "ap@globex.com", "address": "…", "taxId": "GB123" }
  • PATCH/api/clients/:id

    Update a client.

  • DELETE/api/clients/:id

    Delete a client (invoices keep their copy of the details).

Account

  • GET/api/profile

    Profile, business defaults and current subscription.

  • PATCH/api/profile

    Update profile and invoice defaults.

  • GET/api/account/export

    Download all your data as JSON.

  • DELETE/api/account

    Permanently delete the account and all data.

Billing

  • POST/api/billing/checkout

    Start a Stripe Checkout session.

    { "plan": "pro", "interval": "month" }
  • POST/api/billing/portal

    Open the Stripe customer portal.

Public

  • GET/api/health

    Service health for monitors.

  • POST/api/contact

    Send a message to support.