# Download Lead Export

> Download the CSV of a completed lead export.

Requires an API key with the `read` scope.

Returns the CSV file (`text/csv`). The export job must belong to your workspace and be `completed`; the file expires one hour after it was built.

## Path Parameters

<ParamField path="job_id" type="string" required>The `lead_export` job returned by [Export Leads](/api-reference/leads/export-leads).</ParamField>

## Response

The response body is the CSV file, not JSON.

<RequestExample>
```bash cURL
curl -X GET "https://api.foxreach.io/api/v1/leads/export/cmjob904/download" \
  -H "X-API-Key: otr_your_key" -o leads.csv
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
csv_text = client.leads.download_export("cmjob904")
```

```typescript TypeScript SDK
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const csv = await client.leads.downloadExport("cmjob904");
```
</RequestExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `read` |
| `404` | Job not found in this workspace, not finished, or the file expired |

## Rate Limit

- **300 requests per minute, shared by every `read` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`read`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
