---
title: "Record what the bookkeeping agent would have done in shadow"
method: POST
path: "/accountant/companies/{customerId}/agent/shadow-verdicts"
tags: ["Accountant Portal"]
---

# Record what the bookkeeping agent would have done in shadow

`POST /accountant/companies/{customerId}/agent/shadow-verdicts`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/agent/shadow-verdicts`
- Auth: HTTP bearer

The bookkeeping agent's key only (a person gets 403 AGENT_ONLY, the shared cloud-bookkeeping service token 404). One verdict per company, capability and subject: a repeat returns the first (200), a new one 201. For `transfers.pairs` the blocker must be this company's open, unambiguous `unresolved_transfer_pair` close blocker whose `pairKey` is the two transactions' ids, sorted (422 otherwise; 404 for no such blocker). For `documents` the pair must be the document match policy's own `match` verdict with `writeAllowed` for that document, on that bank row, as the agent's key reads it: never a match of that document a person unmatched or rejected, and only once its date window has settled (not `window_open`; 422 otherwise; 404 for no such document); the API records the policy's version itself. If `expectedDocumentType` is supplied, the fresh judgment must also report a receipt (422 otherwise). 409 AGENT_CAPABILITY_NOT_SHADOW when the capability is not in shadow. Touches no books and spends no write allowance. Ids and codes only.

## Path parameters

- `customerId` string, uuid, required

## Request body

- union
  - object
    - `capability` 'transfers.pairs', required
    - `subjectKey` string, required
    - `blockerId` string, uuid, required
    - `sourceTransactionId` string, uuid, required
    - `destinationTransactionId` string, uuid, required
    - `writer` 'transfer' | 'card_payment', required
    - `policyVersion` string, required
  - object
    - `capability` 'documents', required
    - `documentId` string, uuid, required
    - `transactionId` string, uuid, required
    - `expectedDocumentType` 'receipt': Require a receipt in the API's fresh match judgment.

## Response `200`

The verdict already recorded for this pair

- AgentShadowVerdictEnvelope
  - `success` boolean, required
  - `data` object, required
    - `verdict` object, required
      - `id` string, uuid, required
      - `outcome` 'pending' | 'agreement' | 'disagreement' | 'void', required
      - `created` boolean, required

## Other responses

- `201`: Recorded
- `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 breaking, 7 warning, 1 info
  - the request's body type changed from `object` to no type
  - removed the request property `blockerId`
  - removed the request property `capability`
  - removed the request property `destinationTransactionId`
  - …5 more
- **2026-10-29** `e1fc804546d3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/agent/shadow-verdicts/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)
