Skip to main content
POST
/
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 response = await client.emails.send({ from: 'from', subject: 'subject', to: 'string' });

console.log(response.id);
{
  "id": "<string>",
  "message_id": "<string>",
  "scheduled_at": "<string>",
  "status": "sent",
  "timezone": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

from
string
required

Sender email address

to
required

Recipient email address(es)

subject
string
required

Email subject

html
string

HTML content of the email

text
string

Plain text content of the email

cc
bcc
reply_to
headers
object

Custom email headers

attachments
object[]
tags
object[]
scheduled_at
string

ISO 8601 date or natural language for scheduling

timezone
string

Timezone for natural language parsing

Response

Response for status 200

id
string
required
message_id
string
scheduled_at
string
status
enum<string>
Available options:
sent,
scheduled
timezone
string