Update an invoice

​

Updates an invoice. Every field is optional, and anything you leave out keeps its current value.

Only four things can change here: who an invoice for a company is addressed to, its title, its currency and when it is due. The client company and the project are fixed once the invoice exists, and so is the contact on an invoice with no company, because that contact is who it bills. Line items have their own endpoints.

An invoice that is paid or has a payment in progress cannot be edited at all, and returns 422.

The upfront payment for a document is locked while the document exists: changing it returns 422.

Path Parameters

  • Id of the invoice to update.

Body

required
application/json

The attributes to change, wrapped in an invoice key. All of them are optional.

  • Properties: 5

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/public-api/v1/invoices/{id}
curl https://app.hellobonsai.com/public-api/v1/invoices/1 \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "invoice": {
    "contact_id": 7,
    "currency": "USD",
    "title": "Acme Corp Invoice",
    "due": "upon_receipt",
    "due_date": "2026-04-28"
  }
}'
{
  "data": {
    "id": 3310,
    "invoice_number": "INV-001",
    "title": "Acme Corp Invoice",
    "currency": "USD",
    "issued_date": "2026-04-14",
    "due_date": "2026-04-28",
    "sent_date": "2026-04-14T09:12:04.000Z",
    "project_id": 51,
    "contact_id": 7,
    "client_email": "alex@example.com",
    "public_url_token": "x7f2a9c4b1e8d",
    "created_at": "2026-04-14T09:12:04.000Z",
    "total_amount": "200.0",
    "discount_amount": "25.0",
    "status": "outstanding",
    "due_date_option": "custom",
    "company_id": 42,
    "client_name": "Acme Corp",
    "subtotal": "200.0",
    "tax_amount": "0.0",
    "kind": "recurring",
    "repeat_interval": "monthly",
    "repeat_finish_date": "2027-04-14",
    "series_id": 3310,
    "recurrence_active": true,
    "url": "https://app.hellobonsai.com/invoices/3391",
    "invoice_items": [
      {
        "id": 4471,
        "name": "Design",
        "description": "Homepage and pricing page",
        "amount": "2.0",
        "rate": "100.0",
        "unit_type": "per_hour",
        "total": "200.0"
      }
    ]
  },
  "meta": {
    "request_id": "b1f0d2c4-7a9e-4c3b-8d5f-1e2a3b4c5d6e"
  }
}