GET
/
api
/
v2
/
emails
/
{id}
import { Inbound } from '@inboundemail/sdk'

const inbound = new Inbound(process.env.INBOUND_API_KEY!)

const { data: email, error } = await inbound.email.get('em_1234567890abcdef')

if (error) {
  console.error('Failed to retrieve email:', error)
} else {
  console.log('Email retrieved:', email)
}
{
  "object": "email",
  "id": "em_1234567890abcdef",
  "to": ["recipient@example.com"],
  "from": "Acme <noreply@yourdomain.com>",
  "created_at": "2024-01-15T10:30:00.000Z",
  "subject": "Welcome to Acme!",
  "html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
  "text": "Welcome! Thanks for signing up.",
  "cc": [null],
  "bcc": [null],
  "reply_to": [null],
  "last_event": "delivered"
}
This endpoint retrieves details about a previously sent email using the Inbound Email API.

Authentication

This endpoint requires authentication via Bearer token in Authorization header.

Path Parameters

id
string
required
The Email ID returned when the email was sent.

Headers

Authorization
string
required
Bearer token for API authentication.

Request Example

import { Inbound } from '@inboundemail/sdk'

const inbound = new Inbound(process.env.INBOUND_API_KEY!)

const { data: email, error } = await inbound.email.get('em_1234567890abcdef')

if (error) {
  console.error('Failed to retrieve email:', error)
} else {
  console.log('Email retrieved:', email)
}

Response

{
  "object": "email",
  "id": "em_1234567890abcdef",
  "to": ["recipient@example.com"],
  "from": "Acme <noreply@yourdomain.com>",
  "created_at": "2024-01-15T10:30:00.000Z",
  "subject": "Welcome to Acme!",
  "html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
  "text": "Welcome! Thanks for signing up.",
  "cc": [null],
  "bcc": [null],
  "reply_to": [null],
  "last_event": "delivered"
}

Response Fields

object
string
required
Always returns "email" for this endpoint.
id
string
required
The unique identifier for the email.
to
array
required
Array of recipient email addresses.
from
string
required
The sender email address, including display name if provided.
created_at
string
required
ISO 8601 timestamp of when the email was created.
subject
string
required
The email subject line.
html
string | null
The HTML content of the email, if provided.
text
string | null
The plain text content of the email, if provided.
cc
array
Array of CC recipient email addresses, or [null] if none.
bcc
array
Array of BCC recipient email addresses, or [null] if none.
reply_to
array
Array of reply-to email addresses, or [null] if none.
last_event
string
required
The last known status of the email. Possible values:
  • pending - Email is queued for sending
  • delivered - Email was successfully sent
  • failed - Email sending failed
  • created - Email was created but status is unknown
Email Status Mapping: The last_event field maps to the internal email status:
  • pending status → pending event
  • sent status → delivered event
  • failed status → failed event
  • Any other status → created event (default)

Important Notes

Access Control: You can only retrieve emails that were sent from your account. Attempting to access emails from other accounts will result in a 404 error.
Data Retention: Email data is retained according to your account’s data retention policy. Older emails may be archived or deleted based on your subscription plan.

1.0 - ✅