Event export status
Poll an event export until its download link is ready.
Statuses run pending → processing → completed (or failed). Once completed, the response carries download_url and row_count; a failed job explains itself in error_message — most commonly the 1,000,000-row cap, in which case split the window and re-submit. Exports expire 7 days after completion; expires_at tells you when.
GET /v3/events/export/{id}
Response fields
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | Optional | pending → processing → completed (or failed / expired). |
download_url | string | Optional | Set once completed — points at GET /v3/events/export/{id}/download. |
row_count / filename / expires_at | mixed | Optional | Rows in the file, the suggested filename, and when the file is deleted. |
error_message | string | Optional | Why a failed export failed — actionable, e.g. how far over the row cap the window was. |
Responses
| Status | Description |
|---|---|
200 | The export job. |
404 | No such export on your account. |
Code examples
cURL
curl https://api.wemail.io/v3/events/export/$EXPORT_ID \
-H "Authorization: Bearer afn_live_…"
# → { "status": "completed", "row_count": 48210, "download_url": "…" }Node.js
import { WemailClient } from "@wemailio/sdk";
const wemail = new WemailClient(process.env.WEMAIL_API_KEY);
const job = await wemail.events.getEventExport({ id: exportId });
if (job.status === "completed") console.log(job.rowCount, job.downloadUrl);Python
import os
from wemail import WemailClient
wemail = WemailClient(api_key=os.environ["WEMAIL_API_KEY"])
job = wemail.events.get_event_export(export_id)
if job.status == "completed":
print(job.row_count, job.download_url)