You must purchase additional email activity history to gain access to the Email Activity Feed API.
The Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages.
Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them.
See "Getting Started with the Email Activity Feed API" for help building queries and working with the API.
You can also work with email activity in the Activity section of the Twilio SendGrid App.
Filter all messages to search your Email Activity. All queries must be URL encoded, and use the following format:
query={query_type}="{query_content}"
Once URL encoded, the previous query will look like this:
query=type%3D%22query_content%22
For example, to filter by a specific email, use the following query:
query=to_email%3D%22example%40example.com%22
Visit our Query Reference section to see a full list of basic query types and examples.
Bearer <<YOUR_API_KEY_HERE>>
Use the query syntax to filter your email activity.
The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000
1
Maximum: 1000
Default: 10
1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const queryParams = {5query: 'from_email="email@example.com"',6limit: 10,7};89const request = {10url: `/v3/messages`,11method: "GET",12qs: queryParams,13};1415client16.request(request)17.then(([response, body]) => {18console.log(response.statusCode);19console.log(response.body);20})21.catch((error) => {22console.error(error);23});