---
title: "Undo one automated Penny write (categorization, transfer/card pair, document match, or Phase 3 revenue/bills/close run; human-only)"
method: POST
path: "/accountant/companies/{customerId}/agent/runs/{runId}/evidence/{evidenceId}/undo"
tags: ["Accountant Portal"]
---

# Undo one automated Penny write (categorization, transfer/card pair, document match, or Phase 3 revenue/bills/close run; human-only)

`POST /accountant/companies/{customerId}/agent/runs/{runId}/evidence/{evidenceId}/undo`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/agent/runs/{runId}/evidence/{evidenceId}/undo`
- Auth: HTTP bearer

Human-only (refuses service principals and API keys; listed on HUMAN_ONLY_ROUTES). Reverses Penny's exact applied write atomically: for `recategorize`, voids Penny's posted journal entry and restores the transaction row; for `match_transfer` (transfers and credit card payment pairs), unwinds the transfer match and voids its consolidated journal entry; for `match_document` (receipts and bills), unmatches the document link and notifies autonomy; for `run_revenue`, `run_bills`, and `run_close`, voids all journal entries posted by the run and resets any posted schedule entries back to pending. Idempotent: a repeat call after undo returns state `already_undone` with no new write. Refuses on a later human edit, reconciliation, or a closed/filing-locked period.

## Path parameters

- `customerId` string, uuid, required
- `runId` string, uuid, required
- `evidenceId` string, uuid, required

## Request body

- object
  - `reason` string, required

## Response `200`

Success envelope with undo state (undone or already_undone)

- object

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: Request conflicts with the durable onboarding state
- `422`: Request failed validation

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/agent/runs/:runId/evidence/:evidenceId/undo/post.md)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) - [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) - [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b?raw)
