Skip to main content
GET
/
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
});

// Automatically fetches more pages as needed.
for await (const message of client.messages.list()) {
  console.log(message.id);
}
{
  "data": [
    {
      "id": "<string>",
      "createdAt": "<string>",
      "inboxId": "<string>",
      "threadId": "<string>",
      "messageId": "<string>",
      "from": "<string>",
      "to": [
        "<string>"
      ],
      "cc": [
        "<string>"
      ],
      "bcc": [
        "<string>"
      ],
      "replyTo": [
        "<string>"
      ],
      "subject": "<string>",
      "receivedAt": "<string>",
      "status": "received",
      "labels": [
        "<string>"
      ],
      "attachmentCount": 123
    }
  ],
  "nextCursor": "<string>"
}

Authorizations

Authorization
string
header
required

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

Query Parameters

cursor
string

The cursor to retrieve the next page of results

limit
number
default:30

The maximum number of results to return

Required range: 1 <= x <= 30
domainId
string

Filter by domain.

from
string

Filter by sender address.

Response

Successful response.

data
object[]
required
nextCursor
string