> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gu1.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Download batch job payload

> Download the processed payload.json stored for a batch import job (resume/debug). Authenticated attachment — no public object-storage URL.

## Endpoint

```
GET https://api.gu1.ai/batch-import/jobs/{jobId}/payload
```

Returns the **processed** JSON body Gu1 stored for **resume/requeue** (normalized rows + options), as an attachment. This is **not** the original CSV/XLS the client uploaded — for that use `GET /batch-import/jobs/{jobId}/source` when `rawSourceS3Key` exists. The object-storage key is resolved server-side and is **never** returned as a public URL.

## Authentication

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

Requires the same batch-import gate as other `/batch-import` routes, plus the kind-specific **export** permission:

| Job kind                                  | Permission            |
| ----------------------------------------- | --------------------- |
| `transaction_batch`                       | `transactions:export` |
| `user_event_batch`                        | `events:export`       |
| `entity_batch` (alias `entity_automatic`) | `entities:export`     |

## HTTP responses

| Status | When                                                                      |
| ------ | ------------------------------------------------------------------------- |
| `200`  | Payload bytes (`Content-Type: application/json`)                          |
| `401`  | Not authenticated                                                         |
| `403`  | Missing export permission                                                 |
| `404`  | Unknown job, or payload not stored for this job (`PAYLOAD_NOT_AVAILABLE`) |
| `502`  | Stored object could not be read (`PAYLOAD_DOWNLOAD_FAILED`)               |

## Notes

* Present when metadata includes `payloadS3Key` (or a legacy `sourceS3Key` that points at this job’s `payload.json`).
* Related: original upload via `GET /batch-import/jobs/{jobId}/source` when `rawSourceS3Key` exists; row failures via the kind-specific `failures.csv` endpoints.

See also: [Get batch job status](/en/api-reference/bulk-imports/get-batch-job-status), [Transaction batch failures](/en/api-reference/bulk-imports/get-transaction-batch-failures).
