# exportJobDownload

query · in the family [Reading your records](/reference/reading-your-records/)

## What it does

Get a short-lived link to download the file a finished export wrote — its name, size, row count and format come with it.

Download ONE finished background export's FILE: a short-lived presigned GET (alive 300 s — `expiresAt`) on the composed file, the name to save it as (`fileName` — <family>-<YYYYMMDD-HHMMSS>-<sysId>.<csv|jsonl>), and the file's facts off the record (`bytes` · `rowCount` · `format` · `partial` — true when the run halted before the end and the file holds what was written). The file lives 7 days from the finish; afterwards NOT_FOUND worded expired (the record stays readable). YOURS ALONE: only the job's OWNER may download — anyone else refuses AUTHZ/FORBIDDEN — and YOUR OWN right to list the plan's last family is re-checked (refused AUTHZ/FORBIDDEN naming it); a job that is not done (cancelled · expired · failed) refuses CONFLICT/REF_STATE naming its status; a job outside your tenant, or none at all, is NOT_FOUND. Requires authentication (user sessions).

## What happens

Read-only: only the person who started the export can download it, and only while they may still list that kind of record. The link lives five minutes; the file is kept for seven days after the export finishes, then it is gone and the download says so.

## Who may call it

Capability area: **Reading your records** — Looking up and listing the records of your organization.

- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows `api:exportJobDownload`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `id` | [ID](/types/#scalars) `ID!` | yes | The id of the record. |

## Returns

[ExportJobDownload](/types/ExportJobDownload/) `ExportJobDownload!` — One finished export's download: the presigned GET (`url`, alive until `expiresAt` — 300 s), the name to save it as, and the file's facts off the record — bytes · rowCount · format · `partial` (the run halted before the end; the file holds what was written).

## Example request

```graphql
query ExampleExportJobDownload($id: ID!) {
  exportJobDownload(id: $id) {
    url
    expiresAt
    fileName
    bytes
    rowCount
    format
    partial
  }
}
```

Variables:

```json
{
  "id": "01900000-0000-7000-8000-37386ae00000"
}
```

## Example response

```json
{
  "data": {
    "exportJobDownload": {
      "url": "https://example.com/hook",
      "expiresAt": "2027-01-31T00:00:00.000Z",
      "fileName": "Blue jeans",
      "bytes": 1,
      "rowCount": 1,
      "format": "csv",
      "partial": true
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
