---
title: "Update Chat"
method: PATCH
path: "/chats/{chatId}"
tags: ["chats"]
---

# Update Chat

`PATCH /chats/{chatId}`

Updates the metadata of an existing chat using its `chatId`. Supports changes to the chat name and privacy setting.

## Path parameters

- `chatId` string, required

## Request body

- object
  - `name` string — A new name to assign to the chat. Helps with identification and organization.
  - `privacy` 'public' | 'private' | 'team' | 'team-edit' | 'unlisted' — Sets the privacy level of the chat.

## Response `200`

Success

- ChatDetail — Detailed representation of a chat, including its messages, files, versions, and model configuration.
  - `id` string, required — A unique identifier for the chat.
  - `object` 'chat', required — Fixed value identifying this object as a chat.
  - `shareable` boolean, required — Indicates whether the chat can be shared via public link.
  - `privacy` 'public' | 'private' | 'team' | 'team-edit' | 'unlisted', required — Defines the visibility of the chat—private, team-only, or public.
  - `name` string — An optional name assigned to the chat by the user.
  - `title` string — Deprecated title field preserved for backward compatibility.
  - `createdAt` string, date-time, required — The ISO timestamp representing when the chat was created.
  - `updatedAt` string — The ISO timestamp of the last update to the chat.
  - `favorite` boolean, required — Indicates whether the chat is marked as a favorite.
  - `authorId` string, required — The ID of the user who created the chat.
  - `projectId` string — Optional ID of the v0 project associated with this chat.
  - `webUrl` string, required — Web URL to view this chat in the browser.
  - `apiUrl` string, required — API URL to access this chat via the API.
  - `latestVersion` object — Full details of the most recent generated version, if available.
    - `id` string, required — A unique identifier for the version.
    - `object` 'version', required — Fixed value identifying this object as a version.
    - `status` 'pending' | 'completed' | 'failed', required — The current status of the version generation process.
    - `demoUrl` string — Optional URL for previewing the generated output.
    - `createdAt` string, date-time, required — The date and time when the version was created, in ISO 8601 format.
    - `updatedAt` string, date-time — The date and time when the version was last updated, in ISO 8601 format.
    - `files` object[], required — A list of files that were generated or included in this version.
      - `object` 'file', required — Fixed value identifying this object as a file.
      - `name` string, required — The name of the file, including its extension.
      - `content` string, required — The full contents of the file as a raw string.
      - `locked` boolean, required — Whether the file is locked to prevent AI from overwriting it during new version generation.
  - `url` string, required — The canonical URL to access this chat.
  - `messages` object[], required — All messages exchanged in the chat, including user and assistant entries.
    - `id` string, required — A unique identifier for the message.
    - `object` 'message', required — Fixed value identifying this object as a message.
    - `content` string, required — The main text content of the message.
    - `experimental_content` union[] — The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change.
      - union
        - unknown[] — AST content section containing parsed markdown/MDX nodes
          - unknown
        - unknown[] — Metadata section containing title and other properties
          - unknown
    - `createdAt` string, required — The ISO timestamp representing when the message was created.
    - `updatedAt` string, date-time — 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', required — Indicates the format or category of the message, such as plain text or code.
    - `role` 'user' | 'assistant', required — 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, required — API URL to access this message via the API.
    - `parentId` string, nullable — The ID of the parent message.
  - `files` object[] — Optional array of files associated with the chat context.
    - `lang` string, required — Programming language used in the file (e.g., JavaScript, Python).
    - `meta` object, required — A key-value map of metadata associated with the file (e.g., path, type).
    - `source` string, required — The origin or identifier of the file source (e.g., path or upload label).
  - `demo` string — Deprecated demo URL used for previewing the chat result.
  - `text` string, required — The main user prompt or instruction that started the chat.
  - `modelConfiguration` object — The configuration used to generate responses in this chat.
    - `modelId` 'v0-1.5-sm' | 'v0-1.5-md' | 'v0-1.5-lg' | 'v0-gpt-5' — Deprecated Model ID field preserved for backward compatibility.
    - `imageGenerations` boolean — Enables image generations to generate up to 5 images per version.
    - `thinking` boolean — Enables thinking to generate a response in multiple steps.
  - `permissions` object, required
    - `write` boolean, required — If true, the user has write access to the chat.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `413` — Payload Too Large
- `422` — Unprocessable Entity
- `429` — Too Many Requests
- `500` — Internal Server Error

## Changes

- **2025-09-12** `e9f83fb57a16` — 1 breaking, 3 info
  - the response property `modelConfiguration/modelId` became optional for the status `200`
  - added the optional property `messages/items/parentId` to the response with the `200` status
  - response property `modelConfiguration/modelId` deprecated
  - added the required property `permissions` to the response with the `200` status
- **2025-08-24** `3521652a43a7` — 4 breaking, 10 warning, 20 info
  - removed 'propertyNames' constraint from the `files/items/meta` response property for the status `200`
  - removed the required property `messages/items/authorId` from the response with the `200` status
  - removed the required property `metadata` from the response with the `200` status
  - removed the required property `permissions` from the response with the `200` status
  - …30 more

[Change history](https://skmtc.dev/vercel/apis/v0-platform-api-beta/changes/chats/:chatId/patch.md)

---

[API](https://skmtc.dev/vercel/apis/v0-platform-api-beta.md) · [All operations](https://skmtc.dev/vercel/apis/v0-platform-api-beta/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/vercel/v0-platform-api-beta/revisions/e9f83fb57a16/schema)
