Reference
Errors
When a request to the Kosh API fails, the reply has an HTTP status and this JSON body:
{
"error": {
"code": "validation_failed",
"message": "Use a YYYY-MM-DD calendar date.",
"field": "date"
}
}
codeis one of the codes below. Code that reads errors should use it.messageis a short sentence for a person.fieldnames the input that failed, when there is one.
A request that fails writes nothing.
Error codes
| Code | HTTP | Meaning |
|---|---|---|
unauthenticated | 401 | No valid sign-in or token. Sign in, or send a valid Authorization: Bearer header. |
forbidden | 403 | Only the Koshadhyaksha can do this, or the token belongs to another Member. |
no_household | 403 | You are signed in but not in a Household yet. Create or join one first. |
not_found | 404 | No such item in your Household, or an Import preview that expired. |
conflict | 409 | The change clashes with current data: a name that exists, an item in use, an Entry already in a Transfer, a statement line that cannot be deleted. Billing: a plan already, a downgrade that waits, a price under the provider's minimum charge. |
already_in_household | 409 | The person already belongs to a Household. |
owner_cannot_leave | 409 | The Koshadhyaksha cannot be removed from the Household. |
koshadhyaksha_must_hand_over | 409 | The Koshadhyaksha cannot delete only themself while other Members use the Household. Hand over the Koshadhyaksha role first, or delete the whole Household. |
ai_consent_required | 403 | The caller has not allowed this outside model. field names the path: ask_server, pdf_statement or category_proposals. Nothing was sent or counted. |
review_household | 403 | The App Review demo Household cannot do this (invites, MCP tokens, handing over the Koshadhyaksha role). |
validation_failed | 422 | An input is missing or wrong. See field. |
currency_mismatch | 422 | Two currencies that must be the same are not, for example an Entry and its Account. |
statement_unbalanced | 422 | The statement's rows do not add up to its closing balance. Nothing was saved. |
statement_duplicate | 409 | The Account already has this statement: the same dates and closing balance, or the same lines. The message names the period and the import date. Nothing was saved. |
import_wrong_password | 422 | The password does not open the file. |
import_unreadable | 422 | Kosh cannot read the file, for example a scanned PDF. |
import_unknown_format | 422 | Kosh does not know this file's format or columns. |
import_extraction_invalid | 422 | The rows or fields read from the file were not usable. |
import_too_large | 413 | The file is over 10 MB or 60 pages. |
plan_required | 402 | The Household's plan does not include this, for example a third Member or MCP on Kosh Free. |
usage_limit | 429 | The monthly limit of server questions, PDF pages or Category proposals is used up. |
rate_limited | 429 | Too many sign-in codes. Try again later. |
email_not_sent | 502 | Kosh could not send the email. Try again in a minute. |
import_extractor_unavailable | 503 | The server model is not reachable now, for Ask or for a PDF statement. Try again later. |
billing_unavailable | 503 | Payments are not open yet. |
plan_managed | 409 | The Household has a managed plan. Nothing to change here. |
resume_unavailable | 409 | The provider cannot undo a scheduled cancel. Choose the plan again after it ends. |
plan_change_unavailable | 409 | A yearly plan cannot change to monthly before its end at this provider (Paddle). Cancel the plan; it stays active until the year ends. Then choose the monthly plan. |
paid_elsewhere | 409 | The plan is paid another way. Paid through the App Store: change or cancel it on the iPhone (Settings, then your name, then Subscriptions). Paid on the web: the iPhone links no new App Store purchase. |
apple_other_household | 409 | This App Store purchase belongs to another Household. Sign in to that Household, or use another Apple Account. |
billing_provider_failed | 502 | The payment provider did not finish the request. The message says what failed and ends with "Reference: " and an id. |
The REST reference lists the codes each route can return: see REST API.
MCP errors
A Kosh API MCP request without a valid token, or from a Household without Kosh API MCP in its plan, gets HTTP 401 before any tool runs. See Kosh API MCP.