OverviewProductsPlatformsAPI ReferenceResources
Email

List mailbox folders

GEThttps://zernio.com/api/v1/email/folders

On Google, folders are Gmail labels (system labels carry wellKnown; unreadCount and totalCount are present only where Gmail reports them). There is no archive folder on Google; archived mail is listed with folder=archive.

Authentication

AuthorizationBearer tokenRequired

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

Query parameters

accountIdstringRequired

The connected Google, Microsoft or IMAP account.

Responses

Success· the request worked

Errors· the request failed

GET/v1/email/folders
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.email.listEmailFolders({  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "data": [    {      "id": "string",      "accountId": "string",      "provider": "google",      "name": "string",      "wellKnown": "inbox",      "unreadCount": 0,      "totalCount": 0    }  ]}
OpenAPI specification
Was this page helpful?