List Email Events
Retrieve email events (deliveries, bounces, opens, clicks, etc.) for your account. Events are returned in reverse chronological order. If no from date is provided, defaults to the last 10 days.
Request
- Base URL: https://app.lettr.com/api
- URL: https://app.lettr.com/api/emails/events
- Auth: HTTP bearer
Query parameters
Comma-separated list of event types to filter by. Valid types: injection, delivery, bounce, delay, out_of_band, spam_complaint, policy_rejection, click, open, initial_open, amp_click, amp_open, amp_initial_open, generation_failure, generation_rejection, list_unsubscribe, link_unsubscribe.
Comma-separated list of recipient email addresses to filter by.
Start of the event search range (ISO 8601, inclusive). Defaults to 10 days ago. Events are kept for about 10 days, so an earlier date is pulled forward; from in the response shows the window actually covered.
End of the event search range (ISO 8601, exclusive). Defaults to now. Must be after from, otherwise the request fails with a 422.
Number of events per page.
Pagination cursor: the next_cursor value from the previous response. Any other value fails with a 422.
Filter events by transmission ID (request_id).
Comma-separated list of bounce classification codes to filter by.
Response
Email events retrieved successfully
Example response
{
"message": "Email events retrieved successfully.",
"data": {
"events": {
"data": [
{
"event_id": "7609871845907017144",
"timestamp": "2024-01-15T10:31:00.000Z",
"request_id": "7610639000055488914",
"rcpt_to": "recipient@example.com",
"raw_rcpt_to": "recipient@example.com",
"recipient_domain": "example.com",
"mailbox_provider": "Gmail",
"mailbox_provider_region": "Global",
"message_id": "699715cd9e6961853a97",
"subject": "Welcome to Lettr",
"friendly_from": "sender@example.com",
"sending_domain": "example.com",
"sending_ip": "168.203.51.91",
"msg_size": 30823,
"injection_time": "2024-01-15T10:30:00.000Z",
"campaign_id": "welcome-series",
"template_id": "template_7610639000055488914",
"template_version": "0",
"ip_pool": "default",
"msg_from": "msprvs1=abc123=bounces@sparkpostmail1.com",
"delv_method": "esmtp",
"recv_method": "rest",
"routing_domain": "gmail.com"
}
],
"total_count": 2,
"from": "2024-01-05T00:00:00+00:00",
"to": "2024-01-15T10:35:00+00:00",
"pagination": {
"per_page": 25
}
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.