Skip to main content
The response always includes every header. Emails of a removed account return 404, and so does an id that isn’t an email_… id, or an email of another account.

The email object

string
Email. Drafts have Draft (see Drafts).
string
The engine’s email_… id. Stays the same when the email moves between folders.
string
The account it belongs to (acc_…).
string
The conversation it belongs to. See Replies and threads.
date-time
When it was sent (the Date header), or received when that’s missing.
string
string
HTML. For text-only emails, the text wrapped in HTML.
string
The plain-text version.
attendee
{ display_name, identifier, identifier_type }. identifier_type is always EMAIL_ADDRESS.
attendee[]
Recipients. bcc_attendees is only known for emails this account sent.
string[]
The fld_… ids of the folder it’s in. A folder’s role (INBOX, SENT …) is on the folder: to know if an email is in the inbox, compare folders with the folder ids. Over IMAP, Gmail shows each label as a folder, so an email with several labels is synced once per label (see Gmail).
boolean
boolean
Always true: large emails are stored whole too.
boolean
object[]
Each { id, name, extension, size, mime, cid, inline }. inline images are referenced from the HTML by cid. Download with the attachment endpoint.
object[]
Every header as { name, value }. Read Message-ID, In-Reply-To and References here. See Replies and threads.
string
api when the email was sent through this API (including drafts sent through the API), otherwise external.
boolean
true when the mailbox’s owner sent the email from their own email app (Gmail, Outlook…): it’s in Sent and wasn’t sent through this API. Emails you send through the API, and received emails, are false. Use it to record replies your users write outside your app.
object | null
For an email sent through this API: { api_key_id, api_key_name, metadata }, the key it was sent with and the metadata given when sending (or null). For other emails, null. Together with is_echo, it tells who sent an email in Sent: your app (your key and metadata), another app (another key), or the user in their own email app (is_echo: true).
string | null
The trk_… id when open and click tracking is on for this email, otherwise null.

Example

Emails are a synced copy. When the user changes something in Gmail or their email app directly, the engine updates the email and sends a webhook (email.update, or email.delete when it’s deleted for good).