OverviewProductsPlatformsAPI ReferenceResources
Email

Get an email message

GEThttps://zernio.com/api/v1/email/messages/{messageId}

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

messageIdstringRequired

Query parameters

accountIdstringRequired

The connected Google, Microsoft or IMAP account.

includeHeadersbooleanDefault false

Include the raw internet headers under headers.

rawbooleanDefault false

Include the MIME source under raw.

cleanbooleanDefault false

Add a clean object: the new text without quoted replies, footers or tracking pixels, the signature on its own (it also stays in text), and a parsed forwarded header. Ready to hand to an LLM.

Responses

Success· the request worked

Errors· the request failed

GET/v1/email/messages/{messageId}
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.email.getEmailMessage({  path: {    messageId: 'message_abc123',  },  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "data": {    "id": "string",    "threadId": "string",    "accountId": "string",    "provider": "google",    "folders": [      "string"    ],    "from": {      "email": "user@example.com",      "name": "string"    },    "sender": {      "email": "user@example.com",      "name": "string"    },    "to": [      {        "email": "user@example.com",        "name": "string"      }    ],    "cc": [      {        "email": "user@example.com",        "name": "string"      }    ],    "bcc": [      {        "email": "user@example.com",        "name": "string"      }    ],    "replyTo": [      {        "email": "user@example.com",        "name": "string"      }    ],    "subject": "string",    "snippet": "string",    "text": "string",    "html": "string",    "attachments": [      {        "id": "string",        "filename": "string",        "contentType": "string",        "size": 0,        "isInline": true,        "contentId": "string"      }    ],    "headers": {      "property1": "string",      "property2": "string"    },    "raw": "string",    "date": "2019-08-24T14:15:22Z",    "unread": true,    "starred": true,    "labels": [      "string"    ],    "metadata": {      "property1": "string",      "property2": "string"    },    "trackingId": "string",    "clean": {      "text": "string",      "status": "stripped",      "removed": {        "quoted": true,        "forwardHeader": true,        "boilerplate": true      },      "signature": "string",      "forwarded": {        "from": "string",        "to": "string",        "date": "string",        "subject": "string"      }    },    "draftId": "string",    "forwardedFrom": "string"  }}
OpenAPI specification
Was this page helpful?