---
title: "Read a company's bookkeeping agent settings"
method: GET
path: "/accountant/companies/{customerId}/agent/settings"
tags: ["Accountant Portal"]
---

# Read a company's bookkeeping agent settings

`GET /accountant/companies/{customerId}/agent/settings`

## Request

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

Enablement, kill switch, patient-data restriction, per-run caps and the daily model budget, plus `stripeConnected`, which is read from the company's Stripe connections and is not a stored setting. `configured` is false when no stored settings exist, in which case safe defaults are returned disabled and patient-data restricted. 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

## Response `200`

Success envelope

- object
  - `data` object
    - `configured` boolean: True only when a stored settings row exists.
    - `patientData` 'unset' | 'yes' | 'no': The client's patient-data answer (#4334, `GET .../patient-data`). The agent runs nothing unless it is `no`; `phiRestricted` reads true whenever it is not `no`.
    - `stoppedEverywhere` boolean: Penny is stopped everywhere (#4357, `POST /accountant/penny/stop`). `killSwitch` then reads true as well, so the worker stops on the field it already polls; the company's stored switch is unchanged.
    - `stripeConnected` boolean: True when the company has a Stripe connection that is connected, importing, synced or in error. The API then books every row from the Stripe integration itself, and a bank deposit from Stripe is a payout of sales already booked, never revenue.
    - `daySpend` object: Today's model spend for this client in micro-USD against its effective daily cap (PG-p19-023).
      - `spentMicros` integer, required
      - `capMicros` integer, required
      - `capReached` boolean, required
    - `shippedFixes` object[]: Issue loop: the fixes this build carries that release the agent's held work, each exported next to the code it changes. `sides` names where the fix's code lives.
      - `id` string, required
      - `sides` string[], required
    - `apiCommit` string, nullable: The build's commit, sent in the same response as `shippedFixes`.
    - `openFindings` integer: How many of the company's agent findings are open, still hold work, or cleared with an issue still to close.
    - `githubWritesLastHour` integer: GitHub writes recorded for this company's findings in the last hour (the worker sums it over its companies for its hourly cap).
    - `companyName` string, nullable: The company's own name. A bank feed that puts the client in the merchant field names no payee, so the agent reads the payee from the bank line.
    - `documentsForModel` boolean: Whether document fields (a document's vendor, amount, date, type, its own account, anything read off it) may reach the agent's model at this company. False at a PHI-bounded company (`phi_bounded_ingestion`): the agent makes no model call there (`bankFeedTextOnly`), and its reads carry no document field. A failed read of the flag answers 503.
    - `stoppedHere` boolean: Someone stopped Penny at this client (migration 641); killSwitch reads true meanwhile.
    - `clientStop` AgentClientStop
      - `stoppedHere` boolean, required
      - `by` object, nullable, required
        - `userId` string, uuid, required
        - `name` string, nullable, required
      - `at` string, date-time, nullable, required
      - `reason` string, nullable, required
    - `pausedBankAccountIds` string[]: Bank accounts whose feed is broken; every agent write on one of their rows answers 409 AGENT_SOURCE_PAUSED until it recovers.
    - `categorizeState` 'shadow' | 'live' | 'paused' | 'off': The `categorize` capability's state at the company (F8). Only `live` lets the agent write a categorization; it is live only with a replay pass and a super-admin's approval on record.
    - `bankFeedTextOnly` boolean: True at a PHI-bounded company (`phi_bounded_ingestion`; the negation of `documentsForModel`, from the same read). There the agent makes no model call (#2587, decision (d)): the model-call route refuses it with 403 `AGENT_PHI_BOUNDED_NO_MODEL`, and every row the agent cannot settle by rules goes to a person. The transaction list and detail still answer the agent's key each row in the engine's bank-only view (only a transaction written by Plaid, `integrationSource` exactly `plaid`, with Plaid's raw description keeps its bank text), and the merchant rules no pattern. The worker reads anything but a boolean as unread: it makes no model call and the run ends `blocked_phi`.

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `503`: The PHI-bounded company flag (`phi_bounded_ingestion`) could not be read, so `documentsForModel` is not answered on a guess. Retry.

## Changes

- **2026-11-26** `4a2098becaf9`: 7 info
  - added the optional property `data/categorizeState` to the response with the `200` status
  - added the optional property `data/clientStop` to the response with the `200` status
  - added the optional property `data/daySpend` to the response with the `200` status
  - added the optional property `data/patientData` to the response with the `200` status
  - …3 more
- **2026-10-30** `0b1320f7196d`: 1 info
  - added the optional property `data/configured` to the response with the `200` status
- **2026-10-29** `e1fc804546d3`: 1 info
  - endpoint added

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