Skip to main content
GET
/
api
/
e2
/
emails
/
{id}
JavaScript
import Inbound from 'inboundemail';

const client = new Inbound({
  apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});

const email = await client.emails.retrieve('id');

console.log(email.id);
{
  "object": "<string>",
  "id": "<string>",
  "type": "sent",
  "from": "<string>",
  "to": [
    "<string>"
  ],
  "subject": "<string>",
  "status": "<string>",
  "created_at": "<string>",
  "has_attachments": true,
  "cc": [
    "<string>"
  ],
  "bcc": [
    "<string>"
  ],
  "reply_to": [
    "<string>"
  ],
  "html": "<string>",
  "text": "<string>",
  "sent_at": "<string>",
  "scheduled_at": "<string>",
  "attachments": [
    "<unknown>"
  ],
  "is_read": true,
  "thread_id": "<string>",
  "thread_position": 123,
  "headers": "<unknown>",
  "tags": [
    "<unknown>"
  ]
}

Authorizations

Authorization
string
header
required

Your Inbound API key. Include it in the Authorization header as: Bearer

Path Parameters

id
string
required

Response

Response for status 200

object
string
required
Allowed value: "email"
id
string
required
type
enum<string>
required
Available options:
sent,
received,
scheduled
from
string
required
to
string[]
required
subject
string
required
status
string
required
created_at
string
required
has_attachments
boolean
required
cc
string[] · null · null
bcc
string[] · null · null
reply_to
string[] · null · null
html
string · null · null
text
string · null · null
sent_at
string · null · null
scheduled_at
string · null · null
attachments
any[]
is_read
boolean
thread_id
string · null · null
thread_position
number · null · null
headers
any
tags
any[]