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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Required | The upload id returned by POST /v3/uploads — always starts with up_ (e.g. up_9f3KzQ7wXt2mB4hN). |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
excel | string | Optional | Set 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
| Parameter | Type | Required | Description |
|---|---|---|---|
clicked_at | string (ISO 8601) | Optional | When the click happened. |
recipient | string | Optional | The email address the tracked message was delivered to. |
ip / country / user_agent | string | Optional | Where and what clicked — real client IP, resolved country, and browser user agent. |
message_id / from / to / cc / bcc / subject / body | string | Optional | The source email the link was clicked in (body is a plain-text excerpt, up to 2,000 characters). |
Responses
| Status | Description |
|---|---|
200 | The CSV file (text/csv), served as an attachment named after the file, e.g. report.pdf-clicks.csv. |
404 | No 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()