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

# Conversation archive: natural-language search and filtered export

> Search the full conversation history across every connected channel with everyday words, narrow the result set with channel and status filters, then export exactly that slice as CSV or JSON — the handover pack for sales, support, and compliance.

# Conversation archive

The conversation archive is your workspace's full conversational history in one place — every conversation across SMS, WhatsApp, email, RCS, Viber, Instagram, Messenger, LINE, Telegram, web chat, voice, and AI agent channels, searchable from a single box. Open it from the inbox navigation rail: **Inbox → Archive**.

Use the archive when a question spans contacts and channels you can't hold in the live queue:

* "Which threads mentioned this refund policy?" — a message-body search, not a contact-name lookup.
* "Give me everything from this customer, on every channel, for a support handover." — a filtered slice, exported as a file.
* "Has anyone on the team handled a case like this before?" — the whole history answers, even threads closed months ago.

The [Search message history](/guides/search-message-history) guide covers the `q=` fielded DSL on the Messages list — a single-message lookup by provider reference or field constraint. The archive works at conversation level: free text over message bodies, filters over channels and statuses, and one export for the whole result set.

## Natural-language search

Type the words you remember — no field prefixes, no quoting syntax. The archive box matches two ways:

* **Message bodies** — server-side full-text search over the complete message history, with per-term prefix matching. A term like `refund` surfaces threads where any message on any channel used the word; a punctuated identifier like a case id `ABC-1234` or an email address matches the individual tokens that Postgres actually stores. Adding more words narrows the match.
* **Contact identity** — the same text is matched as a substring against the contact's name, phone number, and email address, so a phone prefix or an email domain finds their threads even when the messages themselves never mention it.

Rows read straight off the API: each hit carries the contact, its channel, its status, the last message snippet, and an unread badge when applicable.

## Narrow with channel and status filters

Two dropdowns narrow the result set the search produced:

* **Channel** — any connected channel (`sms`, `whatsapp`, `email`, `rcs`, `viber`, `instagram`, `messenger`, `line`, `telegram`, `apple_messages`, `web_chat`, `wechat`, `kakao`, `zalo`, `voice`, `video`, `agent`). All channels by default.
* **Status** — open, resolved, snoozed, closed, or archived. Any status by default; pick **Archived** when you want the permanent historical record only.

The header shows the total number of matching conversations as a counter badge, updates it as you narrow, and a **Clear** button resets the whole filter bar when any filter is set.

## Free-text search over the API

Both lookups the page performs are available over the API with the same parameters. Each request carries an `X-API-Key` header (live keys are prefixed `dv_live_sk_`).

**Full history, any status** — `GET /conversations` accepts `search` for the same free-text match over message bodies and contact identity, combined with channel and status filters:

```bash theme={null}
curl "https://api.orbit.devotel.io/api/v1/conversations?search=refund&channel=whatsapp&status=archived&limit=25" \
  -H "X-API-Key: $ORBIT_API_KEY"
```

**Archived conversations only** — `GET /conversations/archive/search` accepts `q` (or the legacy `search` alias) and every filter axis the inbox list accepts, but confines the result set to archived conversations on the server:

```bash theme={null}
curl "https://api.orbit.devotel.io/api/v1/conversations/archive/search?q=refund%20policy&channel=whatsapp&limit=25" \
  -H "X-API-Key: $ORBIT_API_KEY"
```

Both responses are cursor-paginated (`limit` 1–100, default 25): follow `pagination.cursor` while `has_more` is true.

## Export the filtered view

The **Export** dropdown in the archive header downloads exactly the slice you're looking at — the current search text, channel, and status travel with the request, so the file can never drift from the on-screen result set. Three format choices cover the usual handover shapes:

| Format                     | What you get                                                                                                     | Use it for                                                                              |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| CSV                        | One flat row per conversation: contact, channel, status, assignee, tags, unread count, timestamps, last message. | CRM imports, spreadsheets, compliance summaries.                                        |
| JSON                       | A structured array of the matching conversations, messages excluded.                                             | Ingest into a data warehouse or audit pipeline.                                         |
| JSON with full transcripts | The same array, with each conversation's complete message history inlined, including attachment URLs.            | A full handover pack for sales or support — everything the recipient needs in one file. |

The same filters feed `GET /conversations/export` over the API:

```bash theme={null}
curl "https://api.orbit.devotel.io/api/v1/conversations/export?format=json&include_messages=true&search=refund&channel=whatsapp&status=archived" \
  -H "X-API-Key: $ORBIT_API_KEY" \
  -o handover.json
```

`format` is `csv` (default) or `json`; `include_messages=true` only applies to JSON. Downloads are synchronous, so an export is bounded: metadata-only exports cover up to 10,000 conversations while transcript exports cap at 1,000, and the JSON response reports `truncated: true` when a limit was hit — narrow the filters and export again. Every export is recorded in the audit log.

## Deep links into the inbox

The archive is read-only — it never renders a composer. Each result row deep-links into the canonical inbox thread (`/inbox?id=<conversation id>`), where the full transcript loads and your team can reply, assign, or tag with the normal conversation tools. Share the URL with a teammate: it opens the same thread directly.

## Permissions and page states

* **Who can open it** — owner, admin, developer, and supervisor roles. The underlying endpoints are read-scoped (`conversations:read`), so API-key callers with read access can run the same search and export programmatically. All results stay within your tenant's workspace.
* **Loading** — the table renders skeleton rows while the search runs.
* **Empty** — before any conversation exists, the page explains that the archive fills as customers reach you on any channel. With filters set but no matches, it tells you how many filters are active and offers to clear them.
* **Error** — a failed load shows the error message with a Retry button; nothing your team has archived is lost.

## See also

* [Search message history](/guides/search-message-history) — the `q=` fielded DSL for single-message lookups by provider reference
* [Omnichannel Inbox setup](/guides/inbox-setup) — channels, routing, macros, SLA, and saved views that feed the archive
* [Delivery log](/guides/delivery-log) — per-message delivery search across channels
