Search conversations
Search message text across your conversations and get back the conversations that contain the query, each with up to 3 most-recent matching messages. Useful for finding threads about a topic, or (with direction=outgoing) collecting examples of how you write to customers, for example to teach an AI agent your tone of voice.
Only platforms whose messages are stored by Zernio are searchable: WhatsApp, SMS, Telegram, Facebook and Instagram. Twitter/X, Bluesky and Reddit conversations are fetched live from the platforms and cannot be searched; those accounts are listed in meta.accountsSkipped.
Matching is word-based: case-insensitive and accent-insensitive, exact tokens only (no substrings, no stemming). Quote a phrase to match it exactly.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Text to search for in message content
2 <= length <= 200Only match messages sent to you (incoming) or by you (outgoing)
"incoming" | "outgoing"Filter by profile ID
Filter by platform (searchable platforms only)
"facebook" | "instagram" | "telegram" | "whatsapp" | "sms"Filter by specific social account ID
Maximum number of conversations to return
201 <= value <= 50Pagination cursor for next page
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.messages.searchInboxConversations({ query: { query: 'string', },});console.log(data);{
"data": [
{
"conversation": {
"id": "string",
"platform": "string",
"accountId": "string",
"participantName": "string",
"participantUsername": "string",
"participantPicture": "string",
"status": "active",
"lastMessageAt": "2019-08-24T14:15:22Z"
},
"matchCount": 0,
"matches": [
{
"id": "string",
"text": "string",
"direction": "incoming",
"timestamp": "2019-08-24T14:15:22Z"
}
]
}
],
"pagination": {
"hasMore": true,
"nextCursor": "string"
},
"meta": {
"accountsQueried": 0,
"accountsFailed": 0,
"failedAccounts": [
{
"accountId": "string",
"accountUsername": "string",
"platform": "string",
"error": "string"
}
],
"lastUpdated": "2019-08-24T14:15:22Z",
"accountsSkipped": [
{
"accountId": "string",
"platform": "string"
}
]
}
}{
"error": "Unauthorized"
}Send typing indicator POST
Show a typing indicator in a conversation. Platform support: - Facebook Messenger: Shows "Page is typing..." for 20 seconds - Telegram: Shows "Bot is typing..." for 5 seconds - WhatsApp: Shows "typing..." for up to 25 seconds. Requires a recent inbound message in the conversation (Meta references the inbound message id) and also marks that message as read as a side-effect. - All others: Returns 200 but no-op (platform doesn't support it) Typing indicators are best-effort. The endpoint always returns 200 even if the platform call fails.
List commented posts GET
Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts. For users with the Ads add-on (Metronome plans always qualify), the user's Meta ads (boosted/dark posts) are included too. There's one row per (ad, placement-with-comments): an ad that runs on both Facebook feed and Instagram feed produces up to two rows (the Page dark post and the IG media have separate comment threads), each flagged `isAd: true` with `adId` and `placement` (`id` is `{adId}:{placement}`). Use `?platform=metaads` to return *only* ad rows; passing `facebook`/`instagram` returns *organic* posts only (no ads); omitting `platform` returns both. Fetch a row's thread from GET /v1/ads/{adId}/comments?placement={placement}. Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side); a row whose count can't be read is omitted.