---
title: "Search archived conversations"
method: GET
path: "/conversations/show/archives/search"
tags: ["Conversations"]
---

# Search archived conversations

`GET /conversations/show/archives/search`

Search across all archived conversations (assistant and agent) for the authenticated user.

**Overview:**

Performs a case-insensitive substring match against conversation titles and message content
across both assistant (`Conversation`) and agent (`AgentConversation`) archived collections.
Results are merged server-side and sorted by `lastActivityAt` descending.

**Search parameter:**

The `search` query parameter is required, must be a non-empty string, and is capped at
1000 characters. Requests that omit it or exceed the cap return `400`.

**Pagination:**

Results are paginated using `page` and `limit`. The response includes a `pagination`
block with total counts and a `summary` block that breaks matches down by source.

**Item shape:**

Each item is a conversation list entry (no `messages` payload — that field is omitted
for performance) tagged with `source`, plus computed `isOwner`, `accessLevel`,
`archivedAt`, and `archivedBy`. `agentKey` is present only when `source` is `agent`.

## Query parameters

- `search` string, required
- `page` integer
- `limit` integer

## Response `200`

Search results across archived conversations

- object
  - `conversations` object[] — Archived conversations (assistant and agent) matching the search term
    - `_id` string, objectId
    - `userId` string, objectId
    - `orgId` string, objectId
    - `title` string
    - `initiator` string, objectId
    - `status` 'None' | 'Inprogress' | 'Complete' | 'Failed'
    - `failReason` string
    - `modelInfo` object
      - `modelKey` string
      - `modelName` string
      - `modelFriendlyName` string
      - `modelProvider` string
      - `chatMode` string
    - `isShared` boolean
    - `shareLink` string
    - `sharedWith` object[]
      - `userId` string, objectId
      - `accessLevel` 'read' | 'write'
    - `isArchived` boolean
    - `archivedBy` string, objectId, nullable — User ID of the last user who archived this row, or `null` after unarchive cleared the archive state. Absent on rows that have never been archived.
    - `isDeleted` boolean
    - `deletedBy` string, objectId
    - `conversationErrors` object[]
      - `message` string
      - `errorType` string
      - `timestamp` string, date-time
      - `messageId` string, objectId
      - `stack` string
      - `metadata` object
    - `metadata` object
    - `lastActivityAt` integer
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `isOwner` boolean
    - `accessLevel` 'read' | 'write'
    - `source` 'assistant' | 'agent' — Origin collection of the conversation
    - `agentKey` string — Agent identifier — present only when `source` is `agent`
    - `archivedAt` string, date-time — Timestamp when the conversation was archived
  - `pagination` object
    - `page` integer — Current page number
    - `limit` integer — Items per page
    - `totalCount` integer — Total matches across assistant and agent archives
    - `totalPages` integer — Total pages at the current limit
    - `hasNextPage` boolean — Whether a next page exists
    - `hasPrevPage` boolean — Whether a previous page exists
  - `summary` object
    - `totalMatches` integer — Combined match count across both collections
    - `assistantMatches` integer — Match count in the assistant (`Conversation`) collection
    - `agentMatches` integer — Match count in the agent (`AgentConversation`) collection
    - `searchQuery` string — Trimmed search term that was applied
  - `meta` object
    - `requestId` string — Request correlation identifier
    - `timestamp` string, date-time — Response generation timestamp
    - `duration` integer — Server processing time in milliseconds

## Other responses

- `400` — Search parameter missing, empty, not a string, or longer than 1000 characters
- `401` — Unauthorized

---

[API](https://skmtc.net/pipeshub-ai/apis/pipeshub-api.md) · [All operations](https://skmtc.net/pipeshub-ai/apis/pipeshub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pipeshub-ai/pipeshub-api/versions/abd27cfefc73/schema)
