Errors

The error response format, how to handle each kind of failure, and every error code the API returns.

Every failed request returns a JSON body with a stable, machine-readable code and a message written for humans:

404 response
{ "code": "transaction_not_found", "message": "Transaction not found." }

Branch on code. Message wording can change at any time, so don't match on it or show it to end users as-is. Treat a code you don't recognize as a generic failure of its HTTP status. While Penny is in pre-launch development, codes can change; see the compatibility policy.

Handling errors

Authentication: 401

not_authenticated means the Authorization header is missing or the token is malformed, expired, or revoked. Retrying won't help. Create a new token in Settings → API Tokens and update your integration.

Permissions: 403

  • read_only_token: a read-only token made a write request. Use a read/write token.
  • not_household_member: you don't belong to the household in the path, or you were removed from it. Call GET /v1/households to see the households you can access.
  • insufficient_household_role: your role in the household doesn't allow the action. Viewers can only read, and some routes are limited to the owner.

A token never has more access than the person who created it, so a read/write token held by a viewer still gets insufficient_household_role on writes.

Subscription: 402

subscription_required means the household's subscription has lapsed. The body also carries the household_id it applies to:

402 response
{
  "code": "subscription_required",
  "message": "This household's subscription has lapsed",
  "household_id": "Hh4vK8pQ2sLm"
}

GET /v1/households reports these households with an access_status of subscription_required, so you can check before requesting a household's data.

Validation: 422

validation_error means the request was understood but one or more values were rejected. The errors array lists every field that failed, so you can fix them in one pass:

422 response
{
  "code": "validation_error",
  "message": "Some fields are invalid.",
  "errors": [
    {
      "field": "splits.0.amount",
      "code": "decimal_parsing",
      "message": "Input should be a valid decimal",
      "context": null
    }
  ]
}

field is the path to the value, without the request source (body, query, or path). context holds extra validator detail as a string-valued object, or null.

Not found: 404

A *_not_found code means the resource doesn't exist, was deleted, or belongs to a different household. The API doesn't say which, so it never confirms that someone else's ID exists.

Bulk operations: 200

Valid bulk transaction requests return 200 with transactions and skipped, even when every requested ID is skipped. Eligible transactions that were already in the requested state (for example, already reviewed or already carrying the tag) count as successes and appear in transactions. Each skipped entry gives the requested id and a machine-readable code:

  • transaction_not_found: the ID is missing or belongs to another household.
  • account_deleted: its account is deleted.
  • transaction_deleted: the transaction or its split parent is deleted.
  • split_parent_not_editable: edit the split children instead of their original.

The last two reasons apply to category, tag, and review edits. Hide, unhide, delete, and restore can act on deleted transactions and split parents. When several reasons apply, account deletion takes precedence over transaction deletion, then split-parent status. Skipped IDs follow request order, and repeated IDs are processed once. Listing changes also return affected split children that weren't explicitly requested.

For example, a bulk review request with one eligible transaction and one missing ID returns the eligible transaction in transactions and:

Skipped portion of the response
{
  "skipped": [
    { "id": "missing-id", "code": "transaction_not_found" }
  ]
}

Check skipped before assuming every transaction ID succeeded. An unknown tag or category rejects the whole request with 404 tag_not_found or 404 category_not_found before any transactions change. If an error occurs while applying eligible changes, the whole batch rolls back.

Conflicts and invalid operations: 400 and 409

These mean the request was well formed but can't be applied. A 409 conflicts with the resource's current state: a name that's already taken (duplicate_name), an export still being prepared (export_in_progress), or a pending transaction that can't be split. A 400 is a request that can't succeed as sent, such as split amounts that don't add up to the original (sum_does_not_match_total). Change the request or the resource before retrying.

Pagination: 400

invalid_cursor means the cursor is malformed, and filters_changed means it was sent with different filters than the request that produced it. In both cases, start over without a cursor.

Uploads: 400 and 413

Images must be JPEG, PNG, or WebP (invalid_file_type) and no larger than 5 MiB (file_too_large).

Server errors: 500 and 503

