---
title: "Search messages"
method: GET
path: "/v1/conversations/{conversation_id}/messages"
tags: ["conversations"]
---

# Search messages

`GET /v1/conversations/{conversation_id}/messages`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/conversations/{conversation_id}/messages`
- Auth: HTTP bearer

List messages with filtering, sorting, and pagination. Use 'any' as conversation_id to search across all parents in the tenant.

## Path parameters

- `conversation_id` string, required: Conversation ID. Use 'any' to search across all parents.

## Query parameters

- `q` string, nullable: ANTLR filter expression
- `limit` integer, nullable: Page size
- `sort_by` string, nullable: Sort expression (e.g. created_at:desc)
- `fields` string, nullable: Field projection (e.g. id,name)
- `pq` string, nullable: Pagination cursor query
- `from_prev` boolean: Backward pagination flag

## Headers

- `X-Tenant-Id` string, nullable

## Response `200`

Paginated message list.

- ModelsConversationMessageSearchValidator: Typed cursor-paginated transcript list response.
  - `items` ModelsConversationMessageFullValidator[], required
    - `id` string, uuid, nullable
    - `tenant_id` string, uuid, nullable
    - `conversation_id` string, uuid, nullable
    - `run_id` string, uuid, nullable
    - `role` string, nullable
    - `author_actor_id` string, uuid, nullable
    - `content` string, nullable
    - `card` object, nullable
    - `platform_message_id` string, nullable
    - `token_count` integer, nullable
    - `created_at` string, date-time, nullable
  - `first` string, nullable
  - `next` string, nullable
  - `previous` string, nullable

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)
- `422`: Validation error

---

[API](https://skmtc.dev/patricia/apis/patricia-api.md) · [All operations](https://skmtc.dev/patricia/apis/patricia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/patricia/apis/patricia-api/revisions/0dfb44495ea1?raw)
