filters object (date range, statuses, case types).
Enqueue
entityisleadsorcases;formatiscsv.- Optional
fieldsselects specific columns, and optionalfilters(startDate,endDate,statuses,caseTypes) bounds the extract — also the tool for staying under the 100,000-row cap on large data sets. - Enqueueing is a mutation, so the standard
X-Idempotency-Keyheader is required. Replaying the same key returns the stored response; reusing a key with a different request body returns409with codeIDEMPOTENCY_CONFLICT. - The response returns the job with a
queuedstatus and itsjobId.
Track completion
Two ways, pick either (or both):- Event feed — job completion surfaces as
export_job.completed(orexport_job.failed) onGET /api/v1/events. If you already run a cursor loop, this is free. - Polling —
GET /api/v1/export-jobs/{jobId}returns the current status;GET /api/v1/export-jobslists your org’s jobs.
Download
Once a job is complete:-L in curl) to fetch the CSV. Requesting the download for a job in any non-completed status is an error, not a redirect. Presigned URLs expire quickly, so hit the download endpoint when you are ready to retrieve the file rather than storing the redirect target.
Notes
- Exports remain single-organization, including for HQ keys with the report hierarchy toggle on. A key sees only its own organization’s data, and
reports:readis required throughout. The job schema does not acceptorganizationIds; use saved report execution for authorized HQ rollups. - Export contents pass the same sensitive-field posture as the rest of the API — fields gated behind elevated scopes are not smuggled out through exports.