search_threads
Find or list chat threads/conversations — by topic, participant, unread/unanswered status, or recency. Omit query to list threads by filter. For message content use search.messages; for files use search.files. since filters by recency and pairs with only_unread / only_unanswered. Each thread names the LINE it speaks from (account: id, channel, name, phone) and whether the owner ever really wrote there (has_real_outgoing; imported history does not count). The same person can appear once per connected number — pick the thread by account, not by title, before you messages.send.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum threads to return. | |
| query | No | Topic/keyword to search threads for. OMIT to list threads by filter. | |
| since | No | ISO date (YYYY-MM-DD). Only threads with any message activity since this date (recency filter, not 'unanswered'). OMIT to skip. | |
| offset | No | Number of threads to skip (for pagination, default: 0) | |
| only_unread | No | Limit to threads with unread messages. OMIT to include read threads. | |
| in_workspace | No | Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected. | |
| only_unanswered | No | Limit to threads where the last message is incoming (you haven't replied). Covers 'threads I haven't replied to'. OMIT to include answered threads too. | |
| participant_name | No | Filter to threads with this participant/contact. OMIT to include everyone (do NOT pass an empty string). | |
| include_last_messages | No | With only_unanswered: inline the most recent N messages (0-2) per thread so one call is enough to draft replies. Text truncated to 150 chars; full body via messages.read_history. |