Skip to main content
GET
/
emails
/
{emailId}
JavaScript
import AIInbx from 'aiinbx';

const client = new AIInbx({
  apiKey: 'My API Key',
});

const email = await client.emails.retrieve('emailId');

console.log(email.id);
{
  "id": "<string>",
  "createdAt": "<string>",
  "messageId": "<string>",
  "inReplyToId": "<string>",
  "references": [
    "<string>"
  ],
  "subject": "<string>",
  "text": "<string>",
  "html": "<string>",
  "strippedText": "<string>",
  "strippedHtml": "<string>",
  "snippet": "<string>",
  "fromName": "<string>",
  "fromAddress": "<string>",
  "toAddresses": [
    "<string>"
  ],
  "ccAddresses": [
    "<string>"
  ],
  "bccAddresses": [
    "<string>"
  ],
  "replyToAddresses": [
    "<string>"
  ],
  "sentAt": "<string>",
  "receivedAt": "<string>",
  "direction": "INBOUND",
  "status": "DRAFT",
  "threadId": "<string>",
  "attachments": [
    {
      "id": "<string>",
      "createdAt": "<string>",
      "fileName": "<string>",
      "contentType": "<string>",
      "sizeInBytes": 123,
      "cid": "<string>",
      "disposition": "<string>",
      "signedUrl": "<string>",
      "expiresAt": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API Key authentication using Bearer token

Path Parameters

emailId
string
required

The unique identifier of the email

Response

Successful response

id
string
required
createdAt
string
required
messageId
string
required
inReplyToId
string | null
required
references
string[]
required
subject
string | null
required
text
string | null
required
html
string | null
required
strippedText
string | null
required
strippedHtml
string | null
required
snippet
string | null
required
fromName
string | null
required
fromAddress
string
required
toAddresses
string[]
required
ccAddresses
string[]
required
bccAddresses
string[]
required
replyToAddresses
string[]
required
sentAt
string | null
required
receivedAt
string | null
required
direction
enum<string>
required
Available options:
INBOUND,
OUTBOUND
status
enum<string>
required
Available options:
DRAFT,
QUEUED,
ACCEPTED,
SENT,
RECEIVED,
FAILED,
BOUNCED,
COMPLAINED,
REJECTED,
READ,
ARCHIVED
threadId
string
required
attachments
object[]
required