List sent emails
GET/api/v1/email
curl -X GET 'https://www.unitpost.com/api/v1/email' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0'{
"object": "list",
"has_more": false,
"data": [
{
"object": "email",
"id": "id_123",
"to": [
"customer@example.com"
],
"from": "you@yourdomain.com",
"subject": "Welcome to Acme",
"template_id": "template_123",
"campaign_id": "campaign_123",
"status": "scheduled",
"last_event": "string",
"scheduled_at": "2026-01-01T00:00:00.000Z",
"sent_at": "2026-01-01T00:00:00.000Z",
"delivered_at": "2026-01-01T00:00:00.000Z",
"opened_at": "2026-01-01T00:00:00.000Z",
"clicked_at": "2026-01-01T00:00:00.000Z",
"canceled_at": "2026-01-01T00:00:00.000Z",
"last_error": "string",
"created_at": "2026-01-01T00:00:00.000Z",
"cc": [
"string"
],
"bcc": [
"string"
],
"reply_to": [
"string"
],
"tags": [
{
"name": "Example",
"value": "string"
}
]
}
]
}Retrieve a list of emails your workspace has sent or scheduled. Results are newest-first and cursor-paginated, and each row is a reference to a single email (status and lifecycle timestamps, not the rendered body). Narrow the list with the status, to, contact_id, campaign_id, batch_id, q, source, outcome and created_after/created_before filters. A q, source or outcome value it can't apply (a typo, an unknown id) is ignored and named in the Unitpost-Warning header, and the answer is the one without it; send Unitpost-Strict: true to have it refused instead. Use an email's id with Retrieve an email to read its full record, or Cancel or reschedule an email to change a scheduled send. For aggregate deliverability numbers over a window, see Email deliverability stats. With campaign_id it is that campaign's report, so campaigns:read reads it too. Requires the emails:read capability.
Parameters13 fields
| Field | Type | Description |
|---|---|---|
limit | integer · query | Max rows to return (default 20, max 100). |
after | string · query | Return rows after this id (forward paging). |
before | string · query | Return rows before this id (backward paging). |
status | string · query | Filter by send status. |
to | string · query | Only emails to this recipient address. |
contact_id | string · query | Only emails to this contact (`con_…`): sends linked to it or addressed to its current email address. |
campaign_id | string · query | Only emails produced by this campaign's fan-out. |
batch_id | string · query | Only emails sent as part of this batch. |
created_after | string · query | Only emails created at/after this ISO 8601 time. |
created_before | string · query | Only emails created at/before this ISO 8601 time. |
q | string · query | Search: an exact recipient address, or part of the subject or the sender (case-insensitive), as the dashboard's Sent table searches. At most 200 characters. |
source | string · query | How the email was sent: `api`, `smtp`, `test` (a test send), `batch`, `campaign`, or `reply` (from the inbox). |
outcome | string · query | What happened, as a campaign's Emails tab filters: `delivered`, `opened`, `clicked`, `unsubscribed` (engagement overlaps delivery), `bounced`, `complained`, `failed` (failed, suppressed or canceled), `pending`. With `campaign_id`: who opened or clicked a campaign. |
Response · 200 fields21 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
torequired | string[] | — |
fromrequired | string | — |
subjectrequired | string | — |
template_idrequired | string | null | — |
campaign_idrequired | string | null | — |
statusrequired | enumscheduled | queued | sent | delivered | bounced | complained | canceled | failed | — |
last_eventrequired | string | — |
scheduled_atrequired | string | null | — |
sent_atrequired | string | null | — |
delivered_atrequired | string | null | — |
opened_atrequired | string | null | — |
clicked_atrequired | string | null | — |
canceled_atrequired | string | null | — |
last_errorrequired | string | null | — |
created_atrequired | string | — |
cc | string[] | Cc recipients, as sent. Empty when none. Only on `GET /email/{id}`. |
bcc | string[] | Bcc recipients, as sent. Empty when none. Only on `GET /email/{id}`. |
reply_to | string[] | Reply-To addresses, as sent. Empty when none. Only on `GET /email/{id}`. |
tags | object[] | The send's tags. Empty when none. Only on `GET /email/{id}`. |