Skip to main content
POST
Queue an asynchronous export (CSV/JSONL to S3, row cap 5,000,000)

Authorizations

X-Auth-Token
string
header
required

FlowPayroll JWT (raw token, no Bearer prefix)

X-Org-Id
string
header
required

Organisation to scope the request to. Required when the principal can access more than one organisation; optional for single-organisation principals (the authorizer resolves it automatically).

Body

application/json

Exactly one of definitionId (saved) or definition (inline).

definitionId
string | null
definition
object

The report-definition document — one contract drives sync runs, exports, saved definitions and schedules. See docs/API.md for the full rules.

format
enum<string>
default:CSV
Available options:
CSV,
JSONL

Response

Export accepted (status QUEUED)

exportId
string
required
status
enum<string>
required
Available options:
QUEUED,
RUNNING,
COMPLETED,
FAILED
requestedAt
string<date-time>
required
format
string | null
rowCount
integer<int64> | null
downloadUrl
string | null

Presigned S3 URL, 12-hour expiry; refetch this resource to re-issue

expiresAt
string<date-time> | null
error
string | null
completedAt
string<date-time> | null