Skip to main content
Scope: payables:write  ·  Idempotency-Key: optional, recommended
Send exactly one of contactId or contact. A bill named only by contact.name has no linked vendor: it stays a draft with contact.id: null and cannot be submitted until someone links the vendor in the Cleo web app. Use contactId for any bill you want paid.

Body

string
An existing contact to bill from. Links the vendor so the bill can be submitted and paid. The contact must be active, not archived, and set to bidirectional or can_pay, or the call answers 409 contact_not_payable.
object
A vendor named in free text. name (required) and email (optional). The bill stays a draft.
boolean
default:"false"
true creates the bill submitted, not as a draft, and sends it into the business’s approval flow. Requires contactId, a total of at least $1.00 (100 cents), and at least one item with a name, a quantity above 0 and a unitAmountCents of at least 1.
integer
required
Total in cents, at least 1.
string
YYYY-MM-DD.
string
YYYY-MM-DD.
string
Your bill or invoice number.
string
Memo.
array
Line items. Each takes name, description, quantity (integer, default 1), unitAmountCents (integer) and customFields, the line’s answers to line-level (INVOICE_ITEM) fields in the same shape as the bill’s.
array
Answers to the business’s bill-level (ROOT) custom fields: [{ fieldId, value }]. Take each fieldId from GET /v1/payable-custom-fields. The shape of value depends on the field’s type. See Write answers. Requires contactId.
Unknown fields answer 400 validation_error. The body takes no category or tags.

Required custom fields

Behavior change. The API used to skip required custom fields. Now, if the business has a required bill-level field, a submit: true create without its answer fails with 422 validation_error. Send the answer in customFields.
  • submit: true. Every required, turned-on bill-level field needs an answer. The 422 names each missing field by label and id.
  • A draft that sends no bill-level answer. Required fields are not checked. Answer them when you submit.
  • A draft that sends any bill-level answer. It must answer every required bill-level field, as on the Cleo web app’s bill form.
Answers are checked before anything is written, so a refused request creates no bill. See Required fields.

Example

Here evt-100 is the externalId of an option on the bill-level Event dropdown, and the line answers a short-text field.

Response

201 with the payable, including items, category, tags, customFields, attachments, createdAt and updatedAt. A submitted bill is pending_approval, or approved when the business’s rules approve it without a person.

Errors

Without an Idempotency-Key, each retry creates another bill.