Skip to main content
POST
/
emails
TypeScript
import Nuntly from '@nuntly/sdk';

const client = new Nuntly({
  apiKey: 'My API Key',
});

const response = await client.emails.send({
  from: 'ray@info.tomlinson.ai',
  subject: 'Welcome to Tomlinson AI!',
  to: 'carlo43@gmail.com',
});

console.log(response.id);
{
  "data": {
    "id": "em_01jnvnn9avq52k5mrhn1gab0ch",
    "org_id": "org_01jh6jk82zjq9deye73h0mzcaq",
    "status": "queued",
    "kind": "email"
  }
}

Authorizations

Authorization
string
header
required

Bearer HTTP authentication. Allowed headers Authorization: Bearer <API_KEY>

Body

application/json
from
string
required

The e-mail address of the sender

to
required

The primary recipient(s) of the email

subject
string
required

The subject of the e-mail

cc

The carbon copy recipient(s) of the email

bcc

The blind carbon copy recipient(s) of the email

reply_to

The email address where replies should be sent. If a recipient replies, the response will go to this address instead of the sender's email address

text
string

The plaintext version of the email

html
string

The HTML version of the email

headers
object

The headers to add to the email

tags
object[]

The tags to add to the email

attachments
object[]

The attachements to add to the email

context
object

The context for the template

scheduled_at
string<date-time>

The date at which the email is scheduled to be sent

Response

A successful response

data
object
Example:
{
"id": "em_01jnvnn9avq52k5mrhn1gab0ch",
"org_id": "org_01jh6jk82zjq9deye73h0mzcaq",
"status": "queued",
"kind": "email"
}
I