Skip to main content

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:
Every path in this reference is relative to that base. For example, the invoice list endpoint is:

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.
Subscribe to the changelog to be notified of new fields or deprecation timelines before they affect your integration.

OpenAPI Specification

A machine-readable OpenAPI 3.1 spec is available without authentication:
Use it to generate type-safe client SDKs, import into Postman or Insomnia, or feed into any OpenAPI-aware toolchain.

Request Format

For any request that carries a body (POST, PATCH), set:
Send the body as a JSON object. Requests with a body but a missing or wrong Content-Type will be rejected with a 400 error.

Idempotency

Mutating operations that could cause duplicate side effects — specifically finalize and payrequire an Idempotency-Key header. Other write endpoints accept but do not require one.
Use a UUID v4 generated client-side. Retrying with the same key and the same body returns the original response without re-executing the operation. Retrying with the same key but a different body returns 409 Conflict.
POST /invoices also requires an Idempotency-Key. A retried create without one produces a second, duplicate draft that is indistinguishable from the first — you would have no way to target the correct invoice for a subsequent finalize call.

Response Envelope

Every successful response wraps its payload in a top-level data field:
List endpoints extend the envelope with a cursor for the next page:

Example: Fetch an Invoice

Request
Response
Error 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.
Never send or store amounts as floating-point numbers. Integer minor units avoid rounding errors that compound across line items and tax calculations. A value of 250000 is unambiguous; 2500.00 as a float is not.
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.