---
title: "Search conversations"
method: GET
path: "/v1/messaging/inbox/conversations/search"
tags: ["Messages"]
---

# Search conversations

`GET /v1/messaging/inbox/conversations/search`

## Request

- Base URL: `https://apihub.co.il`
- URL: `https://apihub.co.il/v1/messaging/inbox/conversations/search`
- Auth: HTTP bearer

Search your conversations two ways at once, and get back the matching conversations, most-recent match first:

- Message text: matches words inside message bodies. Case-insensitive and accent-insensitive, exact tokens only (no substrings, no stemming). Each hit carries up to 3 most-recent matching messages. With direction=outgoing you can collect examples of how you write to customers, for example to teach an AI agent your tone of voice.
- Contact identity: matches the participant's name, username, or phone number as a case-insensitive substring. These hits have matchCount 0 and an empty matches array.

A conversation that matches both ways is returned once, carrying its message matches.

Only platforms whose messages are stored by Zernio are searchable: WhatsApp, SMS, Telegram, Facebook, Instagram, X and Reddit. Bluesky conversations are fetched live from the platform and cannot be searched; those accounts are listed in meta.accountsSkipped.


**Billing:** Read (free unless it says otherwise) · **Rate limit:** 120/min

## Query parameters

- `limit` integer: Maximum number of conversations to return
- `query` string, required: Text to search for, in message content and in the contact's name, username, or phone number
- `cursor` string: Opaque pagination cursor. Pass back pagination.nextCursor verbatim; do not construct one.
- `platform` 'facebook' | 'instagram' | 'telegram' | 'whatsapp' | 'sms' | 'rcs' | 'slack' | 'imessage': Filter by platform (searchable platforms only)
- `accountId` string: Filter by specific account ID
- `direction` 'incoming' | 'outgoing': Only match messages sent to you (incoming) or by you (outgoing). Contact-identity matching is not applied when this is set.

## Headers

- `Idempotency-Key` string
- `X-Tag` string

## Response `200`

Completed

- object
  - `id` string: Execution id — stable across internal retries; use it with GET /v1/executions/{id}
  - `status` 'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
  - `operation` string
  - `tag` string, nullable: Your X-Tag, if sent
  - `created_at` string, date-time
  - `completed_at` string, date-time, nullable
  - `output` object: Operation result (see each operation). While a Studio render is processing: `stage` (queued · transcribing · downloading · preparing · cleaning_voice · mixing_audio · rendering · finishing), `phase` (the engine's: download · prepare · voice · audio · encode · qa · upload, or null), `progress` (a percent, 0–100) and `progress_fraction` (0–1), `eta_seconds` (seconds left, never below 0) and `estimate_seconds`
    - `data` object[]
      - `matches` object[]: Up to 3 most-recent matching messages (empty for an identity-only match)
        - `id` string
        - `text` string, nullable
        - `direction` 'incoming' | 'outgoing'
        - `timestamp` string, date-time
      - `matchCount` integer: Number of matching messages in this conversation. 0 when the conversation matched only on contact identity (name, username, or phone number), not on message text.
      - `conversation` object
        - `id` string: Conversation ID, usable with the conversation messages endpoints
        - `status` 'active' | 'archived'
        - `platform` string
        - `accountId` string
        - `lastMessage` string, nullable: The conversation's most recent message preview
        - `lastMessageAt` string, date-time, nullable
        - `participantName` string, nullable
        - `whatsappUsername` string: WhatsApp only. The participant's WhatsApp username (e.g. `jane.shop`, no leading @). Not a stable identifier, because users can change it: useful for display, not recommended as an identity anchor. Captured from inbound messages, so older threads fill in on their next inbound.
        - `participantPicture` string, nullable
        - `participantUsername` string, nullable
        - `businessScopedUserId` string: WhatsApp only. Meta business-scoped user ID (BSUID), the stable identity anchor; present when Meta has sent it for this participant.
    - `meta` object
      - `lastUpdated` string, date-time
      - `accountsFailed` integer
      - `failedAccounts` object[]
        - `error` string
        - `platform` string
        - `accountId` string
        - `accountUsername` string, nullable
      - `accountsQueried` integer
      - `accountsSkipped` object[]: Connected messaging accounts that cannot be searched (live-fetched platforms)
        - `platform` string
        - `accountId` string
    - `pagination` object
      - `hasMore` boolean
      - `nextCursor` string, nullable
  - `error` string, nullable
  - `usage` object
    - `credits_charged` number, nullable
    - `credits_reserved` number
    - `estimated_credits` number
    - `cost_source` 'provider_reported' | 'calculated' | 'estimated' | 'null', nullable
    - `provider_usage` object, nullable: Normalised consumption, e.g. { VIDEO_SECOND: 22.4 }
  - `balance` object
    - `available` number
    - `reserved` number

## Other responses

- `400`: Invalid input
- `402`: Insufficient credits / project budget
- `404`: Resource not found (or not yours)
- `429`: Rate limited
- `503`: Service temporarily paused

---

[API](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai.md) · [All operations](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/revisions/a8caa42835ce?raw)
