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

# Generate Download URL

Generate a temporary download URL for the enriched CSV file from a completed enrichment job. The URL contains a one-time token and expires after a set period.

## Request Body

<ParamField body="data" type="object">
  <Expandable title="properties">
    <ParamField body="record_id" type="string" required>
      The record ID you provided when calling the `/enrich` endpoint.
    </ParamField>
  </Expandable>
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://search.leads-siren.com/enrichment-service/generate-download-url \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "data": {
        "record_id": "abc-123-def"
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  resp = requests.post(
      "https://search.leads-siren.com/enrichment-service/generate-download-url",
      headers={"x-api-key": "YOUR_API_KEY"},
      json={
          "data": {
              "record_id": "abc-123-def"
          }
      }
  )
  url = resp.json().get("download_url")
  print(url)
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "download_url": "https://search.leads-siren.com/enrichment-service/download/abc123token"
  }
  ```

  ```json 200 — File not ready theme={null}
  {
    "download_url": null
  }
  ```

  ```json 400 theme={null}
  {
    "detail": "Missing record_id"
  }
  ```
</ResponseExample>
