Create an invoice

POST https://app.speybooks.com/api/v1/invoices/

Creates a new invoice with one or more line items. The invoice is assigned a sequential invoice number automatically (e.g. INV-0043).

All monetary values (unitPrice, amounts) must be in minor units (pence). For example, £100.00 is sent as 10000.

Invoices can be created in draft or sent status. Draft invoices can be edited freely; sent invoices are immutable. When created with status sent, the corresponding double-entry journal transaction is created immediately.

Line items must include at least one entry. Each line requires a description, quantity, unit price, and VAT rate. The optional accountId categorises the revenue or expense to a chart of accounts entry.

Body parameters

contactId string required
dueDate string required
date
invoiceType string required
salespurchase
issueDate string required
date
lines array<object> required
min items: 1
Show child parameters
description string required
quantity integer required
min: 1
unitPrice integer required
min: 0
vatRate integer required
min: 0 · max: 100
accountId string optional
metadata object optional
notes string optional
max length: 2000
reference string optional
max length: 100
status string optional Default: draft
draftsent
terms string optional
max length: 2000

Response

201 Default Response
Show response fields
id string
invoiceNumber string

Error codes

400 Default Response