---
name: "books_record_expense"
area: "books"
title: "Book an expense"
price: "$0.01"
method: "POST"
url: "https://api.conecto.chat/v1/tools/books_record_expense"
mcp_server: "https://api.conecto.chat/mcp/books"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/books/books_record_expense"
---

# Book an expense (`books_record_expense`)

Books a cost the business paid, with its tax split off and the receipt attached.

Book a cost the business paid: account is what it was for (an expense, or an asset like equipment), paid_from where the money came from (default the bank account; a card, cash or the owner's account). paid_by instead (an email) makes it an expense claim, like Xero's: someone paid with their own money and is paid back with books_repay_claims. With a tax, the tax to reclaim is split off (amount includes it unless amount_includes_tax is false). Attach the receipt from the file store. A negative amount is a refund.

Price: $0.01 a call. A call that fails costs nothing.

## Use it when

The business paid for something: a subscription, electricity, supplies, a repair.

- For a supplier bill to pay later, use [purchasing_create_bill](https://conecto.chat/tools/purchasing/purchasing_create_bill.md).
- For anything else that moves money between accounts, use [books_record_entry](https://conecto.chat/tools/books/books_record_entry.md).

## Say this to your agent

> Book the 238 euros we paid Hamburg Energie for the warehouse's electricity on October 5, VAT included. The receipt is in our files.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `date` | string | yes | YYYY-MM-DD (matches ^\\d{4}-\\d{2}-\\d{2}$) |  |  |
| `amount` | number or string | yes | e.g. "119.00". Up to 24 characters. |  |  |
| `account` | string | yes | An account code from the chart, e.g. "6600". 1 to 20 characters. |  |  |
| `paid_from` | string | no | An account code from the chart, e.g. "6600". 1 to 20 characters. |  |  |
| `tax` | string | no | A tax by name (books_get lists them), e.g. "VAT 19%". Up to 60 characters. |  |  |
| `amount_includes_tax` | boolean | no |  |  | `true` |
| `vendor` | string | no | Up to 200 characters. |  |  |
| `memo` | string | no | Up to 500 characters. |  |  |
| `reference` | string | no | e.g. the receipt number. Up to 120 characters. |  |  |
| `receipt_file_id` | string | no | A file_id from the file store. Exactly 36 characters. |  |  |
| `currency` | string | no | When it is not the base currency, e.g. "USD". The rate is then rate, a standing rate, or the European Central Bank's for the date. Matches ^[A-Za-z]{3}$. |  |  |
| `rate` | number or string | no | One unit of currency in the base currency, e.g. "0.9241". Default: a standing rate, else the European Central Bank's reference rate for the date. Up to 24 characters. |  |  |
| `tracking` | object | no | Tracking options by category, e.g. {"Department": "Service"} (books_list_tracking). |  |  |
| `paid_by` | string | no | The email of whoever paid it privately and is paid back: an expense claim. Not with paid_from. Up to 254 characters. |  |  |
| `paid_by_name` | string | no | Up to 200 characters. |  |  |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `books_record_expense` on the MCP server `https://api.conecto.chat/mcp/books` with these arguments:

```json
{
  "date": "2026-10-05",
  "amount": "238.00",
  "account": "6800",
  "tax": "VAT 19%",
  "vendor": "Hamburg Energie",
  "reference": "RE 2026-10-5521",
  "receipt_file_id": "4c1f7e92-3a6b-4d8e-b5c0-9e2d1f3a7b68"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/books_record_expense \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date": "2026-10-05", "amount": "238.00", "account": "6800", "tax": "VAT 19%", "vendor": "Hamburg Energie", "reference": "RE 2026-10-5521", "receipt_file_id": "4c1f7e92-3a6b-4d8e-b5c0-9e2d1f3a7b68"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "books_record_expense",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.01",
  "balance_usd": "$19.75",
  "result": {
    "entry": {
      "entry": 3,
      "date": "2026-10-05",
      "memo": "Expense: Hamburg Energie",
      "reference": "RE 2026-10-5521",
      "party": "Hamburg Energie",
      "source": "expense",
      "total": "238.00",
      "currency": "EUR",
      "rate": null,
      "lines": [
        {
          "account": "6800",
          "account_name": "Utilities and phone",
          "debit": "200.00",
          "credit": null,
          "description": "Hamburg Energie",
          "tax": "VAT 19%"
        },
        {
          "account": "1300",
          "account_name": "Tax to reclaim",
          "debit": "38.00",
          "credit": null,
          "description": "VAT 19%",
          "tax": "VAT 19%"
        }
      ],
      "reverses": null,
      "reversed_by": null,
      "receipt_file_id": "4c1f7e92-3a6b-4d8e-b5c0-9e2d1f3a7b68",
      "recorded_at": "2026-10-15T14:29:47+00:00",
      "recorded_by": "key 4101 (Pip)"
    }
  }
}
```

`result`: The entry booked: its number, date, memo, party, receipt, and lines with the tax split off; with paid_by, claim: the expense claim to pay back.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `no_books` | 409 | The business keeps no books yet. | Set them up with books_setup (base currency, start date). |
| `not_found` | 404 | No account, tax, entry or file of the books has that code, name or id. | Check the codes with books_list_accounts and the taxes with books_get. |
| `archived` | 409 | The account or tax is archived. | Use another one, or un-archive it with books_save_accounts. |
| `unbalanced` | 400 | The debits and credits do not add up to the same amount. | Make the lines balance. |
| `before_start` | 409 | The date is before the books start. | Use a later date. |
| `period_locked` | 409 | The books are locked for that date. | Use a later date, or unlock with books_lock. |
| `no_rate` | 409 | There is no exchange rate for the currency on that day. | Pass rate, or set a standing rate with books_setup rates. |
| `rates_loading` | 503 | The day's exchange rates are still loading. | Try again in a few minutes, or pass rate. |
| `invalid_input` | 400 | The amount is 0 or not a number, the date is not valid, paid_by is not an email, or both paid_by and paid_from are given. | Send an amount like "238.00" and a date like 2026-10-05. |
| `no_role` | 409 | No account holds a role the expense needs (the bank, or tax to reclaim). | Give an account the role with books_save_accounts. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [books_setup](https://conecto.chat/tools/books/books_setup.md): Starts the business's double-entry books (currency, start date, chart of accounts) or changes their settings. $0.001 a call.
- [books_get](https://conecto.chat/tools/books/books_get.md): The books' settings: currency, start date, fiscal year, locked period, roles, payment accounts, taxes, and what is waiting. Free up to 1,000,000 reads a month.
- [books_list_accounts](https://conecto.chat/tools/books/books_list_accounts.md): Every account with its code, type, role and balance on a day. Free up to 1,000,000 reads a month.
- [books_save_accounts](https://conecto.chat/tools/books/books_save_accounts.md): Adds accounts or changes them, matched by code: name, type, description, code, role or archived. $0.001 a call.
- [books_save_tax](https://conecto.chat/tools/books/books_save_tax.md): Adds or changes a tax rate the books use (VAT, GST, sales tax), matched by name. $0.001 a call.
- [books_record_entry](https://conecto.chat/tools/books/books_record_entry.md): Books a journal entry of two or more balancing lines, for whatever the other tools do not cover. $0.01 a call.
- [books_attach_receipt](https://conecto.chat/tools/books/books_attach_receipt.md): Attaches a receipt from the file store to an entry that has none. $0.01 a call.
- [books_reverse_entry](https://conecto.chat/tools/books/books_reverse_entry.md): Undoes an entry by booking its mirror image; entries are never edited or deleted. $0.01 a call.
- [books_list_entries](https://conecto.chat/tools/books/books_list_entries.md): Entries, newest first, with their lines, by dates, account, source or text. Free up to 1,000,000 reads a month.
- [books_import_bank](https://conecto.chat/tools/books/books_import_bank.md): Reads a bank statement from the file store (CSV, CAMT.053 or OFX) onto a bank account, skipping lines imported before. Free.
- [books_bank_lines](https://conecto.chat/tools/books/books_bank_lines.md): Imported bank lines (by default the ones still to match), each with up to three suggestions of what it was. Free up to 1,000,000 reads a month.
- [books_match_bank_lines](https://conecto.chat/tools/books/books_match_bank_lines.md): Says what bank lines were: entries already booked, invoices or bills they pay, an account to book them to, or nothing to book. $0.02 per bank line matched.
- [books_save_bank_rule](https://conecto.chat/tools/books/books_save_bank_rule.md): Saves a bank rule, like Xero's: which new bank lines it matches and how they are booked, to one account or split by percent, each part with its own tax. $0.001 a call.
- [books_list_bank_rules](https://conecto.chat/tools/books/books_list_bank_rules.md): Lists the bank rules in the order they are tried, with where they book and how often they were used. Free up to 1,000,000 reads a month.
- [books_apply_bank_rules](https://conecto.chat/tools/books/books_apply_bank_rules.md): Books every new bank line a rule matches, each by the first rule that matches. $0.02 per bank line booked.
- [books_delete_bank_rule](https://conecto.chat/tools/books/books_delete_bank_rule.md): Deletes a bank rule; what it booked stays booked. Free.
- [books_report](https://conecto.chat/tools/books/books_report.md): A report: profit and loss, balance sheet, trial balance, ledger, tax, the VAT or OSS return, the cash flow ahead or a snapshot of the business. Free up to 1,000,000 reads a month.
- [books_save_tracking](https://conecto.chat/tools/books/books_save_tracking.md): Saves a tracking category with its options, like Xero's: a department, a region or a project line that any line of the books can carry. $0.001 a call.
- [books_list_tracking](https://conecto.chat/tools/books/books_list_tracking.md): Lists the tracking categories and their options. Free up to 1,000,000 reads a month.
- [books_save_budget](https://conecto.chat/tools/books/books_save_budget.md): Saves a budget per income and expense account and month, like Xero's budget manager: amounts, monthly or yearly. $0.001 a call.
- [books_list_budgets](https://conecto.chat/tools/books/books_list_budgets.md): Lists the budgets with every line's monthly amounts and total. Free up to 1,000,000 reads a month.
- [books_delete_budget](https://conecto.chat/tools/books/books_delete_budget.md): Deletes a budget; the books don't change. Free.
- [books_repay_claims](https://conecto.chat/tools/books/books_repay_claims.md): Pays someone back for costs they paid with their own money (expense claims), like Xero's, with a SEPA file when asked. $0.01 a call.
- [books_list_claims](https://conecto.chat/tools/books/books_list_claims.md): Lists expense claims: what people paid for the business privately, and what each is owed. Free up to 1,000,000 reads a month.
- [books_save_asset](https://conecto.chat/tools/books/books_save_asset.md): Registers a fixed asset (a van, a machine) and how it depreciates, like Xero's: straight line, declining balance, at once or not at all. $0.001 a call.
- [books_list_assets](https://conecto.chat/tools/books/books_list_assets.md): The fixed asset register: each asset's cost, accumulated depreciation and book value, what a run would book now, and the register held against the books. Free up to 1,000,000 reads a month.
- [books_depreciate](https://conecto.chat/tools/books/books_depreciate.md): Books the depreciation of every registered asset through a month's end, one entry a month, like Xero's run depreciation; or undoes it after a date. $0.01 a call.
- [books_dispose_asset](https://conecto.chat/tools/books/books_dispose_asset.md): Sells or writes off a fixed asset, like Xero's dispose: depreciation to the day it goes, then its cost, the price and the gain or loss. $0.01 a call.
- [books_delete_asset](https://conecto.chat/tools/books/books_delete_asset.md): Takes an asset registered by mistake out of the register; the books don't change. Free.
- [books_lock](https://conecto.chat/tools/books/books_lock.md): Locks the books through a date, so nothing new is booked on or before it; null unlocks. $0.001 a call.
- [books_close_year](https://conecto.chat/tools/books/books_close_year.md): Closes a fiscal year for good: nothing is booked on or before its last day again, and it can't be undone. $0.001 a call.
- [books_export](https://conecto.chat/tools/books/books_export.md): A CSV of the journal or the accounts, a DATEV Buchungsstapel for a German tax adviser or a French FEC, with a download link. $0.001 a call.