internal_error means something went wrong on our side. Read requests are safe to retry. The API doesn't have idempotency keys, so after a failed write, read the resource back before sending the request again.

service_unavailable means the request waited too long for another change to the same household (such as a bank sync) and nothing it asked for was applied. Retry after a short wait.

Requests that don't reach an endpoint

Framework-level errors use the same code and message shape, with code named after the HTTP status:

  • 400 bad_request: the request body isn't valid JSON.
  • 404 not_found: no endpoint matches the path.
  • 405 method_not_allowed: the endpoint doesn't support that HTTP method.
  • 415 unsupported_media_type: a JSON body was sent without Content-Type: application/json.

Error codes

Top-level error codes. Each endpoint's page lists the ones that apply to it. Bulk item outcome codes are described under Bulk operations: 200.

CodeStatusExample messageReturned by
bad_request400Bad Request37 endpoints
child_cannot_unsplit400Cannot unsplit a child of a split; pass the parent transaction id.Unsplit Transaction
filters_changed400Filters have changed since the cursor was created. Please start a new query.List Connection Status, List Institutions, Dry Run Rule, List Transactions
invalid_cursor400Invalid pagination cursor. Please start a new query.8 endpoints
invalid_file_type400File must be JPEG, PNG, or WebP5 endpoints
invalid_frequency_fields400Invalid frequency fields: twice-monthly frequencies must omit start_date; all other frequencies require start_dateCreate Recurring Transaction, Preview Recurring Transaction, Update Recurring Transaction
invalid_month_format400month must be in YYYY-MM formatGet Recurring Summary
invalid_rule_ids400Rule IDs must match exactly all rules in the householdReorder Rules
split_sign_mismatch400Each split's sign must match the original transaction.Split Transaction
sum_does_not_match_total400The sum of the split amounts must equal the original transaction amount.Split Transaction
too_few_splits400A split must contain at least two parts.Split Transaction
zero_amount_split400Split amounts must not be zero.Split Transaction
not_authenticated401Authentication required99 endpoints
subscription_required402This household's subscription has lapsed87 endpoints
insufficient_household_role403Insufficient household role59 endpoints
not_household_member403Not a member of this household93 endpoints
read_only_token403This API token only permits read requests60 endpoints
account_not_found404Account not found11 endpoints
category_group_not_found404Category group not found5 endpoints
category_not_found404Category not found9 endpoints
export_not_found404Export not foundGet Export
image_not_found404Image not found.Bulk Delete Transaction Images, Delete Transaction Image
merchant_not_found404Merchant not found14 endpoints
no_image404No image to deleteDelete User Image, Delete Household Image, Delete Merchant Image, Delete Account Image
not_found404Not FoundA path that no endpoint serves
recurring_transaction_not_found404Recurring transaction not foundList Recurring Transaction Occurrences, Get Recurring Transaction, Update Recurring Transaction, Delete Recurring Transaction
rule_not_found404Rule not foundGet Rule, Update Rule, Delete Rule
security_not_found404Security not foundGet Security Prices
suggestion_not_found404Dismissed suggestion not foundRestore Recurring Suggestion
tag_not_found404Tag not found10 endpoints
transaction_not_found404Transaction not found15 endpoints
method_not_allowed405Method Not AllowedAn endpoint, for a method it doesn't support
account_not_manual409Transactions can only be created for manually-added accounts.Create Transaction
child_cannot_split409Cannot split a transaction that is already a child of another split.Split Transaction
duplicate_emoji409Category with this emoji already existsCreate Category, Update Category
duplicate_name409This name is already in use8 endpoints
export_in_progress409An export is already being prepared for this householdRequest Export
transaction_deleted409Cannot split a deleted transaction.Split Transaction
transaction_not_split409Transaction is not currently split.List Splits, Unsplit Transaction
transaction_pending409Cannot split a pending transaction.Split Transaction
file_too_large413File exceeds maximum size of 5 MiB5 endpoints
unsupported_media_type415Unsupported Media Type36 endpoints
validation_error422Some fields are invalid.59 endpoints
internal_error500Internal server errorAny endpoint
service_unavailable503Service UnavailableAny endpoint that changes data

Last updated on

On this page