Skip to main content
POST
/
inboxes
/
{inboxId}
/
messages
JavaScript
import Nuntly from '@nuntly/sdk';

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

const response = await client.inboxes.send('ibx_01kabn43yqyxn2bx4ve84mczd3', {
  subject: 'x',
  to: [{ address: 'dev@stainless.com' }],
});

console.log(response.id);
{
  "data": {
    "id": "<string>",
    "threadId": "<string>",
    "fromAddress": "<string>",
    "subject": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

inboxId
string
required

The id of the inbox

Example:

"ibx_01kabn43yqyxn2bx4ve84mczd3"

Body

application/json

Email with recipients, subject, and content.

to
object[]
required

The recipient addresses.

Minimum array length: 1
subject
string
required

The message subject.

Minimum string length: 1
cc
object[]

The CC addresses.

bcc
object[]

The BCC addresses.

text
string

The plain text body.

html
string

The HTML body.

Response

Successful response.

data
object
required