Find Chat Messages

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 /chats/{chatId}/messages
import { v0 } from 'v0-sdk'

const result = await v0.chats.findMessages()

console.log(result)
GET /chats/{chatId}/messages
curl -X GET https://api.v0.dev/chats/{chatId}/messages \
  -H "Authorization: Bearer $V0_API_KEY" \
  -H "Content-Type: application/json"

Parameters

Path Parameters

chatId string Required

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

Response Body

object string Required


data any[] Required

Array items: string


pagination object Required

hasMore boolean Required


nextCursor string


nextUrl string