Export upload click report (CSV)

Export every recipient click on a hosted upload as a CSV report.

Every recipient click on a hosted upload’s public /f/ link is recorded as a clicked event. This endpoint exports them as a CSV download — one row per click, joined with the email it came from, so you can see exactly who opened your file, when, and from which send. Returns just the header row while there are no clicks yet.

GET /v3/uploads/{id}/clicks.csv

Path parameters

ParameterTypeRequiredDescription
idstringRequiredThe upload id returned by POST /v3/uploads — always starts with up_ (e.g. up_9f3KzQ7wXt2mB4hN).

Query parameters

ParameterTypeRequiredDescription
excelstringOptionalSet to 1 (or true) for an Excel-friendly file: UTF-8 BOM + a sep=, first line so Excel splits on commas regardless of locale. Omit for a pure RFC 4180 CSV.

CSV columns

One row per click
ParameterTypeRequiredDescription
clicked_atstring (ISO 8601)OptionalWhen the click happened.
recipientstringOptionalThe email address the tracked message was delivered to.
ip / country / user_agentstringOptionalWhere and what clicked — real client IP, resolved country, and browser user agent.
message_id / from / to / cc / bcc / subject / bodystringOptionalThe source email the link was clicked in (body is a plain-text excerpt, up to 2,000 characters).

Responses

StatusDescription
200The CSV file (text/csv), served as an attachment named after the file, e.g. report.pdf-clicks.csv.
404No upload with this id on your account.

Code examples

cURL
curl https://api.wemail.io/v3/uploads/{id}/clicks.csv \
  -H "Authorization: Bearer afn_live_…"
Node.js
const res = await fetch("https://api.wemail.io/v3/uploads/{id}/clicks.csv", {
  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/uploads/{id}/clicks.csv",
    headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
)
data = r.json()