import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: 'My API Key',
});
const stats = await client.emails.stats.list();
console.log(stats.end);
{
"data": {
"start": "2025-01-20",
"end": "2025-01-23",
"stats": [
{
"occurred_on": "2025-01-20",
"delivered": 9625,
"sent": 9625,
"opened": 5403
},
{
"occurred_on": "2025-01-21",
"delivered": 8404,
"sent": 8404,
"opened": 3503
},
{
"occurred_on": "2025-01-22",
"delivered": 9254,
"sent": 9254,
"opened": 4253
},
{
"occurred_on": "2025-01-23",
"delivered": 9783,
"sent": 9783,
"opened": 5919,
"clicked": 4211
}
]
}
}
Return the emails stats
import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: 'My API Key',
});
const stats = await client.emails.stats.list();
console.log(stats.end);
{
"data": {
"start": "2025-01-20",
"end": "2025-01-23",
"stats": [
{
"occurred_on": "2025-01-20",
"delivered": 9625,
"sent": 9625,
"opened": 5403
},
{
"occurred_on": "2025-01-21",
"delivered": 8404,
"sent": 8404,
"opened": 3503
},
{
"occurred_on": "2025-01-22",
"delivered": 9254,
"sent": 9254,
"opened": 4253
},
{
"occurred_on": "2025-01-23",
"delivered": 9783,
"sent": 9783,
"opened": 5919,
"clicked": 4211
}
]
}
}
Bearer HTTP authentication. Allowed headers Authorization: Bearer <API_KEY>
A successful response
The response is of type object
.