Invio REST API

Category Developers Plans Paid plans By Invio

An API token lets your own scripts, a CI job or an automation tool do what you do in Invio: draft invoices, add clients, record expenses and read what you are owed. It runs on the same engine as the Invio AI connector, so the same safety rules apply.

Download for AI assistants

Building with an AI assistant? Give it this file in Claude, ChatGPT or Cursor and it can write correct code against the API.

One Markdown file with the base URL, authentication, limits, errors and every endpoint with its parameters and examples, including the rule that sending an invoice needs {"confirm": true}. It is generated from the same definitions as this page and the OpenAPI document, so it never disagrees with them.

What it is

Plain JSON over HTTPS. One token belongs to one business.

Drafts, not surprises
Creating an invoice or quote makes a draft. Nothing reaches a client until you call the send endpoint on purpose.
Invio does the maths
You send line items. Totals, GST, numbering and currency come from your business settings, the same as in the app. You never send an amount of tax.
The same rules as the app
A request Invio would refuse in the app is refused here: missing bank details, an unverified email address, the free invoice limit, a voided invoice.
Your business only
A token can only see and change the business it was created for. There is no field that lets a request reach another business.

Get a token

Tokens are for paid plans. Free accounts can see the card but not create one.

1

Open Settings

Go to Settings, then AI connections, and stay on the Invio tab.

2

Create a token

Under API tokens choose Create token and give it a name that says what will use it, such as "Nightly export". The name is how you tell your tokens apart later.

3

Copy it now

The token is shown once. Invio keeps only a fingerprint of it, so it cannot be shown again. Store it where you keep passwords or CI secrets.

4

Revoke it when you are done

Revoke it from the same card. Anything using it stops working straight away. If a token leaks, revoke it and create a new one.

Send the token as Authorization: Bearer <token>. Never put it in a web address. A business can hold up to 10 live tokens.

Your first request

List the five most recent unpaid invoices.

Request
curl "https://www.invio.co.nz/api/v1/invoices?status=unpaid&limit=5" \
  -H "Authorization: Bearer <your-api-token>"

The answer is a JSON object with the matching invoices in rows, the totals for every match, and the filters Invio actually applied. List endpoints return at most 20 rows; narrow the window with dateFrom and dateTo to read further back.

Create an invoice

Name the client, list the work. The client is matched by name or created from the email address.

Request
curl -X POST "https://www.invio.co.nz/api/v1/invoices" \
  -H "Authorization: Bearer <your-api-token>" \
  -H "Content-Type: application/json" \
  -d '{"clientName":"Acme Plumbing","clientEmail":"accounts@acme.example","items":[{"description":"Callout and repair","quantity":2,"rate":95}]}'

The response includes the invoice id, its number and the total Invio calculated. If a client with that name already exists, it is used and nothing is duplicated.

Send an invoice

The one call that emails a client, so it asks you to confirm.

Request
curl -X POST "https://www.invio.co.nz/api/v1/invoices/<invoice-id>/send" \
  -H "Authorization: Bearer <your-api-token>" \
  -H "Content-Type: application/json" \
  -d '{"confirm":true}'

Without {"confirm": true} nothing happens and you get a 400. With it, the same checks as a send from the app apply and cannot be skipped. If the issue date is in the future the invoice is scheduled instead of sent. Every send is written to your account's audit log with the token that made it.

All endpoints

Base path /api/v1. Every request needs the Authorization header.

GET /invoices
List invoices
POST /invoices
Create a draft invoice
GET /invoices/{id}
Get one invoice
POST /invoices/{id}/send
Send an invoice to the client
GET /clients
List clients
POST /clients
Create a client
PATCH /clients/{id}
Update a client
GET /quotes
List quotes
POST /quotes
Create a draft quote
GET /expenses
List expenses
POST /expenses
Record an expense
GET /reports/revenue
Revenue summary
GET /outstanding
Who owes you
GET /business
Business settings

Errors

Every error has the same shape, so a script can branch on the code.

Error response
{
  "error": {
    "code": "validation_error",
    "message": "items.0.rate: Required"
  }
}
401 missing_token, invalid_token
No token was sent, or it is wrong or has been revoked. Check the Authorization header.
403 plan_required, plan_limit
The REST API is on paid plans, or a limit of your plan was reached (for example the free invoice limit when sending).
404 not_found
No such record on the business the token belongs to. Another business's record is always "not found".
409 client_ambiguous, invoice_voided, email_verification_required
The request conflicts with the state of a record or your account, for example two clients match the name you gave, or your email address is not verified yet.
422 validation_error, unknown_field
A field is missing, wrong, or not one this endpoint accepts. The message names it. Nothing was changed.
429 rate_limited
The token used its hourly allowance. The Retry-After header says how many seconds until it resets.

Limits and what is left out

Each token can make 600 requests an hour.

The API covers what Invio's AI connector can do, and nothing it cannot. These are not available:

Reading one client, quote or expense by id. Use the list endpoints with a filter.
Editing or deleting an invoice, quote or expense, voiding an invoice, or marking one as paid.
Sending a quote.
Changing a client's email address, where a client's invoices are sent, or a client's GST-free default. Those decide where documents go and how they are taxed, so only a person can change them in the app.
Changing your business settings, bank details, tax numbers, region or invoice numbering.

OpenAPI document

Generate a client library or import the API into your own tools.

The full description of every endpoint, parameter and body is an OpenAPI 3.1 file: https://www.invio.co.nz/api/v1/openapi.json. It is generated from the same definitions the API validates with, so it matches what the API accepts.

Building with an AI coding assistant? Download the same documentation as a single Markdown file to give it:

Related guides

Connect your AI
Payment reminders
Recurring invoices
All guides →

Ready to get started?

Create your account and put this guide into practice in Invio.

Start free. Choose a plan when you need more.

Invio REST API: API tokens for scripts, CI and automations | Invio