import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: process.env['NUNTLY_API_KEY'], // This is the default and can be omitted
});
const messageDetail = await client.messages.retrieve('imsg_01kabn43yqyxn2bx4ve84mczd3');
console.log(messageDetail.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,
"headers": {}
}
}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 messageDetail = await client.messages.retrieve('imsg_01kabn43yqyxn2bx4ve84mczd3');
console.log(messageDetail.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,
"headers": {}
}
}