Vercel
v0 Platform APIAPI ReferenceChats

Resume Message

Reconnects to an active assistant message stream in a chat.

POST/v1/chats/{chatId}/messages/{messageId}/resume

Usage

Use this endpoint when a client disconnects while an assistant message is still generating, such as after a page refresh. The endpoint reconnects to the currently running stream for the specified assistant message.

This endpoint does not restart a stopped or completed generation. After calling the stop endpoint, start a new message instead of calling resume.

TypeScript Example
import { v0 } from 'v0-sdk'const stream = await v0.chats.resume({  chatId: 'chat_123',  messageId: 'msg_123',})for await (const event of stream) {  console.log(event)}

API Signature

Request

Path Parameters

chatId: string

The unique identifier of the chat containing the message to resume. Provided as a path parameter.

messageId: string

The identifier of the specific message to resume. Provided as a path parameter.

Response

Returns text/event-stream. Each event is sent as data: <JSON>\n\n.

id: string

The chat or message identifier for the event.

object: 'chat' | 'chat.title' | 'chat.name' | 'message.experimental_content.chunk'

The event type. Chat events contain the current chat state; title/name events contain title deltas; message chunk events contain content deltas.

delta?: string | object

The incremental payload for title/name and message chunk events.

error?: string

An error message if the stream failed while reconnecting.

On this page