API Overview
The Invoice AI REST API gives you programmatic access to every resource on the platform — invoices, clients, products, prices, and webhooks. It is a JSON API following conventional HTTP semantics:GET to read, POST to create, PATCH to update, DELETE to remove.
Base URL
All endpoints are served from a single versioned base:Versioning
The current version is v1, encoded in the URL path. When a breaking change is necessary, a new version prefix will be introduced (/api/v2) and the previous version will be supported for a migration window. Non-breaking additions — new optional fields, new optional query parameters, new resource types — may be made to an existing version at any time without notice.
OpenAPI Specification
A machine-readable OpenAPI 3.1 spec is available without authentication:Request Format
For any request that carries a body (POST, PATCH), set:
Content-Type will be rejected with a 400 error.
Idempotency
Mutating operations that could cause duplicate side effects — specificallyfinalize and pay — require an Idempotency-Key header. Other write endpoints accept but do not require one.
409 Conflict.
Response Envelope
Every successful response wraps its payload in a top-leveldata field:
Example: Fetch an Invoice
RequestError responses are not wrapped in
data. They use the
application/problem+json format described in the
Errors reference.Resource ID Prefixes
Every resource in Invoice AI uses a Stripe-style prefixed ID. The prefix tells you at a glance what type of object an ID refers to, which is useful when debugging logs or constructing URLs.
IDs are opaque strings. Do not parse or construct them — store and pass them back exactly as returned.
Monetary Amounts
All monetary amounts are represented as integers in the minor unit of the relevant currency — cents for USD and EUR, pence for GBP, and so on.
Amounts appear in fields such as
amount_due, amount_paid, unit_amount, and subtotal. All are integers.
HTTP Methods and Status Codes
The API uses standard HTTP methods and status codes:
Successful responses return one of:
For error codes and their meanings, see the Errors reference.