Filter messages by message ID
- To gain access to the Email Activity Feed API, purchase additional email activity history.
- To purchase additional history, go to Account Details > Your Products > Add-ons in the Twilio SendGrid console.
- To query all of your stored messages, query individual messages, and download a CSV with data about the stored messages, use the Email Activity API.
- To learn how to build queries and use the API, see Getting Started with the Email Activity Feed API or go to Activity in the Twilio SendGrid console.
GET/v3/messages/{msg_id}
Base url: https://api.sendgrid.com (The Twilio SendGrid v3 API)
Get all of the details about the specified message.
For Regional (EU) subusers, no data will be generated for this service.
Bearer <<YOUR_API_KEY_HERE>>The ID of the message you are requesting details for.
Optional
The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account.
test0@example.comOptional
A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message.
Optional
The email's subject line.
Optional
The intended recipient's email address.
Optional
The message's status.
processeddeliverednot_deliveredOptional
The ID associated with a Twilio SendGrid email template used to format the message.
Optional
The unsubscribe group associated with this email.
1Optional
Teammate's username
^$|^[A-Za-z0-9]+Min length: 0Max length: 64Optional
The ID of the API Key used to authenticate the sending request for the message.
^[A-Za-z0-9]+Min length: 3Max length: 50Optional
List of events related to email message
Optional
This is the IP of the user who sent the message.
Optional
Categories users associated to the message
Optional
JSON hash of key-value pairs associated with the message.
NullOptional
IP used to send to the remote Mail Transfer Agent.
Optional
Whether or not the outbound IP is dedicated vs shared
dedicatedshared1const client = require("@sendgrid/client");2client.setApiKey(process.env.SENDGRID_API_KEY);34const msg_id = "msg_id";56const request = {7url: `/v3/messages/${msg_id}`,8method: "GET",9};1011client12.request(request)13.then(([response, body]) => {14console.log(response.statusCode);15console.log(response.body);16})17.catch((error) => {18console.error(error);19});