---
title: Find Chat Messages
description: Retrieves a list of all messages for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes message content, role, and type information.
docs_index: /docs/llms.txt
lastUpdated: 2026-10-23
product: v0 API
type: reference
prerequisites:
  - /docs/api/v1/quickstart
---

> For an index of all documentation, see [/docs/llms.txt](/docs/llms.txt).

Retrieves a list of all messages for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes message content, role, and type information.

#### `GET /v1/chats/{chatId}/messages`

## Usage

```typescript
import { v0 } from 'v0-sdk'

const result = await v0.chats.findMessages()

console.log(result)
```

```bash
curl -X GET https://api.v0.dev/v1/chats/{chatId}/messages   -H "Authorization: Bearer $V0_API_KEY"   -H "Content-Type: application/json"
```

## API Signature

### Request

#### Path Parameters

- `chatId: string` The unique identifier of the chat to retrieve messages for. Provided as a path parameter.

#### Query Parameters

- `limit?: number` Specifies the maximum number of message records to return in a single response. Useful for paginating results when there are many messages.
- `cursor?: string` Base64 encoded cursor containing pagination data

### Response

- `object: 'list'`
- `data: object[]`
  - `item: object`
    - `id?: string` A unique identifier for the message.
    - `object?: 'message'` Fixed value identifying this object as a message.
    - `content?: string` The main text content of the message.
    - `experimental_content?: any[] | any[][]` The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change.
      - `item: any[] | any[]`
    - `createdAt?: string` The ISO timestamp representing when the message was created.
    - `updatedAt?: string` The ISO timestamp representing when the message was last updated.
    - `type?: 'message' | 'forked-block' | 'forked-chat' | 'open-in-v0' | 'refinement' | 'added-environment-variables' | 'added-integration' | 'deleted-file' | 'moved-file' | 'renamed-file' | 'edited-file' | 'replace-src' | 'reverted-block' | 'fix-with-v0' | 'auto-fix-with-v0' | 'sync-git' | 'pull-changes' | 'fix-cve' | 'answered-questions'` Indicates the format or category of the message, such as plain text or code.
    - `role?: 'user' | 'assistant'` Specifies whether the message was sent by the user or the assistant.
    - `finishReason?: 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown'` The reason why the message generation finished.
    - `apiUrl?: string` API URL to access this message via the API.
    - `authorId?: string | null` The ID of the user who sent the message.
    - `parentId?: string | null` The ID of the parent message.
    - `attachments?: object[]`
      - `item: object`
        - `url: string` The URL where the attachment file can be accessed.
        - `name?: string` The original filename of the attachment.
        - `contentType?: string` The MIME type of the attachment file (e.g., image/png, application/pdf).
        - `size: number` The size of the attachment file in bytes.
        - `content?: string` The base64-encoded content of the attachment file, if available.
        - `type?: 'screenshot' | 'figma' | 'zip'` Optional v0-specific attachment type for enhanced processing.
- `pagination: object`
  - `hasMore: boolean`
  - `nextCursor?: string`
  - `nextUrl?: string`

---

For a semantic overview of all documentation, see [/docs/sitemap.md](/docs/sitemap.md)

For an index of all available documentation, see [/docs/llms.txt](/docs/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/docs/agents.md](/docs/agents.md)