Skip to main content

Download CSV

Export a completed job's generated emails as a CSV file.

Endpoint​

Method: GET Path: /email-generation/jobs/{job_id}/download/ Full URL: https://backend.ecoreservice.com/api/v1/email-generation/jobs/{job_id}/download/ Auth: Authorization: Bearer <JWT>

Not enveloped

This endpoint streams a text/csv attachment — it is the only Email Generation endpoint not wrapped in the standard response envelope. Trigger a browser download (anchor / window.location); do not parse the response as JSON.

Available only once status == "Processed" — otherwise 400.

Example Request​

curl "https://backend.ecoreservice.com/api/v1/email-generation/jobs/123/download/" \
-H "Authorization: Bearer <JWT>" \
-o generated_emails.csv

CSV Columns​

In order:

EC ID, First Name, Last Name, Company Domain, Matched Domain, Generated Email, Status, Generated By, Validated By, Processed At

Error Responses​

HTTPWhenBody
400Job is not yet Processed{ "error": "..." }
404Job not found / not owned by this account{ "error": "..." }

See Error Codes for the full list.