Skip to content

Developer API

Write limits and errors

The daily change allowance, the size limits on writes, and every error code the write endpoints of the Developer API answer with.

This page lists the limits that apply only to writes, what the daily change allowance counts, and every error a write can answer with. Writes share the request-rate limits that apply to every request, which are on Limits and errors. The examples use $TAIGA_API for the app’s origin, so in production the base is https://app.taiga.finance/api/v1.

Limit Value
Changes per person per UTC day, across all their tokens 5,000
Rules per person, made in the app or through any token 500
Split legs per write, and per rule’s split recipe 50
Tags per tags write 50
Updates per batch 1 to 500
Tags a person’s tokens created that are still theirs 200
Note 4,000 characters after trimming
Tag name 1 to 64 characters, inner spacing collapsed
Category, merchant, rule pattern, split leg note 255 characters
A tag name inside a write 120 characters
A created transaction’s client_id 1 to 128 printable ASCII characters, no spaces

A note over 4,000 characters after trimming is 400 note_too_long. A body over 8,000 characters as sent fails the schema first, with a 422.

What counts against the daily change allowance?

Section titled “What counts against the daily change allowance?”

Each person can make 5,000 changes a UTC day, over all their tokens together. The allowance counts what a request actually changes:

Change Counts
A field that moved, such as a category or a merchant 1
A tag put on or taken off a transaction 1 each
Each split set or cleared 1
A rule written or deleted 1
A note written or removed 1
A tag created 1
A transaction added, its note included 1
A transaction deleted 1
A no-op, a field sent with the value the row already holds, or a create whose client_id is already used 0

A request whose changes don’t fit what is left of the day is refused whole, and nothing is written. remaining is what is left today, and Retry-After runs to the next UTC midnight, in seconds:

HTTP/1.1 429 Too Many Requests
retry-after: 78458
content-type: application/json
{
"detail": "write_limit",
"remaining": 499
}

That answer came after nine batches of 500 tag changes each. A request that changes nothing is never refused: right after that 429, a PATCH that set a transaction’s category and merchant to the values it already held answered 200.

Most refusals are {"detail": "<code>"}. Some carry one more field: remaining on write_limit, current on precondition_failed from a single-transaction write, ids on a batch refusal, tags on unknown_tag, and rule_id on rule_pattern_exists. A body that fails the schema, such as one with a field the endpoint doesn’t take, is a 422 with a list under detail:

HTTP/1.1 422 Unprocessable Entity
content-type: application/json
{
"detail": [
{
"type": "extra_forbidden",
"loc": [
"body",
"notes"
],
"msg": "Extra inputs are not permitted",
"input": "x"
}
]
}

A text value holding a character no field can store, such as NUL (\u0000) in a merchant, is also a 422, but with a code: {"detail": "unstorable_text"}. Nothing is written or counted.

