Email

List email threads

Changed on

Threads of a connected Google or Microsoft mailbox, newest first. Every filter that the provider cannot apply server-side is applied to the fetched page instead and named in meta.filteredClientSide, so a filtered page can hold fewer than limit items while pagination.hasMore stays true.

On Google, folders are Gmail labels: folder takes a well-known name or a label id, archive means mail carrying none of the inbox, trash or spam labels, and sortOrder=asc reverses the fetched page (Gmail lists newest first only).

The account must have been connected with scopes=email (412 account_scope_missing otherwise).

get/v1/email/threads

Request

  • Base URL
    https://zernio.com/api
  • URL
    https://zernio.com/api/v1/email/threads
  • Auth
    HTTP bearer

Query parameters

accountIdstring required

The connected Google or Microsoft account.

folderstring

Well-known folder (inbox, sent, drafts, trash, spam, archive) or a provider folder id from GET /v1/email/folders. Default inbox.

unreadboolean
starredboolean
hasAttachmentboolean
subjectstring

Substring match on the subject.

fromstring

Sender address.

tostring

A recipient address.

ccstring
bccstring

Applied client-side on Microsoft.

anyEmailstring

Matches from, to, cc or bcc. Applied client-side on Microsoft.

afterstring date-time
beforestring date-time
searchQueryNativestring

The provider's own search syntax (Gmail search operators, Microsoft KQL). On Microsoft it cannot be combined with other filters or server-side ordering; those are applied to the page.

sortOrder'asc' | 'desc'
cursorstring
limitinteger

Response

Threads

Changes