Download an export
Download the generated suppression CSV.
Streams the CSV with a Content-Disposition: attachment header. Cell values are escaped against Excel formula injection, so the file is safe to open directly in a spreadsheet.
GET /v3/suppressions/exports/{id}/download
Responses
| Status | Description |
|---|---|
200 | The CSV file (text/csv). |
404 | No such export, not finished yet, or expired (exports are kept for 7 days). |
Code examples
cURL
curl https://api.wemail.io/v3/suppressions/exports/{id}/download \
-H "Authorization: Bearer afn_live_…"Node.js
const res = await fetch("https://api.wemail.io/v3/suppressions/exports/{id}/download", {
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
},
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://api.wemail.io/v3/suppressions/exports/{id}/download",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()