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

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

const emails = await client.emails.list();

console.log(emails.data);
{
  "data": [
    {
      "id": "<string>",
      "type": "sent",
      "from": "<string>",
      "to": [
        "<string>"
      ],
      "subject": "<string>",
      "status": "<string>",
      "created_at": "<string>",
      "has_attachments": true,
      "message_id": "<string>",
      "from_name": "<string>",
      "cc": [
        "<string>"
      ],
      "preview": "<string>",
      "sent_at": "<string>",
      "scheduled_at": "<string>",
      "attachment_count": 123,
      "is_read": true,
      "read_at": "<string>",
      "is_archived": true,
      "thread_id": "<string>"
    }
  ],
  "pagination": {
    "limit": 123,
    "offset": 123,
    "total": 123,
    "has_more": true
  },
  "filters": {
    "type": "<string>",
    "status": "<string>",
    "time_range": "<string>",
    "search": "<string>",
    "domain": "<string>",
    "address": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

type
enum<string>
Available options:
all,
sent,
received,
scheduled
status
enum<string>
Available options:
all,
delivered,
pending,
failed,
bounced,
scheduled,
cancelled,
unread,
read,
archived
time_range
enum<string>
Available options:
1h,
24h,
7d,
30d,
90d,
all

Search query to filter emails by subject, sender, or recipient. Case-insensitive partial match.

domain
string

Filter by domain. Accepts domain ID (e.g., 'dom_xxx') or domain name (e.g., 'example.com').

address
string

Filter by email address. Accepts address ID (e.g., 'addr_xxx') or raw email address (e.g., 'user@example.com').

limit
string
default:50

Maximum number of emails to return (1-100). Default is 50.

offset
string
default:0

Number of emails to skip for pagination. Default is 0.

Response

Response for status 200

data
object[]
required

Array of email objects matching the query

pagination
object
required

Pagination metadata

filters
object
required

Applied filters for this query