Appearance
Retrieve an inbound email
One received message, with its bodies and headers.
http
GET /v1/inbound-emails/{inbound_email_id}Requires a Full access API key.
Path parameters
| Parameter | Type | Description |
|---|---|---|
inbound_email_id | string | The inbound email's id — from the list or an email.received webhook. |
Example
bash
curl "https://api.sendgrail.com/v1/inbound-emails/$INBOUND_EMAIL_ID" \
-H "Authorization: Bearer $SENDGRAIL_API_KEY"js
const res = await fetch(
`https://api.sendgrail.com/v1/inbound-emails/${inboundEmailId}`,
{ headers: { Authorization: `Bearer ${process.env.SENDGRAIL_API_KEY}` } },
);
const message = await res.json();Response
The inbound email object, including text, html and headers.
An id that isn't one of your received messages returns 404 not_found.