import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: process.env['NUNTLY_API_KEY'], // This is the default and can be omitted
});
const message = await client.messages.retrieve('imsg_01kabn43yqyxn2bx4ve84mczd3');
console.log(message.id);{
"data": {
"id": "<string>",
"createdAt": "<string>",
"domainId": "<string>",
"domainName": "<string>",
"inboxId": "<string>",
"threadId": "<string>",
"inbox": {
"id": "<string>",
"address": "<string>",
"name": "<string>"
},
"fromAddress": "<string>",
"fromName": "<string>",
"toAddresses": [
{
"address": "jsmith@example.com",
"name": "<string>"
}
],
"ccAddresses": [
{
"address": "jsmith@example.com",
"name": "<string>"
}
],
"subject": "<string>",
"receivedAt": "<string>",
"direction": "received",
"status": "received",
"spfVerdict": "<string>",
"dkimVerdict": "<string>",
"spamVerdict": "<string>",
"virusVerdict": "<string>",
"attachmentCount": 123
}
}Retrieve a single message with inbox enrichment.
import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: process.env['NUNTLY_API_KEY'], // This is the default and can be omitted
});
const message = await client.messages.retrieve('imsg_01kabn43yqyxn2bx4ve84mczd3');
console.log(message.id);{
"data": {
"id": "<string>",
"createdAt": "<string>",
"domainId": "<string>",
"domainName": "<string>",
"inboxId": "<string>",
"threadId": "<string>",
"inbox": {
"id": "<string>",
"address": "<string>",
"name": "<string>"
},
"fromAddress": "<string>",
"fromName": "<string>",
"toAddresses": [
{
"address": "jsmith@example.com",
"name": "<string>"
}
],
"ccAddresses": [
{
"address": "jsmith@example.com",
"name": "<string>"
}
],
"subject": "<string>",
"receivedAt": "<string>",
"direction": "received",
"status": "received",
"spfVerdict": "<string>",
"dkimVerdict": "<string>",
"spamVerdict": "<string>",
"virusVerdict": "<string>",
"attachmentCount": 123
}
}