Skip to main content

search

search.files​

Search Files

Effects: read

Search files and attachments across the workspace — by content, filename, document type, or origin. For message content use search.messages; for links use search.links.

Arguments​

ArgumentTypeRequiredDescription
attachment_namestringnoExact filename filter. OMIT to skip (do NOT pass an empty string).
document_typestringnoFilter by document category. OMIT unless the user explicitly mentions one — picking a value narrows the search and is a common cause of zero-result mistakes. (one of invoice, contract, presentation, report, proposal, resume, letter, manual, spreadsheet)
file_originstringnoFile origin: 'generated' (created by tools), 'received' (from messages), 'uploaded' (manual). Use 'generated' for files the user created/sent. OMIT to include all origins. (one of generated, received, uploaded)
image_hub_marginnumbernoHow far (0 to 1) an image match must stand above that image's own similarity to unrelated queries; this hides images that look close to every query. OMIT it: the default is tuned. Change it only when the results show a problem, and then lower it a little (e.g. 0.04) rather than 0, which turns the check off. A value outside 0..1 is refused, never clamped.
image_min_scorenumbernoMinimum similarity (0 to 1) for photo/screenshot matches. Affects image files only. OMIT to follow this call's min_score (0.25 unless set), the general similarity floor, which also applies to text matches. Image scores run lower than text scores: typically clear matches are about 0.40-0.50 and noise is usually below roughly 0.32. Raise it (e.g. 0.35) when photo hits are noisy; lower it (e.g. 0.20) to find weak matches such as scanned documents. A value outside 0..1 is refused, never clamped.
limitintegernoMaximum files to return. (default 10; min 1.0; max 50.0)
querystringnoWhat to search for (content or filename).

Search Links

Effects: read

Search links/URLs shared across the workspace — by type, owner, or associated contact. For files use search.files; for message content use search.messages.

Arguments​

ArgumentTypeRequiredDescription
contact_hintstringnoName hint to filter links for a specific contact. OMIT to skip.
limitintegernoMaximum links to return. (default 10; min 1.0; max 50.0)
link_kindstringnoFilter links by type. OMIT to include all kinds — picking a value narrows the search and is a common cause of zero-result mistakes. (one of email, calendly, twitter, telegram, linkedin, github, google_doc, google_sheet, google_slides, google_drive, google_meet, instagram, facebook, youtube, tiktok, whatsapp, vk, reddit, medium, discord, notion, figma, telegraph, luma, etherscan, website)
ownerstringnoLink owner: 'self' (user's own) or 'contact' (from others). OMIT to include links regardless of owner. (one of self, contact, unknown)
querystringnoWhat to search for in shared links.

search.messages​

Search Messages

Effects: read

Search message content across all chats — semantic + keyword. Use to find what was said: quotes, topics, info exchanged. Also finds captionless photos/screenshots by what they show or the words read from them: such a hit carries match_reason ('image' or 'attachment_text') and file_id — open that attachment. Pass direction, chat_kind or per_chat for an EXACT text search instead: who wrote it (outgoing = the owner), private chats or groups, one result per chat with the number of matches. That is the way to find the chat of a person by how the owner addresses them, e.g. query='Дима', direction='outgoing', chat_kind='dm', per_chat=true. For chats/threads themselves use search.threads; for files use search.files; for links use search.links.

Arguments​

ArgumentTypeRequiredDescription
channelstringno'ai_panel' = search the workspace's AI-panel ("My AI") chats (owner/admin: all; a member: their own) by text; needs query. OMIT for the normal inbox.
chat_kindstringnoExact search only: 'dm' = private chats, 'group' = groups and channels. OMIT for both. (one of dm, group)
date_fromstringnoISO8601 date (YYYY-MM-DD) lower bound. OMIT to skip.
date_tostringnoISO8601 date (YYYY-MM-DD) upper bound. OMIT to skip.
directionstringnoExact search only: 'outgoing' = messages the owner wrote, 'incoming' = messages others wrote. OMIT for both. (one of outgoing, incoming)
image_hub_marginnumbernoHow far (0 to 1) an image match must stand above that image's own similarity to unrelated queries; this hides images that look close to every query. OMIT it: the default is tuned. Change it only when the results show a problem, and then lower it a little (e.g. 0.04) rather than 0, which turns the check off. A value outside 0..1 is refused, never clamped.
image_limitintegernoMaximum number of photo/screenshot rows in the results (0 to 50; 0 = no image rows). OMIT for the default: about a quarter of limit, at least 2, and more only when text hits leave slots unused. When given, it is a hard maximum. A value outside 0..50 is refused, never clamped.
image_min_scorenumbernoMinimum similarity (0 to 1) for photo/screenshot matches. Affects image hits only; text hits are unaffected. OMIT for the default (0.29 unless the deployment configures another). Image scores run lower than text scores: typically clear matches are about 0.40-0.50 and noise is usually below roughly 0.32. Raise it (e.g. 0.35) when photo hits are noisy; lower it (e.g. 0.25) to find weak matches such as scanned documents. A value outside 0..1 is refused, never clamped.
image_strong_scorenumbernoSimilarity bar (0 to 1) that decides WHERE photo/screenshot matches go. At or above it a photo is interleaved near the top of the results (after the first text hit); below it (but above image_min_score) it is listed after all text results. Affects image hits only. OMIT for the default (0.40 unless the deployment configures another): typically clear matches score about 0.40-0.50. If it is below image_min_score, image_min_score is used as the bar. Raise it (e.g. 0.45) to keep photos out of the top unless they are clearly relevant; lower it (e.g. 0.33) when the answer is probably a photo. A value outside 0..1 is refused, never clamped.
limitintegernoMaximum messages to return. (default 10; min 1.0; max 50.0)
participant_namestringnoFilter to messages involving this participant/contact name. OMIT to search across everyone (do NOT pass an empty string).
per_chatbooleannoExact search only: one result per chat (its newest match) with matches = how many messages there matched. OMIT for every message.
querystringnoWhat to search for in message content.
whole_wordbooleannoExact search only: match the query as a whole word ('Дима' finds 'Привет, Дима!' but not 'Димасик'). OMIT to match any part of a word.

search.threads​

Search Threads

Effects: read

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, email) 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.

Arguments​

ArgumentTypeRequiredDescription
channelstringnoRestrict to one channel. 'ai_panel' = the workspace's AI-panel ("My AI") chats: owner/admin see all of them, a member only their own; each has thread_id, title, owner, last_message_at (read one with messages.read_history). OMIT for the normal inbox.
include_last_messagesintegernoWith 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. (min 0.0; max 2.0)
limitintegernoMaximum threads to return. (default 10; min 1.0; max 50.0)
offsetintegernoNumber of threads to skip (for pagination, default: 0) (min 0.0)
only_unansweredbooleannoLimit 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.
only_unreadbooleannoLimit to threads with unread messages. OMIT to include read threads.
only_unread_on_platformbooleannoLimit to threads unread in the account's own app on the platform (the member's LinkedIn, ...), as far as the channel reports it; only_unread is unread in this inbox. OMIT to skip this filter.
participant_namestringnoFilter to threads with this participant/contact. OMIT to include everyone (do NOT pass an empty string).
querystringnoTopic/keyword to search threads for. OMIT to list threads by filter.
sincestringnoISO date (YYYY-MM-DD). Only threads with any message activity since this date (recency filter, not 'unanswered'). OMIT to skip.