import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: 'My API Key',
});
const email = await client.emails.retrieve('em_qiPSkLrTmXvDohbxCcYt3pFEMGgnjHD6kbDL8d4uGKvNGboT');
console.log(email.id);
{
"data": {
"id": "em_01jnvnn9avq52k5mrhn1gab0ch",
"org_id": "org_01jh6jk82zjq9deye73h0mzcaq",
"from": "ray@info.tomlinson.ai",
"to": "carlo43@gmail.com",
"subject": "Welcome to Tomlinson AI!",
"status": "queued",
"status_at": "2025-03-08T20:03:04.155Z",
"created_at": "2025-03-08T20:03:04.155Z",
"modified_at": "2025-03-08T20:03:04.155Z",
"kind": "email",
"region": "eu-west-1"
}
}
Return the email with the given id
import Nuntly from '@nuntly/sdk';
const client = new Nuntly({
apiKey: 'My API Key',
});
const email = await client.emails.retrieve('em_qiPSkLrTmXvDohbxCcYt3pFEMGgnjHD6kbDL8d4uGKvNGboT');
console.log(email.id);
{
"data": {
"id": "em_01jnvnn9avq52k5mrhn1gab0ch",
"org_id": "org_01jh6jk82zjq9deye73h0mzcaq",
"from": "ray@info.tomlinson.ai",
"to": "carlo43@gmail.com",
"subject": "Welcome to Tomlinson AI!",
"status": "queued",
"status_at": "2025-03-08T20:03:04.155Z",
"created_at": "2025-03-08T20:03:04.155Z",
"modified_at": "2025-03-08T20:03:04.155Z",
"kind": "email",
"region": "eu-west-1"
}
}
Bearer HTTP authentication. Allowed headers Authorization: Bearer <API_KEY>
The email id
A successful response
The response is of type object
.