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

ParameterTypeRequiredDescription
statusstringOptionalpending → processing → completed (or failed / expired).
download_urlstringOptionalSet once completed — points at GET /v3/events/export/{id}/download.
row_count / filename / expires_atmixedOptionalRows in the file, the suggested filename, and when the file is deleted.
error_messagestringOptionalWhy a failed export failed — actionable, e.g. how far over the row cap the window was.

Responses

StatusDescription
200The export job.
404No 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)