---
title: "POST /api/jobs/download"
method: POST
path: "/api/jobs/download"
tags: ["Job Manager APIs"]
---

# POST /api/jobs/download

`POST /api/jobs/download`

<b>Allowed user roles:</b><br/><ul><li>sdzReadOnly</li><li>sdzUser</li></ul><br/><br/>queries data and produces a file; can be SFTP'ed or for downloaded as an async job. Supported file formats are CSV, PIPE, TAB, XLSX, and JSON. Warning: Care is needed when using CSV as there can be issues when the data is variable, complex and/or not fixed columns

## Request body

- DownloadFileRequestPublic
  - `title` string
  - `description` string
  - `filePassword` string
  - `sftpUrl` string
  - `sftpUsername` string
  - `sftpPassword` string
  - `emailResultsTo` string[]
  - `fileType` 'CSV' | 'PIPE' | 'TAB' | 'XLS' | 'XLSX' | 'XLSM' | 'EDI' | 'JSON' | 'XML' | 'PARQUET' | 'SPSS'
  - `tql` string, required

## Response `200`

OK

- FileDownloadJobPublic
  - `jobId` string, uuid, required
  - `name` string, required
  - `status` 'NEW' | 'QUEUED' | 'RUNNING' | 'CANCELLED' | 'COMPLETED_ERROR' | 'COMPLETED_SUCCESS' | 'INCOMPLETE_ERROR', required
  - `jobCreated` string, date-time, required
  - `jobQueued` string, date-time
  - `jobStarted` string, date-time
  - `jobCompleted` string, date-time
  - `emailRecipients` string[]
  - `timeout` integer
  - `timeoutUnit` 'NANOSECONDS' | 'MICROSECONDS' | 'MILLISECONDS' | 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS', required
  - `results` JobResultsPublic
    - `results` object
    - `error` unknown
    - `errorString` string
    - `errorStrings` string[]
  - `customerName` string, required
  - `sdzName` string, required
  - `effectiveId` string, uuid, required
  - `loggedInId` string, uuid, required
  - `mdc` object, required
  - `fileType` 'CSV' | 'PIPE' | 'TAB' | 'XLS' | 'XLSX' | 'XLSM' | 'EDI' | 'JSON' | 'XML' | 'PARQUET' | 'SPSS'
  - `title` string
  - `description` string
  - `password` string
  - `sftpUrl` string
  - `sftpUsername` string
  - `sftpPassword` string
  - `key` string
  - `tql` string

---

[API](https://skmtc.net/burstiq/apis/lifegraph-apis.md) · [All operations](https://skmtc.net/burstiq/apis/lifegraph-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/burstiq/lifegraph-apis/revisions/381306ef1fcd/schema)
