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

# Search archived conversations

`GET /conversations/show/archives/search`

## Request

- Base URL: `https://app.pipeshub.com/api/v1`
- URL: `https://app.pipeshub.com/api/v1/conversations/show/archives/search`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `/api/v1/oauth2/authorize`
    - Client credentials
    - Token URL: `/api/v1/oauth2/token` scopes: `conversation:read`

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 contain a non-space character, and is
capped at 1000 characters; it is trimmed before use. Requests that omit it, send only
spaces or exceed the cap return `400 VALIDATION_ERROR`. A value holding markup or a
printf-style format specifier (such as `%s`) is refused by the controller with
`400 HTTP_BAD_REQUEST`.

Query parameters not listed here are dropped by the validator and ignored.

**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` number
- `limit` number

## Response `200`

Search results across archived conversations

- object
  - `conversations` object[]: Archived conversations (assistant and agent) matching the search term
    - `agentKey` string: Agent identifier — present only when `source` is `agent`
    - `_id` string, objectId
    - `userId` string, objectId
    - `orgId` string, objectId
    - `title` string
    - `initiator` string, objectId
    - `status` 'None' | 'Inprogress' | 'Complete' | 'Failed' | 'Stopped'
    - `failReason` string
    - `modelInfo` object
      - `modelKey` string
      - `modelName` string
      - `modelFriendlyName` string
      - `modelProvider` string
      - `chatMode` string
      - `reasoningEffort` 'none' | 'low' | 'medium' | 'high' | 'max': Reasoning effort requested when the conversation was created, when one was set.
    - `isShared` boolean
    - `shareLink` string
    - `sharedWith` object[]
      - `userId` string, objectId
      - `accessLevel` 'read' | 'write'
      - `_id` string, objectId: Subdocument identifier auto-assigned by MongoDB.
    - `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[]
      - `_id` string, objectId: Sub-document identifier auto-assigned by MongoDB.
      - `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'
    - `isPinned` boolean: `true` when the owner pinned this conversation. Absent on conversations that are not pinned (never `false`). Set via `PATCH /conversations/{conversationId}/pin`. Only returned to the owner: lists with `source=shared` omit it.
    - `projectId` string, objectId, nullable: The project this conversation is linked to, if any. Set via `PUT /conversations/{conversationId}/project` or at creation time; absent on conversations that were never linked.
    - `projectVisibility` 'private' | 'project', nullable: Only meaningful when `projectId` is set. `private` (default) keeps the conversation visible to its owner only; `project` exposes it to every member of the linked project. See `PATCH /conversations/{conversationId}/project-visibility`.
    - `sharedBy` ConversationSharedBy: Present on conversations the caller received via share. Identifies the conversation initiator (the only user who can share a chat).
      - `userId` string, objectId, required
      - `name` string, required: Display name, falling back to email or the user id
    - `source` 'assistant' | 'agent': Origin collection of the conversation
    - `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` missing, blank, or longer than 1000 characters, or `page` or `limit` out of range (`VALIDATION_ERROR`); or `search` holds markup or a format specifier (`HTTP_BAD_REQUEST`). Also returned, before authentication, when a query value, or any string in a JSON or form-encoded body, looks like markup to the app-wide XSS filter: an HTML tag, a script tag, `<iframe`, `<object`, `<embed` or `<svg` tag, a word starting with `on` followed by `=` (meant for inline event handlers such as `onerror=`, it also catches plain text such as `one=1`), a `javascript:` or `data:text/html` URL, an encoded script tag (`&lt;script`, `%3cscript`), or any string longer than 100,000 characters (`HTTP_BAD_REQUEST`, "HTML tags, scripts, and XSS content are not allowed in ...", naming the field or query parameter; a string over 100,000 characters is refused as too long instead). A JSON body that does not parse is refused the same way, also before authentication (`HTTP_BAD_REQUEST`, "The request body is not valid JSON.").
- `401`: Unauthorized
- `403`: Token is missing the `conversation:read` scope.
- `500`: Internal server error. A JSON body larger than 10 MB, or a form-encoded body larger than 100 KB or with more than 1000 fields, is answered `413` by the app-wide body parsers instead, also before authentication.

## Changes

- **2026-10-28** `dbb5e203b445`: 1 breaking, 9 info
  - added the pattern `\S` to the `query` request parameter `search`
  - for the `query` request parameter `limit`, the type was generalized from `integer` to `number`
  - for the `query` request parameter `page`, the type was generalized from `integer` to `number`
  - added the media type `application/json` for the response with the status `400`
  - …6 more
- **2026-10-26** `fc76aa045994`: 1 info
  - added the optional property `conversations/items/allOf[#/components/schemas/ConversationListItem]/agentKey` to the response with the `200` status
- **2026-10-21** `a90ab79f26a1`: 1 info
  - added the optional property `conversations/items/allOf[#/components/schemas/ConversationListItem]/isPinned` to the response with the `200` status
- **2026-10-08** `bb0c59adf026`: 1 warning, 3 info
  - added the new `Stopped` enum value to the `conversations/items/allOf[#/components/schemas/ConversationListItem]/status` response property for the response status `200`
  - added the optional property `conversations/items/allOf[#/components/schemas/ConversationListItem]/projectId` to the response with the `200` status
  - added the optional property `conversations/items/allOf[#/components/schemas/ConversationListItem]/projectVisibility` to the response with the `200` status
  - added the optional property `conversations/items/allOf[#/components/schemas/ConversationListItem]/sharedBy` to the response with the `200` status

[Operation history](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api/changes/conversations/show/archives/search/get.md)

---

[API](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api.md) - [All operations](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api/revisions/dbb5e203b445?raw)
