List threads
const url = 'https://api.inboxcnx.com/v1/threads?participant=alice%40example.com&hasAttachment=true&source=gmail&providerThreadId=18c9a2f1b3d4e5f6&after=2026-08-01T00%3A00%3A00Z&before=2026-09-01T00%3A00%3A00Z&label=inbox¬Label=trash&order=asc&include=total';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.inboxcnx.com/v1/threads?participant=alice%40example.com&hasAttachment=true&source=gmail&providerThreadId=18c9a2f1b3d4e5f6&after=2026-08-01T00%3A00%3A00Z&before=2026-09-01T00%3A00%3A00Z&label=inbox¬Label=trash&order=asc&include=total' \ --header 'Authorization: Bearer <token>'Lists the conversations in your grants’ stored mail, most recently active first, to show an inbox by thread. Returns threads matching every given query parameter (all parameters are combined with AND). Omit every parameter to list all threads the caller can see.
Sorted by most recently active thread first (order=desc, the default) or last (order=asc). Results are paginated: pass the previous response’s nextCursor or prevCursor back as cursor to fetch the next or previous page; null means there is none. include=total adds the number of matches. See the pagination guide.
To combine filters with OR or NOT, or to nest conditions, use POST /v1/threads/query instead: it accepts the same fields inside a filter tree.
Requires the read:messages scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only threads with this exact address among their participants (senders and recipients).
Example
alice@example.comOnly threads with this exact address among their participants (senders and recipients).
Only threads from this mail provider.
Example
gmailOnly threads from this mail provider.
Only the thread matching this source provider’s own thread id (Gmail/M365/IMAP thread id).
Example
18c9a2f1b3d4e5f6Only the thread matching this source provider’s own thread id (Gmail/M365/IMAP thread id).
Only threads whose most recent message was received at or after this instant (inclusive).
Example
2026-08-01T00:00:00ZOnly threads whose most recent message was received at or after this instant (inclusive).
Only threads whose most recent message was received strictly before this instant.
Example
2026-09-01T00:00:00ZOnly threads whose most recent message was received strictly before this instant.
Only threads ingested through this connection grant.
Only threads ingested through this connection grant.
Only threads in which at least one message carries this label (a system role or a custom label).
Example
inboxOnly threads in which at least one message carries this label (a system role or a custom label).
Only threads in which at least one message does NOT carry this label. notLabel=trash leaves out threads whose every message is in the trash.
Example
trashOnly threads in which at least one message does NOT carry this label. notLabel=trash leaves out threads whose every message is in the trash.
Sort direction by most recent message. Default: desc (most recently active thread first).
Sort direction by most recent message. Default: desc (most recently active thread first).
Opaque pagination cursor: a previous response’s nextCursor or prevCursor, passed back verbatim. A cursor issued under one sort order is rejected if reused with another.
Opaque pagination cursor: a previous response’s nextCursor or prevCursor, passed back verbatim. A cursor issued under one sort order is rejected if reused with another.
Page size, between 1 and 200. Default 50.
Page size, between 1 and 200. Default 50.
total adds the number of matching results, counted up to 10000.
total adds the number of matching results, counted up to 10000.
Responses
Section titled “Responses”A page of threads, newest conversation first
object
object
object
object
object
object
object
Pass back as cursor for the next page. Null on the last page.
Pass back as cursor for the previous page. Null on the first page.
Present only when requested with include. exact is false once the count reaches 10000 (or the depth cap of a relevance search); count is then that cap.
object
Example
{ "data": [ { "id": "2d8f6a1c-7b3e-4c9d-a5f0-1e2b3c4d5e6f", "providerThreadId": "18f2b1c0a9e8d7f6", "source": "gmail", "subject": "Invoice 2026-1042", "participants": [ { "name": "Acme Accounts", "email": "accounts@example.com" }, { "name": null, "email": "owner@example.com" } ], "messageCount": 3, "hasAttachment": true, "firstMessageAt": "2026-10-21T14:02:00.000Z", "lastMessageAt": "2026-10-23T07:58:12.000Z", "lastInboundAt": "2026-10-23T07:58:12.000Z", "lastOutboundAt": "2026-10-22T09:15:40.000Z", "labels": { "system": [ "inbox", "sent" ], "custom": [] }, "keywords": { "any": { "$seen": true, "$flagged": true }, "all": { "$seen": false } } } ], "nextCursor": "eyJ2IjoiMjAyNi0xMC0yM1QwNzo1ODoxMi4wMDBaIn0", "prevCursor": null}Invalid query or malformed cursor
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The credential lacks the read:messages scope
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}The query exceeded the read timeout
object
object
Example generated
{ "error": { "code": "example", "message": "example" }}