Introducing Email Logs: Search, Filter, and Troubleshoot Email Events
Time to read:
Troubleshooting the lifecycle of a single email is a challenge. Until now, developers and support teams often have to stitch together data from disparate systems, wait on delayed reports, or rely on technical resources to view event level details and understand why an email has bounced, been deferred, or been delivered.
That’s why we’re excited to introduce Email Logs, a new API that provides a fast and consistent way to search and retrieve event-level email data directly from Twilio SendGrid.
With Email Logs, you get observability into your email program: every event tied to an sg_message_id, accessible in near real-time, available in the Twilio SendGrid Console and API.
What you can do with Email Logs
Validate a delivery in seconds
When a consumer says, “I didn’t get the email…,” you can view the status easily and quickly in the SendGrid console and API.
Here’s a screenshot of what you’ll see in your Twilio SendGrid Console on the Email Logs tab:
Example Email Logs API call and responses
Here’s an example of an API call you can make with the Email Logs product, and the response you could receive.
API call
Sample response
Drill into ESP responses for deferrals, bounces, and blocks
When an email delivery fails, you can see the exact response and reason returned from the ESP.
Here’s an example of what you might see in your Twilio SendGrid Console:
Here’s an example of an API call you can make using a SendGrid Message ID.
API call
Sample response
Get started with Email Logs, today
Email Logs is available today for all Twilio SendGrid customers. To start exploring your data in the UI:
- Navigate to your SendGrid Console
- Click on Email Logs in the side panel
Or, access it via API:
- Generate a new API key or use an existing key
- Ensure the Email Activity permission scope is enabled for your API Key
- Call the Email Logs endpoint:
POST https://api.sendgrid.com/v3/logsorGET https://api.sendgrid.com/v3/logs/{sg_message_id}
Here’s an example of the permissions you’ll want to set for the API Key, in order to access Email Logs:
Better visibility leads to better deliverability. With Email Logs you’ll always know what happened to your messages and why – get started with Email Logs, today!
Taylor Ferguson is a Product Manager on Twilio’s Channels Data team, shaping the platform foundations that power data consistency, observability, and insights across Twilio’s communication channels.
Kim Castings is a Product Marketer for Twilio SendGrid Email, focused on turning customer insights into product strategy and launches that make email easier for developers and marketers.
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.