Favorite Chat

Marks or unmarks a chat as a favorite using its `chatId`. This helps with organizing and quickly accessing important chats.

PUT /chats/{chatId}/favorite
import { v0 } from 'v0-sdk'

const result = await v0.chats.favorite({
  chatId: '123',
  isFavorite: true,
})

console.log(result)
PUT /chats/{chatId}/favorite
curl -X POST https://api.v0.dev/chats/123/favorite \
  -H "Authorization: Bearer $V0_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "isFavorite": true
  }'

Parameters

Path Parameters

chatId string Required

The unique identifier of the chat to update. Provided as a path parameter.


Request Body

isFavorite boolean Required

Specifies whether the chat should be marked as a favorite.

  • "true": mark as favorite

  • "false": remove from favorites


Response

Response Body

id string Required


object string Required


favorited boolean Required