Update a draft invoice
PUT
https://app.speybooks.com/api/v1/invoices/{id}Replaces the fields and line items of a draft invoice. Only invoices with status draft can be updated — attempting to update a sent, paid, or other non-draft invoice returns a 400 error.
The request body has the same shape as the create endpoint, minus invoiceType and status which are immutable after creation. Line items are replaced entirely — existing lines are deleted and the provided lines are inserted. This is a full replacement, not a merge.
Metadata, if provided, also replaces existing metadata entirely.
Path parameters
id string requiredBody parameters
contactId string requireddueDate string requiredissueDate string requiredlines array<object> requiredShow child parameters
description string requiredquantity integer requiredunitPrice integer requiredvatRate integer requiredaccountId string optionalmetadata object optionalnotes string optionalreference string optionalterms string optionalResponse
200 Default Response
Show response fields
id stringinvoiceNumber stringError codes
400 Default Response
404 Invoice not found or not in draft status.