---
title: "Read the rules an accountant wrote for this client, for the bookkeeping agent"
method: GET
path: "/accountant/companies/{customerId}/agent/client-context"
tags: ["Accountant Portal"]
---

# Read the rules an accountant wrote for this client, for the bookkeeping agent

`GET /accountant/companies/{customerId}/agent/client-context`

## Request

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

The company's client context marked AI-loadable, of the classes `accountant_operating_note` and `sanitized_client_context` (product specs are not about one client and are left out), oldest first: what the client's accountant wrote down about how this client's books are kept (standing rules, vendor treatments, owners). The bookkeeping agent sends it to the model as the client's policy. Only a person writes client context. Readable by the bookkeeping agent's key (409 AGENT_DISABLED / AGENT_KILLED, or 403 for a patient-data company, when it may not work there) and by human accountants assigned to the customer. The shared cloud-bookkeeping service token gets 404. Mounted only when the deployment enables the bookkeeping agent (default off); otherwise 404.

## Path parameters

- `customerId` string, uuid, required

## Response `200`

Success envelope

- object
  - `success` boolean, required
  - `data` object[], required
    - `id` string, uuid, required
    - `version` integer, required: The entry's version; a run's load receipt names it.
    - `imported` boolean, required: Written by an approved median-ops import; the agent keeps a person's own rules first.
    - `title` string, required
    - `content` string, required
    - `updatedAt` string, date-time, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: The bookkeeping agent is disabled or killed for this company (its key only)

## Changes

- **2026-11-28** `629ac127e9e4`: 2 info
  - added the required property `data/items/imported` to the response with the `200` status
  - added the required property `data/items/version` 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/client-context/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)
