List sent emails

List sent emails

GET/api/v1/email

GET /email
curl -X GET 'https://www.unitpost.com/api/v1/email' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0'
Response · 200
{
  "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
FieldTypeDescription
limitinteger · queryMax rows to return (default 20, max 100).
afterstring · queryReturn rows after this id (forward paging).
beforestring · queryReturn rows before this id (backward paging).
statusstring · queryFilter by send status.
tostring · queryOnly emails to this recipient address.
contact_idstring · queryOnly emails to this contact (`con_…`): sends linked to it or addressed to its current email address.
campaign_idstring · queryOnly emails produced by this campaign's fan-out.
batch_idstring · queryOnly emails sent as part of this batch.
created_afterstring · queryOnly emails created at/after this ISO 8601 time.
created_beforestring · queryOnly emails created at/before this ISO 8601 time.
qstring · querySearch: 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.
sourcestring · queryHow the email was sent: `api`, `smtp`, `test` (a test send), `batch`, `campaign`, or `reply` (from the inbox).
outcomestring · queryWhat 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
FieldTypeDescription
objectrequiredstring—
idrequiredstring—
torequiredstring[]—
fromrequiredstring—
subjectrequiredstring—
template_idrequiredstring | null—
campaign_idrequiredstring | null—
statusrequiredenumscheduled | queued | sent | delivered | bounced | complained | canceled | failed—
last_eventrequiredstring—
scheduled_atrequiredstring | null—
sent_atrequiredstring | null—
delivered_atrequiredstring | null—
opened_atrequiredstring | null—
clicked_atrequiredstring | null—
canceled_atrequiredstring | null—
last_errorrequiredstring | null—
created_atrequiredstring—
ccstring[]Cc recipients, as sent. Empty when none. Only on `GET /email/{id}`.
bccstring[]Bcc recipients, as sent. Empty when none. Only on `GET /email/{id}`.
reply_tostring[]Reply-To addresses, as sent. Empty when none. Only on `GET /email/{id}`.
tagsobject[]The send's tags. Empty when none. Only on `GET /email/{id}`.
200401403422503

Search docs and guides

Search the docs and product guides.