invoices:write · Idempotency-Key: optional, recommended
Body
string
required
The customer’s contact id. The contact must be active, not archived, and set to
bidirectional or can_be_paid.array
required
At least one line item. Each takes
name (required, not blank), description, quantity (integer, 1 to 99,999,999, default 1) and unitAmountCents (required, at least 1). The invoice total is the sum of the line totals and must be at least $1.00.string
YYYY-MM-DD.string
YYYY-MM-DD.string
Invoice number shown to the customer.
string
Memo shown on the invoice.
object
Send right away. Without it the invoice is a draft with its link off. Takes
emails (recipients; default the customer’s email on file), subject and message. Send {} to use the defaults.Response
201 with the invoice.
With send, Cleo first checks that the business can receive, then finalizes the invoice and emails it. If the invoice is created but the email fails, the error message names the invoice id, and a retry with the same Idempotency-Key returns that answer instead of creating a second invoice. Send it with POST /v1/invoices/{invoiceId}/send.