> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vsyble.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search threads

Page through Vsyble Inbox, Sent or Needs reply. Optionally filter by mailbox, subject, sender or recipient. A page can be empty and still have a continuation. Use returned thread and latest message IDs for exact reads.

**Tool:** `inbox_read` · **Method:** `search_threads`

Hosted OAuth MCP, local MCP, and REST API.

Keep the returned nextCursor with the same folder, account and query. Continue when nextCursor is present even if threads is empty. Thread references identify the exact mailbox and conversation; do not construct them from an email address.

## Example

All IDs, addresses and revisions below are illustrative. Replace them with values read from your workspace.

> [tab] MCP
>
> ```json theme={null}
> {
>   "name": "inbox_read",
>   "arguments": {
>     "method": "search_threads",
>     "folder": "needs_reply",
>     "query": "expansion"
>   }
> }
> ```

> [tab] REST
>
> ```bash theme={null}
> curl https://api.vsyble.com/v1/outreach \
>   --request POST \
>   --header "Content-Type: application/json" \
>   --header "X-Vsyble-Api-Key: $VSYBLE_API_KEY" \
>   --data '{
>   "action": "searchThreads",
>   "folder": "needs_reply",
>   "query": "expansion"
> }'
> ```

## Inputs

| Field | Type | Requirement | Details |
| - | - | - | - |
| `organizationId` | string | Optional | Workspace ID. Omit to use your current workspace. Format: uuid. |
| `folder` | inbox / sent / needs\_reply | Optional | |
| `accountId` | string | Optional | Minimum length: 1. Maximum length: 500. |
| `query` | string | Optional | Maximum length: 200. |
| `cursor` | string | Optional | Maximum length: 22000. |

For MCP, add `method: search_threads` alongside these fields. For REST, use `action: searchThreads` instead of method.

Fields inside an optional object are required only when that object is provided. Do not send fields from a different method.

## Result

MCP returns the following projected schema as structured content and JSON text. The REST response may contain additional fields; do not rely on undocumented fields.

> [accordion] Response schema
>
> ```json theme={null}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "type": "object",
>   "properties": {
>     "threads": {
>       "type": "array",
>       "items": {
>         "type": "object",
>         "properties": {
>           "thread": {
>             "type": "object",
>             "properties": {
>               "account_id": {
>                 "type": "string",
>                 "minLength": 1,
>                 "maxLength": 500
>               },
>               "thread_id": {
>                 "type": "string",
>                 "minLength": 1,
>                 "maxLength": 500
>               },
>               "provider": {
>                 "type": "string",
>                 "enum": [
>                   "gmail",
>                   "outlook",
>                   "instantly"
>                 ]
>               }
>             },
>             "required": [
>               "account_id",
>               "thread_id",
>               "provider"
>             ],
>             "additionalProperties": false
>           },
>           "subject": {
>             "type": "string"
>           },
>           "lastActivityAt": {
>             "type": "string"
>           },
>           "needsReply": {
>             "type": [
>               "boolean",
>               "null"
>             ]
>           },
>           "done": {
>             "type": "boolean"
>           },
>           "replyStatus": {
>             "type": [
>               "string",
>               "null"
>             ]
>           },
>           "latestMessage": {
>             "anyOf": [
>               {
>                 "type": "object",
>                 "properties": {
>                   "id": {
>                     "type": "string"
>                   },
>                   "date": {
>                     "type": "string"
>                   },
>                   "direction": {
>                     "type": "string",
>                     "enum": [
>                       "incoming",
>                       "outgoing",
>                       "unknown"
>                     ]
>                   },
>                   "subject": {
>                     "type": "string"
>                   },
>                   "from": {
>                     "type": "object",
>                     "properties": {
>                       "name": {
>                         "type": "string"
>                       },
>                       "email": {
>                         "type": "string"
>                       }
>                     },
>                     "required": [
>                       "name",
>                       "email"
>                     ],
>                     "additionalProperties": false
>                   },
>                   "to": {
>                     "type": "array",
>                     "items": {
>                       "type": "object",
>                       "properties": {
>                         "name": {
>                           "type": "string"
>                         },
>                         "email": {
>                           "type": "string"
>                         }
>                       },
>                       "required": [
>                         "name",
>                         "email"
>                       ],
>                       "additionalProperties": false
>                     }
>                   },
>                   "labels": {
>                     "type": "array",
>                     "items": {
>                       "type": "string"
>                     }
>                   }
>                 },
>                 "required": [
>                   "id",
>                   "date",
>                   "direction",
>                   "subject",
>                   "from",
>                   "to"
>                 ],
>                 "additionalProperties": false
>               },
>               {
>                 "type": "null"
>               }
>             ]
>           }
>         },
>         "required": [
>           "thread",
>           "subject",
>           "lastActivityAt",
>           "needsReply",
>           "done",
>           "replyStatus",
>           "latestMessage"
>         ],
>         "additionalProperties": false
>       }
>     },
>     "nextCursor": {
>       "type": [
>         "string",
>         "null"
>       ]
>     },
>     "syncing": {
>       "type": "boolean"
>     },
>     "incomplete": {
>       "type": "boolean"
>     }
>   },
>   "required": [
>     "threads",
>     "nextCursor",
>     "syncing",
>     "incomplete"
>   ],
>   "additionalProperties": false
> }
> ```

[Download input schema](https://docs.vsyble.com/schemas/search_threads.input.json) · [Download MCP response schema](https://docs.vsyble.com/schemas/search_threads.output.json)

See [permissions](https://docs.vsyble.com/security/permissions.md), [errors and recovery](https://docs.vsyble.com/api/errors.md), and [sending approval](https://docs.vsyble.com/security/sending.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.