Get Entity Export Run
Reports the status of an export run started by
POST /entities/{entityType}/export-runs.
Poll this until status is terminal, then fetch the CSV from
GET .../export-runs/{runId}/download if it succeeded.
Statuses
queued— the run exists and is waiting for a worker. A normal state every run passes through, not a stall: the run is recorded before the background work is dispatched.running— the export is streaming rows into its CSV.succeeded— the file is parked and downloadable.rowCountandfinishedAtare set.failed— the export stopped early.errorcarries the reason; start a new run to retry.expired— the run succeeded, but its CSV has passed the retention horizon (expiresAt) and been deleted. The run’s facts (rowCount, timestamps) remain readable; start a new export for a fresh file.
The body is fixed-size — the export request is not echoed back — so a poll costs the same however large the export is.
A run’s status stays readable for as long as the run exists: nothing removes
a run on a timer (only its FILE expires), and a run id belonging to another
company — or reached through a different entity type’s path than the one it
was started under — is a 404, exactly as an id that exists nowhere.
Required permission: company.{entity}:list — the exact key varies by
type (Policy uses company.policy:export), derived from the path’s
{entityType}. See
Permissions.
Authorizations
User-principal OAuth 2.0 Bearer authentication. Send a user-scoped Auth0 access token (audience = the app API audience) as Authorization: Bearer <jwt>. The request resolves to the user's identity and is authorized by their Role on the {companyId} in the path — the same role-based permissions the web app enforces. This is the path the MCP connector uses to act on a user's behalf; endpoints that accept it list both BearerAuth and ApiKeyAuth.
Path Parameters
Company identifier
Field Model V1 EXPORTABLE entity type (lowercase kebab-case URL slug): the six
CRUD entity types plus policy. Unlike the CRUD entity routes, policy IS
valid here — a Policy export reads the segment in effect on the asOf date
(defaulting to today).
event, exposure, quote, submission, person, organization, policy The run identifier returned by POST /entities/{entityType}/export-runs. Runs are scoped to their company
AND their entity type: a run id belonging to another company, or started
under a different entity type, returns 404, exactly as an id that
exists nowhere does.
Response
The run's current status
An export run's current status. Fixed size: there is no echo of the export request, so a poll costs the same however large the export is.
The run identifier
queued while the run waits for a worker (a normal state, not a stall), running while it projects and streams, then the terminal succeeded or failed — and expired once a succeeded run's CSV has passed its retention horizon and been deleted
queued, running, succeeded, failed, expired Data rows written to the CSV (the header row not counted); null until the run succeeds. It stays populated on an expired run, describing the file that existed.
Why the export stopped; null unless status is failed
When the run was started
When the run last made progress or changed status
When the run reached a terminal status; null until then
When the run's CSV artifact passes its retention horizon. After this instant the run reports expired and the download answers 404 — start a new export for a fresh file.
