---
title: "Record an occurrence of a bookkeeping agent finding"
method: POST
path: "/accountant/companies/{customerId}/agent/findings"
tags: ["Accountant Portal"]
---

# Record an occurrence of a bookkeeping agent finding

`POST /accountant/companies/{customerId}/agent/findings`

## Request

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

Agent key only. Records an occurrence of one finding (fingerprint, class, codes, count) and the subjects it holds. Every held subject must be this company's by the API's own reading; a subject held from an answered question (`answer:` work item) is refused. A finding seen again after it settled (fix live, cleared, closed or abandoned) is a recurrence: its release moves on and its subjects are held again for the new release. Refused with 403 `AGENT_PHI_RESTRICTED` for a patient-data-restricted company. Mounted only when the deployment enables the bookkeeping agent (default off); otherwise 404. The shared cloud-bookkeeping service token gets 404 here.

## Path parameters

- `customerId` string, uuid, required

## Request body

- object
  - `fingerprint` string, required
  - `findingClass` 'defect' | 'investigation', required
  - `clears` boolean, required
  - `codes` string[]
  - `occurrences` integer, required
  - `held` object[]
    - `subjectType` 'transaction' | 'company' | 'stripe_duplicate_je_row', required
    - `subjectId` string, uuid, required
    - `originalWorkItemKey` string
    - `heldState` object

## Response `201`

Success envelope

- object

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: The agent is not enabled for this company, or its kill switch is on
- `422`: Validation failed, or a held subject is not this company's

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - added the new `stripe_duplicate_je_row` enum value to the request property `held/items/subjectType`
- **2026-10-29** `e1fc804546d3`: 1 info
  - endpoint added

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