Threads

List threads

Requires scope: read.

get/v1/threads

Request

  • Base URL: https://api.mails.ai
  • URL: https://api.mails.ai/v1/threads
  • Auth: HTTP bearer

Query parameters

limitinteger

Page size (1–100).

cursorstring

Opaque cursor from a previous page's next_cursor.

agent_idstring

Filter by agent id or name. A key tied to one agent always reads that agent's mail, and naming another agent is a 403.

statusstring

Filter by thread status (open|closed|archived).

folder'inbox' | 'archive' | 'spam' | 'trash' | 'sent' | 'all'

Which folder's threads to return, or all for every folder. Without it: every folder except trash.

readboolean

false for unread threads only, true for read ones.

labelstring

Only threads carrying this label (a name, or a label id lbl_…).

mode'live' | 'test' | 'all'

live for threads that hold live mail, test for threads of test mail only (test_mode: true), all for both. Without it, a key lists the threads of its own mode, as the unread counts of GET /v1/agents/{id}/inbox count them: a live key does not see the test mail POST /v1/test/inbound delivers.

qstring

Case-insensitive substring of the subject or participant addresses. For word search across all mail, use GET /v1/search.

Response

A page of threads (most-recent activity first).

has_moreboolean required

True when more items follow this page: pass next_cursor as cursor to get them.

next_cursorstring

Pass as cursor to fetch the next page. Absent on the last page.

Changes

No recorded changes to this operation across all 1 revision of this API.