Skip to main content

Email History

View all sent emails

Search

Find by recipient or subject

Filter

By status or date

Event Timeline

Track delivery events

Get Email Logs

GET/v1/logs
Retrieve a list of email logs with delivery status, events, and metadata. Logs include all email activity within the specified time range.

Query Parameters

status
string
Filter by status: sent, delivered, bounced, failed
email_id
string
Filter logs for a specific email ID
days
number
default:"7"
Number of days to look back (1-90)
limit
number
default:"50"
Number of results (1-100)
offset
number
default:"0"
Pagination offset
Search by subject or recipient email

Request

curl "https://www.unosend.co/api/v1/logs?days=7&limit=50" \
  -H "Authorization: Bearer un_your_api_key"

Response

200 OK
{
  "success": true,
  "data": {
    "data": [
      {
        "id": "email_abc123",
        "from": "hello@yourcompany.com",
        "to": ["user@example.com"],
        "subject": "Welcome to our platform",
        "status": "delivered",
        "created_at": "2024-12-01T10:30:00.000Z",
        "sent_at": "2024-12-01T10:30:01.000Z",
        "delivered_at": "2024-12-01T10:30:03.000Z",
        "scheduled_for": null,
        "metadata": {
          "user_id": "usr_123"
        },
        "events": [
          {
            "type": "sent",
            "created_at": "2024-12-01T10:30:01.000Z",
            "metadata": {}
          },
          {
            "type": "delivered",
            "created_at": "2024-12-01T10:30:03.000Z",
            "metadata": {
              "smtp_response": "250 OK"
            }
          }
        ]
      }
    ],
    "pagination": {
      "total": 156,
      "limit": 50,
      "offset": 0,
      "has_more": true
    },
    "filters": {
      "status": null,
      "days": 7,
      "search": null
    }
  }
}

Log Object Fields

FieldTypeDescription
idstringUnique email identifier
fromstringSender email address
toarrayArray of recipient email addresses
subjectstringEmail subject line
statusstringCurrent status (sent, delivered, bounced, failed)
created_atstringWhen the email was created (ISO 8601)
sent_atstring | nullWhen the email was sent
delivered_atstring | nullWhen the email was delivered
metadataobjectCustom metadata attached to the email
eventsarrayTimeline of events for this email

Status Values

StatusDescription
queuedEmail is queued for sending
sentEmail has been sent to the mail server
deliveredEmail was successfully delivered
bouncedEmail bounced (hard or soft bounce)
failedEmail failed to send
scheduledEmail is scheduled for future delivery

Example Queries

Filter by status

# Get only bounced emails
curl "https://www.unosend.co/api/v1/logs?status=bounced&days=30" \
  -H "Authorization: Bearer un_your_api_key"

Get logs for specific email

curl "https://www.unosend.co/api/v1/logs?email_id=email_abc123" \
  -H "Authorization: Bearer un_your_api_key"

Search by recipient

curl "https://www.unosend.co/api/v1/logs?search=user@example.com" \
  -H "Authorization: Bearer un_your_api_key"

Paginate through results

# Get second page of results
curl "https://www.unosend.co/api/v1/logs?limit=50&offset=50" \
  -H "Authorization: Bearer un_your_api_key"