Skip to docs content

Reference

Limits and errors

What the API allows, and what each refusal means.

Limits

  • 120 requests a minute per key, REST and MCP together, and 120 a minute per signed-in app. Over it, the answer is 429 with a Retry-After header in seconds.
  • Up to 1,000 rows a page.
  • An MCP request body of up to 64 KiB, or 256 KiB for a change tool from a signed-in app.

HTTP errors

Every error is JSON: { "error": "..." }.

  • 401: the key is missing, malformed, unknown or revoked, or the workspace's subscription does not currently allow access (for example, cancelled, or past due beyond its grace period).
  • 403: a change tool called by an app that was not allowed to propose changes (insufficient_scope); connect the app again with changes requested, or use an app that asks for books:write.
  • 404: no such route, or an entity the key cannot read. An account id that is not in the entity returns no rows rather than an error.
  • 405: on the REST API, a method other than GET on a read or other than POST on a change; on the MCP endpoint, a method other than POST.
  • 422: a parameter is invalid; the message names it.
  • 413: an MCP request body is too large.
  • 429: the rate limit; wait for Retry-After.
  • 500: the request did not complete. Retry later.
  • 503 with Retry-After: 2: 42six could not record the read, so it did not serve it, or, for an app signed in with 42six, could not check the app's access in time. Retry after that many seconds.

MCP errors

The key and the rate limit are checked first, as HTTP 401 and 429. After that, errors are JSON-RPC: -32700 the body is not JSON, -32600 not a request, -32601 unknown method, -32602 an unknown tool or invalid arguments (with the REST message). A database failure is a tool result with isError set.

  • The methods are initialize, ping, tools/list and tools/call. ping answers an empty result.
  • A notification, a message with no id, is accepted with HTTP 202 and no result.
  • A batch, a JSON array of messages, answers -32600: send one message per request.

A change tool that 42six refuses (an expired plan, busy books, an ambiguous account, nothing to change) is a tool result with isError set whose text is JSON: { "error": "...", "error_description": "..." }, plus choices or exclusions where they apply.

REST error messages

The error text, word for word. NAME stands for the parameter the message names.

  • 401 "A valid API key is required."
  • 403 "This key cannot read the ledger.", "This key cannot read bank transactions." or "This key cannot read reports.": the key was not given that kind of read.
  • 404 "No such route." and "No such entity."
  • 405, with Allow: GET on a read and Allow: POST on a change, for any other method.
  • 422 "entity must be a uuid.", "NAME must be a uuid.", "NAME must be a real date, YYYY-MM-DD.", "from must be before to.", "limit must be an integer from 1 to 1000.", "from and to are required, YYYY-MM-DD, half-open.", "as_of is required, YYYY-MM-DD.", "as_of must be before 9999-12-31.", "as_of must be between 1901-01-01 and 9999-11-30.", "preset must be mtd, qtd, ytd or t12." and "This book is too large for a statement here."
  • 429 "Too many requests.", with Retry-After in seconds.
  • 500 "The request did not complete."
  • 503 "Try again shortly.", with Retry-After: 2.

MCP error messages

JSON-RPC errors carry these messages. NAME, FIELD and TOOL stand for what the message names; a REST message above can also come back as -32602.

  • -32700 "The body is not JSON."
  • -32600 "Not a JSON-RPC 2.0 request." and "One message per request; batches are not supported."
  • -32601 "No method named NAME."
  • -32602 "No tool named NAME.", "arguments must be an object.", "TOOL takes no argument named NAME.", "NAME is required.", "NAME must be an integer.", "NAME must be a string.", "list_books takes no arguments." and "No such entity."
  • -32602 for a change tool's arguments: "FIELD is required.", "FIELD must be …", "FIELD must be one of …", "FIELD is too short.", "FIELD is too long.", "FIELD is not in the expected form.", "FIELD must be from … to ….", "FIELD must hold … to … items.", "This tool takes no field named NAME." and "FIELD takes no field named NAME." FIELD is the path to the value, such as lines[0].debit.
  • HTTP 413 { "error": "The body is too large." }, HTTP 500 { "error": "The request did not complete." } and HTTP 503 { "error": "Try again shortly." } with Retry-After: 2.
  • A change tool whose change could not complete answers a tool result with isError set and the text "The change did not complete."