Update Expense
Updates an existing expense, identified by id in the request body. Use PATCH to change a few fields (partial merge) or PUT to replace the whole record.
Authentication: X-API-KEY header (see Authentication).
PUT is a full replaceWith PUT, fields you omit are overwritten. For a few fields, use PATCH instead. id is required for both; accountId is forced to your workspace.
Request body
The full Expense object. Key fields:
| Field | Type | Description |
|---|---|---|
id | string | Required. Id of the expense to update. |
amount | number | Expense amount. |
currency | string | Currency code. |
taxRate | number | Tax rate. |
taxInclusive | boolean | Whether amount includes tax. |
category | string | Expense category. |
vendorId | string | Vendor id. |
clientId | string | Client to bill (optional). |
projectId | string | Related project (optional). |
billNo | string | Bill / receipt number. |
paid | boolean | Whether the expense is paid. |
paidDate, dueDate | date | Paid / due dates. |
reimbursable | boolean | Billable / reimbursable. |
markupPercent | number | Markup applied when billed to a client. |
description, notes | string | Text fields. |
Request (PATCH — partial)
curl -X PATCH https://api.withmoxie.com/public/action/expenses/update \
-H "X-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"id": "66b0f7d4c3a9e40012ab7722",
"paid": true,
"paidDate": "2026-07-10"
}'
Response
Returns the full updated Expense object.
{
"id": "66b0f7d4c3a9e40012ab7722",
"accountId": 10016,
"amount": 120.00,
"currency": "EUR",
"category": "Software",
"vendor": "Adobe",
"description": "Stock photos",
"paid": true,
"paidDate": "2026-07-10",
"reimbursable": true
}
Errors
| Status | Meaning |
|---|---|
412 Precondition Failed | id was missing from the body. |
404 / Not Found | No expense with that id exists in your workspace. |