Skip to content

Developer API

Undo a token's changes

End a token that can change data and revert what it changed, from Settings: what comes back, what stays, and for how long.

Undo ends a token and reverts the changes it made, where they can still be reverted. It is done in Settings by the token’s owner, not through /api/v1, so a token can’t undo itself. This page covers where to start an undo, what it reverts, what it leaves alone and why, and what a script sees afterwards.

In Settings › AI & Privacy › API tokens, a token with changes shows its count as “N changes” and an Undo changes button. The confirmation reads:

It stops working now. Its changes (N) are undone where they still can be. Any rules it wrote are deleted; what they already did stays. This can’t be reversed.

For a live token the confirm button is End and undo. For a token that has already ended it is Undo changes. A token is undone at most once.

The token ends at once, in the same step: its next request is a 401, a write included, even while the revert is still running.

Terminal window
curl "$TAIGA_API/api/v1/accounts" \
-H "Authorization: Bearer $TAIGA_TOKEN"
HTTP/1.1 401 Unauthorized
www-authenticate: Bearer
content-type: application/json
{
"detail": "invalid_token"
}

The revert then runs in the background, and Settings shows the result when it finishes.

Change the token made What the undo does
Category Restores the category it replaced
Merchant Restores the merchant it replaced
Splits Restores the splits as they were
Tags added Takes them off
Tags removed Puts them back
Rules Deletes every rule the token wrote; transactions the rules already acted on keep what they did
Notes Removes the notes the token wrote
Tags created Deletes a tag the token created, unless a transaction, a rule or a saved view still uses it
Transactions created Deletes a transaction the token added, with its note and tags, unless the bank’s copy has settled onto it or someone has changed it in the app since

A transaction the token added is judged whole, as one change. Settings counts the deleted ones as “created transaction deleted” or “created transactions deleted”; a deleted tag the token created counts as “created tag deleted”. One the bank’s copy has settled onto, or that someone has changed in the app with an edit, a note or a tag, stays as it is, counted as “changed since”, because deleting it would take the bank’s charge or a person’s work with it. A change another of your tokens made to it doesn’t keep it. A transaction deleted this way doesn’t come back, and neither does one deleted earlier with DELETE /transactions/{transaction_id}.

A change is left alone when reverting it would overwrite something newer or can no longer be done. Settings counts each one under its reason:

Reason in Settings Why the change stays
“changed since” The field was changed again after the token’s change
“deleted” The transaction was deleted
“category deleted” The category to restore no longer exists
“amount changed” The amount changed, so the old legs no longer sum to it
“tag deleted” The tag to put back no longer exists
“linked as an offset” The transaction was linked in the app as an offset
“can’t be restored” The earlier value can’t be restored
“not visible to you” You can no longer see the transaction; it is counted, never named
“tag in use” A tag the token created is still used by a transaction, a rule or a saved view

A transaction merged with another since the change is left alone too.

A token named trip tagger had tagged 34 transactions, created two tags, changed the category of one transaction that another token then changed again, written a note and written a rule. Its undo took the tag off all 34 transactions, deleted the rule, removed the note and deleted one of the two tags. It left alone that category change, as “changed since”, and the second tag, as “tag in use”, because another token had put it on a transaction. The deleted rule had categorized or split no transactions, so nothing it did stayed behind.

A token named shortcut logger had added three transactions, one of them with a note, and changed the category of one bank transaction. Jordan then wrote a note in the app on the second transaction it added, and another of Jordan’s tokens changed the category of the third. Its undo deleted the first and third transactions and restored the category. Settings showed “Undone Nov 10, 2026 · 1 category change · 2 created transactions deleted” and “Left alone: 1 changed since”, the transaction Jordan had noted.

Each reverted change is recorded in the transaction’s history. In the app’s transaction drawer it reads “undid”, the token’s name and “’s change”, so an undo of a token named second script shows “undid second script’s change”. A partner sees “undid an API token’s change”.

While the token is live, and for 30 days after it was revoked or expired. An ended token with changes stays listed under Ended in Settings, with Undo changes, for those 30 days, and longer if its undo hasn’t finished. A token ended by signing out everywhere isn’t revoked, so its 30 days count from its expiry date.

No. Once an undo has run, the token stays ended and its reverted changes stay reverted. To write again, create a new token.