---
title: "Queue an accounting validation run"
method: POST
path: "/accountant/companies/{customerId}/validation-runs"
tags: ["Accountant Portal"]
---

# Queue an accounting validation run

`POST /accountant/companies/{customerId}/validation-runs`

## Request

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

Requires current company and exact legal-entity access, or an all-entity grant for a company without legal entities. A repeat of the same request with the same idempotency key returns the existing run. The worker checks access again before reading financial records.

## Path parameters

- `customerId` string, uuid, required

## Headers

- `Idempotency-Key` string, uuid, required

## Request body

- AccountantValidationRunInput
  - `entityId` string, uuid, nullable, required: Null for a company-wide run.
  - `startDate` string, date, required: First accounting date included.
  - `endDate` string, date, required: Use an end date on or before today in UTC. The inclusive period must cover 1 to 366 days.
  - `basis` 'accrual' | 'cash', required
  - `targetAccuracy` integer, required

## Response `202`

Run accepted or existing run returned for this key

- AccountantValidationRunResponse
  - `success` true, required
  - `data` AccountantValidationRun, required
    - `id` string, uuid, required
    - `companyId` string, uuid, required
    - `entityId` string, uuid, nullable, required: Null for a company-wide run.
    - `startDate` string, date, required
    - `endDate` string, date, required
    - `basis` 'accrual' | 'cash', required
    - `targetAccuracy` integer, required
    - `status` 'queued' | 'running' | 'completed' | 'failed', required
    - `createdAt` string, date-time, required
    - `startedAt` string, date-time, nullable, required
    - `completedAt` string, date-time, nullable, required
    - `error` string, nullable, required: Safe failure message when applicable.
    - `result` AccountantValidationResult, nullable, required
      - `schemaVersion` 2: Omitted on historical validation results.
      - `accuracyPercent` number, nullable, required: Percentage of conclusive checks that passed, or null when none were conclusive.
      - `coveragePercent` number, required: Percentage of applicable checks in the original worker catalog with a conclusive result. Use evidenceReview for expanded coverage on new runs.
      - `passedChecks` integer, required
      - `failedChecks` integer, required
      - `blockedChecks` integer, required
      - `notApplicableChecks` integer: Checks whose prerequisite scope does not apply to this run. Omitted on earlier runs.
      - `targetMet` boolean, nullable, required: Legacy worker-catalog target. Null when any applicable worker check is blocked or the conclusive pass rate is unavailable.
      - `observedTargetMet` boolean, nullable: Whether the conclusive checks meet the target. Null if there are no conclusive checks. Omitted on earlier runs.
      - `checks` object[], required
        - `id` string, required
        - `label` string, required
        - `status` 'passed' | 'failed' | 'blocked' | 'not_applicable', required
        - `detail` string, required
        - `surface` 'dashboard' | 'reports'
        - `group` string
        - `assurance` 'sanity' | 'arithmetic'
      - `evidenceReview` object: Coverage of required controls beyond the original worker catalog. Omitted on historical validation results.
        - `status` 'incomplete', required
        - `applicableChecks` integer, required
        - `conclusiveChecks` integer, required
        - `conclusiveCoveragePercent` number, required
        - `unverifiedControls` object[], required
          - `id` string, required
          - `checkVersion` 1, required
          - `label` string, required
          - `layer` 'source_completeness' | 'ledger_provenance' | 'statements_and_schedules' | 'external_reconciliation' | 'api_export_equivalence' | 'rendered_ui', required
          - `assurance` 'source_reconciliation' | 'external_reconciliation' | 'export_comparison' | 'rendered_ui', required
          - `status` 'blocked', required
          - `reason` object, required
            - `code` 'evidence_not_captured_by_worker', required
            - `dependency` string, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `409`: The key already identifies different input, or a conflicting run is active
- `422`: Invalid path, query, validation run input, or idempotency key
- `503`: Required sandbox provider configuration or service is unavailable

## Changes

- **2026-11-23** `3b34c2190a69`: 1 breaking, 1 info
  - the response property `data/entityId` became nullable for the status `202`
  - the request property `entityId` became nullable
- **2026-11-21** `cd48ae461710`: 3 info
  - added the optional property `data/result/oneOf[#/components/schemas/AccountantValidationResult]/checks/items/assurance` to the response with the `202` status
  - added the optional property `data/result/oneOf[#/components/schemas/AccountantValidationResult]/evidenceReview` to the response with the `202` status
  - added the optional property `data/result/oneOf[#/components/schemas/AccountantValidationResult]/schemaVersion` to the response with the `202` status
- **2026-11-21** `8723ceeb9d2c`: 1 info
  - endpoint added

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