Status Code Endpoints Description
400 bad_account_id POST /rules, PUT /rules/{rule_id}, POST /transactions account_id is not an account id, or names an account whose transactions you cannot see.
400 bad_amount POST /transactions The amount is zero, or finer than its account currency’s minor unit.
400 bad_amount_range POST /rules, PUT /rules/{rule_id} amount_min is greater than amount_max.
400 bad_attribution PUT /rules/{rule_id} The person the rule attributes to, an action set in the app, is no longer a member of your household.
400 bad_category POST /rules, PUT /rules/{rule_id}, POST /transactions, POST /transactions/batch, PATCH /transactions/{transaction_id}, PUT /transactions/{transaction_id}/splits A category is not written Parent::Sub.
400 bad_fund PUT /rules/{rule_id} The savings fund the rule pays from, an action set in the app, is no longer one you can edit, or is archived.
400 bad_merchant POST /transactions, POST /transactions/batch, PATCH /transactions/{transaction_id} A merchant is blank once its outer spacing is trimmed.
400 bad_note POST /transactions, PUT /transactions/{transaction_id}/note The note holds a control character other than a line break or tab, such as NUL.
400 bad_split_recipe POST /rules, PUT /rules/{rule_id} split_recipe breaks a recipe rule (a fixed leg’s value must be above 0, a percent leg’s above 0 and at most 1, the percents must sum to at most 1, at most one leg may be remainder), or a leg’s category is not one of your household’s.
400 bad_tag PUT /rules/{rule_id} The tag the rule sets, an action set in the app, is no longer one of your household’s.
400 bad_tag_name POST /tags Blank, or holding a control, format or other non-printing character (the rule a token’s own name is held to).
400 duplicate_ids POST /transactions/batch An id is sent more than once.
400 empty_note PUT /transactions/{transaction_id}/note The note is nothing but spacing.
400 empty_update POST /transactions/batch An update sets nothing (no category, merchant or tags)
400 expected_unsupported POST /transactions/batch, PATCH /transactions/{transaction_id} An update sends expected for a split transaction, which reads as its legs.
400 no_action POST /rules, PUT /rules/{rule_id} The rule sets no action (none of category, merchant, split_recipe).
400 note_too_long POST /transactions, PUT /transactions/{transaction_id}/note The note is longer than 4000 characters once stripped.
400 pattern_required POST /rules, PUT /rules/{rule_id} pattern is blank once its outer spacing is trimmed.
400 split_leg_id All except GET /categories, GET /rules, POST /rules, PUT /rules/{rule_id}, DELETE /rules/{rule_id}, GET /tags, POST /tags, POST /transactions The id is a split leg’s (<id>-s<slot>); write to its split_of.
400 unknown_category POST /rules, PUT /rules/{rule_id}, POST /transactions, POST /transactions/batch, PATCH /transactions/{transaction_id}, PUT /transactions/{transaction_id}/splits A category is not one of your household’s (/categories lists them)
400 unknown_tag POST /transactions/batch, PUT /transactions/{transaction_id}/tags A tag name is not one your household holds (a tag write never creates a tag; the answer’s tags lists the names).
401 invalid_token All No bearer, or not a live personal token.
402 billing_read_only All except GET /categories, GET /rules, GET /tags, GET /transactions/{transaction_id}/note The household’s billing is inactive, so the account is read-only; the body is the app’s own (its detail.reason is the billing state).
403 account_not_writable POST /transactions You can see the account but not write it (a partner’s, shared as a balance only)
403 demo_account All except GET /categories, GET /rules, GET /tags, GET /transactions/{transaction_id}/note The token’s owner is a demo account, which never writes.
403 not_this_tokens_rule PUT /rules/{rule_id}, DELETE /rules/{rule_id} Only the token that last wrote a rule may change it, and this rule is a partner’s, was made or last edited in the app, or is another token’s.
403 notice_required All Review a notice in the app first.
403 read_only_token All except GET /categories, GET /rules, GET /tags, GET /transactions/{transaction_id}/note The token was not made able to change data.
404 account_not_found POST /transactions No account you can see.
404 rule_not_found PUT /rules/{rule_id}, DELETE /rules/{rule_id} No rule of your household.
404 transaction_not_found PATCH /transactions/{transaction_id}, DELETE /transactions/{transaction_id}, GET /transactions/{transaction_id}/note, PUT /transactions/{transaction_id}/note, DELETE /transactions/{transaction_id}/note, PUT /transactions/{transaction_id}/splits, DELETE /transactions/{transaction_id}/splits, PUT /transactions/{transaction_id}/tags No transaction you can see.
404 transactions_not_found POST /transactions/batch The ids sent that name no transaction you can see (absent and not visible are one bucket). Nothing was written or counted.
405 method_not_allowed All The path does not serve this method; Allow names those it does.
405 read_only All The path only reads.
409 not_api_created DELETE /transactions/{transaction_id} Only a transaction you added through the API may be deleted here, and only while the bank has not matched it and nobody has changed it in the app; delete any other transaction in the app.
409 precondition_failed POST /transactions/batch, PATCH /transactions/{transaction_id}, PUT /transactions/{transaction_id}/splits, DELETE /transactions/{transaction_id}/splits, PUT /transactions/{transaction_id}/tags The row no longer holds what your precondition says you read, and this write would change it; current is what it holds now. Nothing was written or counted.
409 rule_limit POST /rules You hold PERSONAL_API_MAX_RULES rules (500); delete one first.
409 rule_pattern_exists POST /rules, PUT /rules/{rule_id} You already have a rule for this pattern; rule_id is it.
409 tag_limit POST /tags Your tokens have created PERSONAL_API_MAX_TAGS_CREATED tags (200) that are still theirs; a tag you edit or delete in the app frees its place.
422 — All except GET /categories, GET /rules, GET /tags, PUT /transactions/{transaction_id}/splits, DELETE /transactions/{transaction_id}/splits The body or a parameter failed schema validation; the answer is FastAPI’s validation list (detail, one entry per failure). unstorable_text: a text value holds a character no field can store (NUL, or a lone surrogate); nothing was written or counted.
422 split_leg_precision PUT /transactions/{transaction_id}/splits A leg’s amount is finer than its currency’s minor unit.
422 split_refused PUT /transactions/{transaction_id}/splits, DELETE /transactions/{transaction_id}/splits An offset link on the transaction or on one of its legs does not allow this change.
422 split_sum_mismatch PUT /transactions/{transaction_id}/splits The legs do not sum to the transaction’s amount.
422 unstorable_text PUT /transactions/{transaction_id}/splits, DELETE /transactions/{transaction_id}/splits A text value holds a character no field can store (NUL, or a lone surrogate); nothing was written or counted.
429 rate_limited All Too many requests, or too many failed tokens from your network.
429 too_many_in_flight All Too many requests at once.
429 write_limit All except GET /categories, GET /rules, GET /tags, GET /transactions/{transaction_id}/note What the request would actually change does not fit what is left of the day’s changes (remaining is what is left, Retry-After runs to the next UTC midnight — fields sent with the values the row already holds count nothing, and a request that changes nothing is never refused)
503 busy All except GET /categories, GET /rules, GET /tags, GET /transactions/{transaction_id}/note The write met a concurrent change to the same rows and was rolled back whole; nothing was written or counted. Retry after Retry-After (1 second) — every write is all or nothing and sets values, so a retry is safe.

The token wasn’t created to change data. That choice is made when the token is created and can’t be changed later, so create a new token that can change data in Settings › AI & Privacy › API tokens.

HTTP/1.1 403 Forbidden
content-type: application/json
{
"detail": "read_only_token"
}

The household’s subscription isn’t active, so the account is read-only. The body is the app’s own billing answer, with reason set to the subscription’s status, or no_subscription. Reads are still served.

HTTP/1.1 402 Payment Required
content-type: application/json
{
"detail": {
"code": "billing_read_only",
"reason": "canceled",
"message": "This account is read-only while billing is inactive."
}
}