{ "openapi": "3.1.0", "info": { "title": "v0 Platform API (beta)", "version": "1", "description": "Full stack vibe coding API", "termsOfService": "https://vercel.com/legal/api-terms" }, "externalDocs": { "description": "Find more info here", "url": "https://vercel.com/docs/v0/api" }, "servers": [ { "url": "https://api.v0.dev/v1" } ], "tags": [ { "name": "chats", "description": "Chats" } ], "paths": { "/chats": { "post": { "summary": "Create Chat", "description": "Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project.", "operationId": "chats.create", "tags": ["chats"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Creates a new chat using a user message, optional system context, and model configuration. Useful for prompting the model within the scope of a specific project." }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" } }, "required": ["url"], "additionalProperties": false }, "description": "A list of files or assets to be included in the conversation context. Useful when the chat or task requires referencing documents, images, or other resources." }, "system": { "type": "string", "description": "Provides system-level context or background for the chat. This is typically used to specify frameworks, tools, or development environments relevant to the task." }, "chatPrivacy": { "type": "string", "enum": [ "public", "private", "team-edit", "team", "unlisted" ], "default": "private", "description": "Determines the privacy setting of the chat. This can control whether the chat is visible only to the user, to team members, or is public." }, "projectId": { "type": "string", "description": "Associates the chat with a specific project in your workspace. Helps organize and group related chats under a common project context." }, "modelConfiguration": { "type": "object", "properties": { "modelId": { "type": "string", "enum": [ "v0-1.5-sm", "v0-1.5-md", "v0-1.5-lg", "v0-gpt-5" ] }, "imageGenerations": { "type": "boolean", "default": false }, "thinking": { "type": "boolean", "default": false } }, "required": ["modelId"], "additionalProperties": false, "description": "Settings that control how the model behaves in the chat." }, "responseMode": { "type": "string", "enum": ["sync", "async", "experimental_stream"], "default": "sync", "description": "Controls how the response is delivered.\n\n- `\"sync\"`: The response is returned immediately with the HTTP request.\n- `\"async\"`: Returns a message placeholder immediately; use getById to poll for completion status and final output.\n- `\"experimental_stream\"`: Returns content parts as Server-Sent Events for real-time streaming." }, "designSystemId": { "type": ["string", "null"], "description": "The ID of a design system to apply to this chat. Design systems provide consistent styling and components for generated UI." } }, "required": ["message"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] }, "get": { "summary": "Find Chats", "description": "Retrieves a list of existing chats, with support for pagination and filtering by favorite status. Helps manage and navigate chat history.", "operationId": "chats.find", "tags": ["chats"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/ChatSummary" } } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "number", "maximum": 60, "default": 60, "description": "Specifies the maximum number of chat records to return in a single response. Useful for paginating results when there are many chats." }, "description": "Specifies the maximum number of chat records to return in a single response. Useful for paginating results when there are many chats." }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "number", "default": 0, "description": "Determines the starting point for pagination. Used in conjunction with limit to retrieve a specific page of chat results." }, "description": "Determines the starting point for pagination. Used in conjunction with limit to retrieve a specific page of chat results." }, { "name": "isFavorite", "in": "query", "required": false, "schema": { "type": "string", "enum": ["true", "false"], "description": "Filters chats by their \"favorite\" status. Accepts `\"true\"` or `\"false\"` (as strings, not booleans).\n\n- `\"true\"`: returns only chats marked as favorites.\n- `\"false\"`: returns only non-favorite chats." }, "description": "Filters chats by their \"favorite\" status. Accepts `\"true\"` or `\"false\"` (as strings, not booleans).\n\n- `\"true\"`: returns only chats marked as favorites.\n- `\"false\"`: returns only non-favorite chats." } ], "security": [ { "apiKey": [] } ] } }, "/chats/init": { "post": { "summary": "Initialize Chat", "description": "Initializes a new chat from source content such as files, repositories, registries, or zip archives. Enables context-rich conversations based on code or assets.", "operationId": "chats.init", "tags": ["chats"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "allOf": [ { "type": "object", "properties": { "name": { "type": "string", "description": "A user-defined name for the chat. Helps identify or describe the purpose of the chat session in the UI or API responses." }, "chatPrivacy": { "type": "string", "enum": [ "public", "private", "team-edit", "team", "unlisted" ], "default": "private", "description": "Controls the visibility of the chat. Defines whether the chat is private, shared with a team, or publicly accessible." }, "projectId": { "type": "string", "description": "Associates the chat with a specific project. Useful for organizing and grouping chats in a workspace." } } }, { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "files", "description": "Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat." }, "files": { "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" }, "locked": { "type": "boolean", "description": "Whether to lock this file to prevent AI from overwriting it during generation" } }, "required": ["name", "url"], "additionalProperties": false }, { "type": "object", "properties": { "name": { "type": "string" }, "content": { "type": "string" }, "locked": { "type": "boolean", "description": "Whether to lock this file to prevent AI from overwriting it during generation" } }, "required": ["name", "content"], "additionalProperties": false } ] }, "minItems": 1, "description": "An array of inline file objects used to initialize the chat. Each object must contain a file `name` and its `content`." } }, "required": ["type", "files"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "repo", "description": "Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat." }, "repo": { "type": "object", "properties": { "url": { "type": "string" }, "branch": { "type": "string", "maxLength": 250 } }, "required": ["url"], "additionalProperties": false, "description": "Specifies a repository source for initialization. Supports both public and private GitHub repositories. For private repositories, ensure your GitHub account is connected through Vercel." }, "lockAllFiles": { "type": "boolean", "description": "Whether to lock all files in the repository to prevent AI from overwriting them during generation" } }, "required": ["type", "repo"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "registry", "description": "Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat." }, "registry": { "type": "object", "properties": { "url": { "type": "string" } }, "required": ["url"], "additionalProperties": false, "description": "Allows initialization from a predefined component or code registry. Includes the registry source and identifier for the desired component/module." }, "lockAllFiles": { "type": "boolean", "description": "Whether to lock all files from the registry to prevent AI from overwriting them during generation" } }, "required": ["type", "registry"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "zip", "description": "Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat." }, "zip": { "type": "object", "properties": { "url": { "type": "string", "format": "uri" } }, "required": ["url"], "additionalProperties": false, "description": "Provides a zipped bundle of files as the input source. Typically includes a base64-encoded archive or a remote URL reference." }, "lockAllFiles": { "type": "boolean", "description": "Whether to lock all files from the zip archive to prevent AI from overwriting them during generation" } }, "required": ["type", "zip"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "template", "description": "Specifies the initialization method. For this endpoint, it defines the source of content being used to initialize the chat." }, "templateId": { "type": "string", "description": "The ID of the template to initialize the chat from. This should be a valid template ID from the v0 template system." } }, "required": ["type", "templateId"], "additionalProperties": false } ] } ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] } }, "/chats/{chatId}": { "delete": { "summary": "Delete Chat", "description": "Deletes a specific chat based on the provided chatId. This operation is irreversible and permanently removes the chat and its contents.", "operationId": "chats.delete", "tags": ["chats"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "object": { "type": "string", "const": "chat" }, "deleted": { "type": "boolean", "const": true } }, "required": ["id", "object", "deleted"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat to delete. This must be passed as a path parameter in the URL." } ], "security": [ { "apiKey": [] } ] }, "get": { "summary": "Get Chat", "description": "Retrieves the full details of a specific chat using its `chatId`. Includes messages, metadata, and associated configuration.", "operationId": "chats.getById", "tags": ["chats"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat to retrieve. Must be provided as a path parameter." } ], "security": [ { "apiKey": [] } ] }, "patch": { "summary": "Update Chat", "description": "Updates the metadata of an existing chat using its `chatId`. Supports changes to the chat name and privacy setting.", "operationId": "chats.update", "tags": ["chats"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "A new name to assign to the chat. Helps with identification and organization." }, "privacy": { "type": "string", "enum": [ "public", "private", "team", "team-edit", "unlisted" ], "description": "Sets the privacy level of the chat." } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat to update. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] } }, "/chats/{chatId}/favorite": { "put": { "summary": "Favorite Chat", "description": "Marks or unmarks a chat as a favorite using its `chatId`. This helps with organizing and quickly accessing important chats.", "operationId": "chats.favorite", "tags": ["chats"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "isFavorite": { "type": "boolean", "description": "Specifies whether the chat should be marked as a favorite.\n\n- `\"true\"`: mark as favorite\n- `\"false\"`: remove from favorites" } }, "required": ["isFavorite"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "object": { "type": "string", "const": "chat" }, "favorited": { "type": "boolean" } }, "required": ["id", "object", "favorited"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat to update. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] } }, "/chats/{chatId}/fork": { "post": { "summary": "Fork Chat", "description": "Creates a new chat fork from a specific version within an existing chat. Useful for branching off alternate directions without modifying the original conversation.", "operationId": "chats.fork", "tags": ["chats"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "versionId": { "type": "string", "maxLength": 32, "description": "The identifier of the specific chat version to fork from. If omitted, the latest version will be used." }, "privacy": { "type": "string", "enum": [ "public", "private", "team", "team-edit", "unlisted" ], "default": "private", "description": "Determines the privacy setting of the forked chat. This can control whether the chat is visible only to the user, to team members, or is public." } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat to fork. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] } }, "/chats/{chatId}/project": { "get": { "summary": "Get Project by Chat ID", "description": "Retrieves the v0 project associated with a given chat. Useful for determining the context or scope of a chat session.", "operationId": "projects.getByChatId", "tags": ["projects"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the chat to retrieve the associated project for." } ], "security": [ { "apiKey": [] } ] } }, "/chats/{chatId}/messages": { "get": { "summary": "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.", "operationId": "chats.findMessages", "tags": ["chats"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/MessageSummary" } }, "pagination": { "type": "object", "properties": { "hasMore": { "type": "boolean" }, "nextCursor": { "type": "string" }, "nextUrl": { "type": "string" } }, "required": ["hasMore"], "additionalProperties": false } }, "required": ["object", "data", "pagination"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat to retrieve messages for. Provided as a path parameter." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "number", "minimum": 1, "maximum": 150, "default": 20, "description": "Specifies the maximum number of message records to return in a single response. Useful for paginating results when there are many messages." }, "description": "Specifies the maximum number of message records to return in a single response. Useful for paginating results when there are many messages." }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "description": "Base64 encoded cursor containing pagination data" }, "description": "Base64 encoded cursor containing pagination data" } ], "security": [ { "apiKey": [] } ] }, "post": { "summary": "Send Message", "description": "Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.", "operationId": "chats.sendMessage", "tags": ["chats"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "The prompt or instruction to send to the model as part of the chat." }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" } }, "required": ["url"], "additionalProperties": false }, "default": [], "description": "A list of files or assets to include with the message." }, "modelConfiguration": { "type": "object", "properties": { "modelId": { "type": "string", "enum": [ "v0-1.5-sm", "v0-1.5-md", "v0-1.5-lg", "v0-gpt-5" ] }, "imageGenerations": { "type": "boolean", "default": false }, "thinking": { "type": "boolean", "default": false } }, "required": ["modelId"], "additionalProperties": false, "description": "Overrides for the model behavior." }, "responseMode": { "type": "string", "enum": ["sync", "async", "experimental_stream"], "default": "sync", "description": "Controls how the response is delivered.\n\n- `\"sync\"`: The response is returned immediately with the HTTP request.\n- `\"async\"`: Returns a message placeholder immediately; use getById to poll for completion status and final output.\n- `\"experimental_stream\"`: Returns content parts as Server-Sent Events for real-time streaming." } }, "required": ["message"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat to send the message to. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] } }, "/chats/{chatId}/messages/{messageId}": { "get": { "summary": "Get Chat Message", "description": "Retrieves detailed information about a specific message within a chat, including content, files, model configuration, and demo URLs.", "operationId": "chats.getMessage", "tags": ["chats"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat containing the message. Provided as a path parameter." }, { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the message to retrieve. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] } }, "/chats/{chatId}/versions": { "get": { "summary": "Find Chat Versions", "description": "Retrieves a list of all versions (iterations) for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes version status and demo URLs.", "operationId": "chats.findVersions", "tags": ["chats"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/VersionSummary" } }, "pagination": { "type": "object", "properties": { "hasMore": { "type": "boolean" }, "nextCursor": { "type": "string" }, "nextUrl": { "type": "string" } }, "required": ["hasMore"], "additionalProperties": false } }, "required": ["object", "data", "pagination"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat to retrieve versions for. Provided as a path parameter." }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "number", "minimum": 1, "maximum": 150, "default": 20, "description": "Specifies the maximum number of version records to return in a single response. Useful for paginating results when there are many versions." }, "description": "Specifies the maximum number of version records to return in a single response. Useful for paginating results when there are many versions." }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": "string", "description": "Base64 encoded cursor containing pagination data" }, "description": "Base64 encoded cursor containing pagination data" } ], "security": [ { "apiKey": [] } ] } }, "/chats/{chatId}/versions/{versionId}": { "get": { "summary": "Get Chat Version", "description": "Retrieves detailed information about a specific version of a chat, including all files with their content and lock status.", "operationId": "chats.getVersion", "tags": ["chats"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VersionDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat containing the version. Provided as a path parameter." }, { "name": "versionId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the version to retrieve. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] }, "patch": { "summary": "Update Chat Version Files", "description": "Updates the source files of a specific chat version (block) manually. This allows editing generated files directly through the API.", "operationId": "chats.updateVersion", "tags": ["chats"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "files": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The full file path including extension (e.g., \"components/test.tsx\")" }, "content": { "type": "string", "description": "The new content for the file" }, "locked": { "type": "boolean", "description": "Whether to lock or unlock the file to prevent AI from overwriting it during generation" } }, "required": ["name", "content"], "additionalProperties": false }, "minItems": 1, "description": "Array of files to update with their new content" } }, "required": ["files"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VersionDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat containing the version to update. Provided as a path parameter." }, { "name": "versionId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the version (block) to update. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] } }, "/chats/{chatId}/messages/{messageId}/resume": { "post": { "summary": "Resume Message", "description": "Resumes processing of a previously interrupted or incomplete message in a chat. Useful for continuing generation when a message was paused or stopped.", "operationId": "chats.resume", "tags": ["chats"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "chatId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the chat containing the message to resume. Provided as a path parameter." }, { "name": "messageId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The identifier of the specific message to resume. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] } }, "/deployments": { "get": { "summary": "Find Deployments", "description": "Find deployments by project and chat IDs. This will return a list of deployments for the given project and chat IDs.", "operationId": "deployments.find", "tags": ["deployments"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/DeploymentDetail" } } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "projectId", "in": "query", "required": true, "schema": { "type": "string", "description": "The ID of the project to find deployments for" }, "description": "The ID of the project to find deployments for" }, { "name": "chatId", "in": "query", "required": true, "schema": { "type": "string", "description": "The ID of the chat to find deployments for" }, "description": "The ID of the chat to find deployments for" }, { "name": "versionId", "in": "query", "required": true, "schema": { "type": "string", "description": "The ID of the version to find deployments for" }, "description": "The ID of the version to find deployments for" } ], "security": [ { "apiKey": [] } ] }, "post": { "summary": "Create Deployment", "description": "Create a new deployment for a specific chat and version. This will trigger a deployment to Vercel.", "operationId": "deployments.create", "tags": ["deployments"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "projectId": { "type": "string" }, "chatId": { "type": "string" }, "versionId": { "type": "string" } }, "required": ["projectId", "chatId", "versionId"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] } }, "/deployments/{deploymentId}": { "get": { "summary": "Get Deployment", "description": "Get a deployment by ID. This will return the details of the deployment, including the inspector URL, chat ID, project ID, version ID, API URL, and web URL.", "operationId": "deployments.getById", "tags": ["deployments"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeploymentDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "deploymentId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Path parameter \"deploymentId\"" } ], "security": [ { "apiKey": [] } ] }, "delete": { "summary": "Delete Deployment", "description": "Delete a deployment by ID. This will delete the deployment from Vercel.", "operationId": "deployments.delete", "tags": ["deployments"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "object": { "type": "string", "const": "deployment" }, "deleted": { "type": "boolean", "const": true } }, "required": ["id", "object", "deleted"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "deploymentId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Path parameter \"deploymentId\"" } ], "security": [ { "apiKey": [] } ] } }, "/deployments/{deploymentId}/logs": { "get": { "summary": "Find Deployment Logs", "description": "Retrieves logs for a specific deployment. Supports filtering by timestamp to fetch only recent logs.", "operationId": "deployments.findLogs", "tags": ["deployments"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "logs": { "type": "array", "items": { "type": "string" } }, "nextSince": { "type": "number" } }, "required": ["logs"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "deploymentId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the deployment to retrieve logs for. Provided as a path parameter." }, { "name": "since", "in": "query", "required": false, "schema": { "type": "number", "description": "A UNIX timestamp (in seconds) used to filter logs. Returns only log entries generated after the specified time." }, "description": "A UNIX timestamp (in seconds) used to filter logs. Returns only log entries generated after the specified time." } ], "security": [ { "apiKey": [] } ] } }, "/deployments/{deploymentId}/errors": { "get": { "summary": "Find Deployment Errors", "description": "Retrieves a list of errors that occurred during a specific deployment. Useful for diagnosing and debugging deployment issues.", "operationId": "deployments.findErrors", "tags": ["deployments"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "fullErrorText": { "type": "string" }, "errorType": { "type": "string" }, "formattedError": { "type": "string" } }, "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "deploymentId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the deployment to inspect for errors. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] } }, "/hooks": { "get": { "summary": "Find Hooks", "description": "Retrieves a list of existing hooks in your workspace. Useful for managing active webhooks tied to chat events or deployments.", "operationId": "hooks.find", "tags": ["hooks"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/HookSummary" } } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] }, "post": { "summary": "Create Hook", "description": "Creates a new webhook that listens for specific events. Supports optional association with a chat.", "operationId": "hooks.create", "tags": ["hooks"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "A human-readable name for the hook." }, "events": { "type": "array", "items": { "type": "string", "enum": [ "chat.created", "chat.updated", "chat.deleted", "message.created", "message.updated", "message.deleted", "message.finished" ] }, "description": "List of event types the hook should subscribe to." }, "chatId": { "type": "string", "description": "The ID of a chat to scope the hook to." }, "url": { "type": "string", "format": "uri", "description": "The target URL to receive the webhook payloads." } }, "required": ["name", "events", "url"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HookDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] } }, "/hooks/{hookId}": { "get": { "summary": "Get Hook", "description": "Retrieves the details of a specific webhook using its ID.", "operationId": "hooks.getById", "tags": ["hooks"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HookDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "hookId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the hook to retrieve." } ], "security": [ { "apiKey": [] } ] }, "patch": { "summary": "Update Hook", "description": "Updates the configuration of an existing webhook, including its name, event subscriptions, or target URL.", "operationId": "hooks.update", "tags": ["hooks"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "A new name for the hook." }, "events": { "type": "array", "items": { "type": "string", "enum": [ "chat.created", "chat.updated", "chat.deleted", "message.created", "message.updated", "message.deleted", "message.finished" ] }, "description": "Updated list of event types to subscribe to." }, "url": { "type": "string", "format": "uri", "description": "A new URL to send webhook payloads to." } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HookDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "hookId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the webhook to update. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] }, "delete": { "summary": "Delete Hook", "description": "Deletes a webhook based on its ID. This action is irreversible.", "operationId": "hooks.delete", "tags": ["hooks"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "object": { "type": "string", "const": "hook" }, "deleted": { "type": "boolean", "const": true } }, "required": ["id", "object", "deleted"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "hookId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the webhook to delete. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] } }, "/integrations/vercel/projects": { "get": { "summary": "Find Vercel Projects", "description": "Retrieves a list of Vercel projects linked to your integration. Useful for associating chats, deployments, or hooks with specific Vercel projects.", "operationId": "integrations.vercel.projects.find", "tags": ["integrations"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/VercelProjectDetail" } } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] }, "post": { "summary": "Create Vercel Project", "description": "Links a Vercel project to an existing v0 project. Enables Vercel-related features and deployment integration within the v0 workspace.", "operationId": "integrations.vercel.projects.create", "tags": ["integrations"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "projectId": { "type": "string", "description": "The ID of the v0 project to link to the new Vercel project." }, "name": { "type": "string", "description": "The name to assign to the new Vercel project." } }, "required": ["projectId", "name"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VercelProjectDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] } }, "/projects": { "get": { "summary": "Find Projects", "description": "Returns a list of all v0 projects in your workspace. Useful for browsing or managing projects across different chats or use cases.", "operationId": "projects.find", "tags": ["projects"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectSummary" } } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] }, "post": { "summary": "Create Project", "description": "Creates a new v0 project with an optional description, icon, environment variables, and instructions. Projects help organize chats and manage context.", "operationId": "projects.create", "tags": ["projects"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "maxLength": 255, "description": "The name of the project." }, "description": { "type": "string", "maxLength": 1000, "description": "A brief summary of the project’s purpose." }, "icon": { "type": "string", "default": "icon-wand-sparkles", "description": "An icon identifier to visually represent the project." }, "environmentVariables": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "maxLength": 255 }, "value": { "type": "string", "maxLength": 1000 } }, "required": ["key", "value"], "additionalProperties": false }, "description": "A list of key-value pairs used to define runtime variables for the project." }, "instructions": { "type": "string", "maxLength": 1000, "description": "Guidance or goals that provide context for the model when working within the project." }, "vercelProjectId": { "type": "string", "description": "The ID of an existing Vercel project to link to. If not provided, a new Vercel project will be created." }, "privacy": { "type": "string", "enum": ["private", "team"], "description": "The privacy setting for the project. For user accounts, this is always \"private\". For team/enterprise accounts, this can be either \"private\" or \"team\"." } }, "required": ["name"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] } }, "/projects/{projectId}": { "get": { "summary": "Get Project by ID", "description": "Retrieves the details of a specific v0 project by its ID.", "operationId": "projects.getById", "tags": ["projects"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the project to retrieve." } ], "security": [ { "apiKey": [] } ] }, "patch": { "summary": "Update Project", "description": "Updates the metadata of an existing project using its `projectId`. Supports changes to the project name and privacy setting.", "operationId": "projects.update", "tags": ["projects"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "A new name to assign to the project. Helps with identification and organization." }, "description": { "type": "string", "description": "A new description to assign to the project. Helps with identification and organization." }, "instructions": { "type": "string", "description": "Guidance or goals that provide context for the model when working within the project." }, "privacy": { "type": "string", "enum": ["private", "team"], "description": "The privacy setting for the project. For user accounts, this must be \"private\". For team/enterprise accounts, this can be either \"private\" or \"team\"." } }, "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the project to update. Provided as a path parameter." } ], "security": [ { "apiKey": [] } ] }, "delete": { "summary": "Delete Project", "description": "Deletes a specific project based on the provided projectId. This operation marks the project as deleted and is irreversible.", "operationId": "projects.delete", "tags": ["projects"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the deleted project." }, "object": { "type": "string", "const": "project", "description": "Fixed value identifying this object as a project." }, "deleted": { "type": "boolean", "const": true, "description": "Confirmation that the project has been deleted." } }, "required": ["id", "object", "deleted"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the project to delete. This must be passed as a path parameter in the URL." } ], "security": [ { "apiKey": [] } ] } }, "/projects/{projectId}/assign": { "post": { "summary": "Assign Project to Chat", "description": "Links an existing v0 project to a specific chat. Helps group conversations under a shared project context.", "operationId": "projects.assign", "tags": ["projects"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "type": "string", "description": "The ID of the chat to assign the project to." } }, "required": ["chatId"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "project" }, "id": { "type": "string" }, "assigned": { "type": "boolean", "const": true } }, "required": ["object", "id", "assigned"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The ID of the project to assign." } ], "security": [ { "apiKey": [] } ] } }, "/projects/{projectId}/env-vars": { "get": { "summary": "Find Environment Variables", "description": "Retrieves all environment variables for a given project.", "operationId": "projects.findEnvVars", "tags": ["projects"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/EnvironmentVariableSummarySchema" } } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the project whose environment variables should be retrieved." }, { "name": "decrypted", "in": "query", "required": false, "schema": { "type": "string", "enum": ["true", "false"], "description": "Whether to return decrypted values. Defaults to false (encrypted)." }, "description": "Whether to return decrypted values. Defaults to false (encrypted)." } ], "security": [ { "apiKey": [] } ] }, "post": { "summary": "Create Environment Variables", "description": "Creates new environment variables for a given project. This endpoint will fail if any of the specified environment variable keys already exist, unless upsert is set to true.", "operationId": "projects.createEnvVars", "tags": ["projects"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "environmentVariables": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "minLength": 1, "description": "The name of the environment variable." }, "value": { "type": "string", "description": "The value of the environment variable." } }, "required": ["key", "value"], "additionalProperties": false }, "minItems": 1, "description": "An array of environment variables to create with key and value fields." }, "upsert": { "type": "boolean", "description": "Whether to overwrite existing environment variables with the same keys. Defaults to false." } }, "required": ["environmentVariables"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/EnvironmentVariableSummarySchema" } } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the project where environment variables should be created." }, { "name": "decrypted", "in": "query", "required": false, "schema": { "type": "string", "enum": ["true", "false"], "description": "Whether to return decrypted values. Defaults to false (encrypted)." }, "description": "Whether to return decrypted values. Defaults to false (encrypted)." } ], "security": [ { "apiKey": [] } ] }, "patch": { "summary": "Update Environment Variables", "description": "Updates multiple environment variables for a given project. Only the value of each environment variable can be updated.", "operationId": "projects.updateEnvVars", "tags": ["projects"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "environmentVariables": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the environment variable to update." }, "value": { "type": "string", "description": "The new value of the environment variable." } }, "required": ["id", "value"], "additionalProperties": false }, "minItems": 1, "description": "An array of environment variables to update with id and value fields." } }, "required": ["environmentVariables"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/EnvironmentVariableSummarySchema" } } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the project whose environment variables should be updated." }, { "name": "decrypted", "in": "query", "required": false, "schema": { "type": "string", "enum": ["true", "false"], "description": "Whether to return decrypted values. Defaults to false (encrypted)." }, "description": "Whether to return decrypted values. Defaults to false (encrypted)." } ], "security": [ { "apiKey": [] } ] } }, "/projects/{projectId}/env-vars/delete": { "post": { "summary": "Delete Environment Variables", "description": "Deletes multiple environment variables for a given project by their IDs.", "operationId": "projects.deleteEnvVars", "tags": ["projects"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "environmentVariableIds": { "type": "array", "items": { "type": "string", "description": "The unique identifier of the environment variable to delete." }, "minItems": 1, "description": "An array of environment variable IDs to delete." } }, "required": ["environmentVariableIds"], "additionalProperties": false } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "object": { "type": "string", "const": "environment_variable" }, "deleted": { "type": "boolean", "const": true } }, "required": ["id", "object", "deleted"], "additionalProperties": false } } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the project whose environment variables should be deleted." } ], "security": [ { "apiKey": [] } ] } }, "/projects/{projectId}/env-vars/{environmentVariableId}": { "get": { "summary": "Get Environment Variable", "description": "Retrieves a specific environment variable for a given project by its ID, including its value.", "operationId": "projects.getEnvVar", "tags": ["projects"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "environment_variable" }, "data": { "$ref": "#/components/schemas/EnvironmentVariableDetailSchema" } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the project that owns the environment variable." }, { "name": "environmentVariableId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the environment variable to retrieve." }, { "name": "decrypted", "in": "query", "required": false, "schema": { "type": "string", "enum": ["true", "false"], "description": "Whether to return decrypted values. Defaults to false (encrypted)." }, "description": "Whether to return decrypted values. Defaults to false (encrypted)." } ], "security": [ { "apiKey": [] } ] } }, "/rate-limits": { "get": { "summary": "Find Rate Limit", "description": "Retrieves rate limit information for a given scope. Useful for monitoring usage limits and avoiding throttling.", "operationId": "rateLimits.find", "tags": ["rateLimits"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "remaining": { "type": "number" }, "reset": { "type": "number" }, "limit": { "type": "number" } }, "required": ["limit"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "scope", "in": "query", "required": false, "schema": { "type": "string", "description": "The context or namespace to check rate limits for (e.g., a project slug or feature area)." }, "description": "The context or namespace to check rate limits for (e.g., a project slug or feature area)." } ], "security": [ { "apiKey": [] } ] } }, "/user": { "get": { "summary": "Get User", "description": "Retrieves information about the authenticated user, including their ID, name, email, and account metadata.", "operationId": "user.get", "tags": ["user"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDetail" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] } }, "/user/billing": { "get": { "summary": "Get Billing", "description": "Fetches billing usage and quota information for the authenticated user. Can be scoped to a specific context (e.g. project or namespace).", "operationId": "user.getBilling", "tags": ["user"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "billingType": { "type": "string", "const": "token" }, "data": { "type": "object", "properties": { "plan": { "type": "string" }, "billingMode": { "type": "string", "const": "test" }, "role": { "type": "string" }, "billingCycle": { "type": "object", "properties": { "start": { "type": "number" }, "end": { "type": "number" } }, "required": ["start", "end"], "additionalProperties": false }, "balance": { "type": "object", "properties": { "remaining": { "type": "number" }, "total": { "type": "number" } }, "required": ["remaining", "total"], "additionalProperties": false }, "onDemand": { "type": "object", "properties": { "balance": { "type": "number" }, "blocks": { "type": "array", "items": { "type": "object", "properties": { "expirationDate": { "type": "number" }, "effectiveDate": { "type": "number" }, "originalBalance": { "type": "number" }, "currentBalance": { "type": "number" } }, "required": [ "effectiveDate", "originalBalance", "currentBalance" ], "additionalProperties": false } } }, "required": ["balance"], "additionalProperties": false } }, "required": [ "plan", "role", "billingCycle", "balance", "onDemand" ], "additionalProperties": false } }, "required": ["billingType", "data"], "additionalProperties": false }, { "type": "object", "properties": { "billingType": { "type": "string", "const": "legacy" }, "data": { "type": "object", "properties": { "remaining": { "type": "number" }, "reset": { "type": "number" }, "limit": { "type": "number" } }, "required": ["limit"], "additionalProperties": false } }, "required": ["billingType", "data"], "additionalProperties": false } ] } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "parameters": [ { "name": "scope", "in": "query", "required": false, "schema": { "type": "string", "description": "Filters billing data by a specific scope, such as a project ID or slug." }, "description": "Filters billing data by a specific scope, such as a project ID or slug." } ], "security": [ { "apiKey": [] } ] } }, "/user/plan": { "get": { "summary": "Get Plan", "description": "Returns the current subscription plan for the authenticated user, including tier details and feature limits.", "operationId": "user.getPlan", "tags": ["user"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "plan" }, "plan": { "type": "string" }, "billingCycle": { "type": "object", "properties": { "start": { "type": "number" }, "end": { "type": "number" } }, "required": ["start", "end"], "additionalProperties": false }, "balance": { "type": "object", "properties": { "remaining": { "type": "number" }, "total": { "type": "number" } }, "required": ["remaining", "total"], "additionalProperties": false } }, "required": ["object", "plan", "billingCycle", "balance"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] } }, "/user/scopes": { "get": { "summary": "Get User Scopes", "description": "Retrieves all accessible scopes for the authenticated user, such as personal workspaces or shared teams.", "operationId": "user.getScopes", "tags": ["user"], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/ScopeSummary" } } }, "required": ["object", "data"], "additionalProperties": false } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unauthorized_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "forbidden_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "not_found_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "409": { "description": "Conflict", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "conflict_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "413": { "description": "Payload Too Large", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "payload_too_large_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "unprocessable_entity_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "too_many_requests_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "object", "properties": { "message": { "type": "string" }, "type": { "type": "string", "const": "internal_server_error" } }, "required": ["message", "type"], "additionalProperties": false } }, "required": ["error"], "additionalProperties": false } } } } }, "security": [ { "apiKey": [] } ] } } }, "components": { "schemas": { "ChatDetail": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the chat." }, "object": { "type": "string", "const": "chat", "description": "Fixed value identifying this object as a chat." }, "shareable": { "type": "boolean", "description": "Indicates whether the chat can be shared via public link." }, "privacy": { "type": "string", "enum": ["public", "private", "team", "team-edit", "unlisted"], "description": "Defines the visibility of the chat—private, team-only, or public." }, "name": { "type": "string", "description": "An optional name assigned to the chat by the user." }, "title": { "type": "string", "description": "Deprecated title field preserved for backward compatibility.", "deprecated": true }, "createdAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp representing when the chat was created." }, "updatedAt": { "type": "string", "description": "The ISO timestamp of the last update to the chat." }, "favorite": { "type": "boolean", "description": "Indicates whether the chat is marked as a favorite." }, "authorId": { "type": "string", "description": "The ID of the user who created the chat." }, "projectId": { "type": "string", "description": "Optional ID of the v0 project associated with this chat." }, "webUrl": { "type": "string", "description": "Web URL to view this chat in the browser." }, "apiUrl": { "type": "string", "description": "API URL to access this chat via the API." }, "latestVersion": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the version." }, "object": { "type": "string", "const": "version", "description": "Fixed value identifying this object as a version." }, "status": { "type": "string", "enum": ["pending", "completed", "failed"], "description": "The current status of the version generation process." }, "demoUrl": { "type": "string", "description": "Optional URL for previewing the generated output." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was created, in ISO 8601 format." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was last updated, in ISO 8601 format." }, "files": { "type": "array", "items": { "type": "object", "properties": { "object": { "type": "string", "const": "file", "description": "Fixed value identifying this object as a file." }, "name": { "type": "string", "description": "The name of the file, including its extension." }, "content": { "type": "string", "description": "The full contents of the file as a raw string." }, "locked": { "type": "boolean", "description": "Whether the file is locked to prevent AI from overwriting it during new version generation." } }, "required": ["object", "name", "content", "locked"], "additionalProperties": false, "description": "Detailed representation of a file, including its content and lock status." }, "description": "A list of files that were generated or included in this version." } }, "required": ["id", "object", "status", "createdAt", "files"], "additionalProperties": false, "description": "Full details of the most recent generated version, if available." }, "url": { "type": "string", "description": "The canonical URL to access this chat.", "deprecated": true }, "messages": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the message." }, "object": { "type": "string", "const": "message", "description": "Fixed value identifying this object as a message." }, "content": { "type": "string", "description": "The main text content of the message." }, "experimental_content": { "type": "array", "items": { "anyOf": [ { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number", "const": 0 }, { "type": "array", "items": {} } ], "description": "AST content section containing parsed markdown/MDX nodes" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number", "const": 1 }, { "type": "object", "properties": { "title": { "type": "string" } }, "additionalProperties": true } ], "description": "Metadata section containing title and other properties" } ] }, "description": "The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change." }, "createdAt": { "type": "string", "description": "The ISO timestamp representing when the message was created." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp representing when the message was last updated." }, "type": { "type": "string", "enum": [ "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" ], "description": "Indicates the format or category of the message, such as plain text or code." }, "role": { "type": "string", "enum": ["user", "assistant"], "description": "Specifies whether the message was sent by the user or the assistant." }, "finishReason": { "type": "string", "enum": [ "stop", "length", "content-filter", "tool-calls", "error", "other", "unknown" ], "description": "The reason why the message generation finished." }, "apiUrl": { "type": "string", "description": "API URL to access this message via the API." } }, "required": [ "id", "object", "content", "createdAt", "type", "role", "apiUrl" ], "additionalProperties": false, "description": "Summary of a single message within a chat, including role, content, type, timestamp, and API URL." }, "description": "All messages exchanged in the chat, including user and assistant entries." }, "files": { "type": "array", "items": { "type": "object", "properties": { "lang": { "type": "string", "description": "Programming language used in the file (e.g., JavaScript, Python)." }, "meta": { "type": "object", "additionalProperties": { "type": "string" }, "description": "A key-value map of metadata associated with the file (e.g., path, type)." }, "source": { "type": "string", "description": "The origin or identifier of the file source (e.g., path or upload label)." } }, "required": ["lang", "meta", "source"], "additionalProperties": false }, "description": "Optional array of files associated with the chat context." }, "demo": { "type": "string", "description": "Deprecated demo URL used for previewing the chat result.", "deprecated": true }, "text": { "type": "string", "description": "The main user prompt or instruction that started the chat." }, "modelConfiguration": { "type": "object", "properties": { "modelId": { "type": "string", "enum": ["v0-1.5-sm", "v0-1.5-md", "v0-1.5-lg", "v0-gpt-5"] }, "imageGenerations": { "type": "boolean", "default": false }, "thinking": { "type": "boolean", "default": false } }, "required": ["modelId"], "additionalProperties": false, "description": "The configuration used to generate responses in this chat." } }, "required": [ "id", "object", "shareable", "privacy", "createdAt", "favorite", "authorId", "webUrl", "apiUrl", "url", "messages", "text" ], "additionalProperties": false, "description": "Detailed representation of a chat, including its messages, files, versions, and model configuration." }, "ChatSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the chat." }, "object": { "type": "string", "const": "chat", "description": "Fixed value identifying this object as a chat." }, "shareable": { "type": "boolean", "description": "Indicates whether the chat can be shared via public link." }, "privacy": { "type": "string", "enum": ["public", "private", "team", "team-edit", "unlisted"], "description": "Defines the visibility of the chat—private, team-only, or public." }, "name": { "type": "string", "description": "An optional name assigned to the chat by the user." }, "title": { "type": "string", "description": "Deprecated title field preserved for backward compatibility.", "deprecated": true }, "createdAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp representing when the chat was created." }, "updatedAt": { "type": "string", "description": "The ISO timestamp of the last update to the chat." }, "favorite": { "type": "boolean", "description": "Indicates whether the chat is marked as a favorite." }, "authorId": { "type": "string", "description": "The ID of the user who created the chat." }, "projectId": { "type": "string", "description": "Optional ID of the v0 project associated with this chat." }, "webUrl": { "type": "string", "description": "Web URL to view this chat in the browser." }, "apiUrl": { "type": "string", "description": "API URL to access this chat via the API." }, "latestVersion": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the version." }, "object": { "type": "string", "const": "version", "description": "Fixed value identifying this object as a version." }, "status": { "type": "string", "enum": ["pending", "completed", "failed"], "description": "The current status of the version generation process." }, "demoUrl": { "type": "string", "description": "Optional URL for previewing the generated output." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was created, in ISO 8601 format." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was last updated, in ISO 8601 format." } }, "required": ["id", "object", "status", "createdAt"], "additionalProperties": false, "description": "The most recent generated version of the chat, if available." } }, "required": [ "id", "object", "shareable", "privacy", "createdAt", "favorite", "authorId", "webUrl", "apiUrl" ], "additionalProperties": false, "description": "Summary of a chat, including metadata like privacy, author, latest version, and URLs." }, "DeploymentDetail": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the deployment." }, "object": { "type": "string", "const": "deployment", "description": "Fixed value identifying this object as a deployment." }, "inspectorUrl": { "type": "string", "description": "URL to the deployment inspector." }, "chatId": { "type": "string", "description": "The ID of the chat that this deployment is scoped to." }, "projectId": { "type": "string", "description": "The ID of the project that this deployment is scoped to." }, "versionId": { "type": "string", "description": "The ID of the version that this deployment is scoped to." }, "apiUrl": { "type": "string", "format": "uri", "description": "The API endpoint URL for accessing this deployment programmatically." }, "webUrl": { "type": "string", "format": "uri", "description": "The web URL where the deployment can be viewed or managed." } }, "required": [ "id", "object", "inspectorUrl", "chatId", "projectId", "versionId", "apiUrl", "webUrl" ], "additionalProperties": false }, "DeploymentSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the deployment." }, "object": { "type": "string", "const": "deployment", "description": "Fixed value identifying this object as a deployment." }, "inspectorUrl": { "type": "string", "description": "URL to the deployment inspector." }, "chatId": { "type": "string", "description": "The ID of the chat that this deployment is scoped to." }, "projectId": { "type": "string", "description": "The ID of the project that this deployment is scoped to." }, "versionId": { "type": "string", "description": "The ID of the version that this deployment is scoped to." }, "apiUrl": { "type": "string", "format": "uri", "description": "The API endpoint URL for accessing this deployment programmatically." }, "webUrl": { "type": "string", "format": "uri", "description": "The web URL where the deployment can be viewed or managed." } }, "required": [ "id", "object", "inspectorUrl", "chatId", "projectId", "versionId", "apiUrl", "webUrl" ], "additionalProperties": false }, "EnvironmentVariableDetailSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the environment variable." }, "object": { "type": "string", "const": "environment_variable", "description": "The object type." }, "key": { "type": "string", "description": "The name of the environment variable." }, "value": { "type": "string", "description": "The value of the environment variable." }, "decrypted": { "type": "boolean", "description": "Whether the value is decrypted or encrypted." }, "createdAt": { "type": "number", "description": "The timestamp when the environment variable was created." }, "updatedAt": { "type": "number", "description": "The timestamp when the environment variable was last updated." } }, "required": ["id", "object", "key", "value", "decrypted", "createdAt"], "additionalProperties": false, "description": "Detailed information for an environment variable including its value." }, "EnvironmentVariableSummarySchema": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the environment variable." }, "object": { "type": "string", "const": "environment_variable", "description": "The object type." }, "key": { "type": "string", "description": "The name of the environment variable." }, "value": { "type": "string", "description": "The value of the environment variable." }, "decrypted": { "type": "boolean", "description": "Whether the value is decrypted or encrypted." }, "createdAt": { "type": "number", "description": "The timestamp when the environment variable was created." }, "updatedAt": { "type": "number", "description": "The timestamp when the environment variable was last updated." } }, "required": ["id", "object", "key", "value", "decrypted", "createdAt"], "additionalProperties": false, "description": "Summary information for an environment variable." }, "EnvironmentVariablesListSchema": { "type": "object", "properties": { "object": { "type": "string", "const": "list", "description": "Fixed value identifying this as a list response." }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the environment variable." }, "object": { "type": "string", "const": "environment_variable", "description": "The object type." }, "key": { "type": "string", "description": "The name of the environment variable." }, "value": { "type": "string", "description": "The value of the environment variable." }, "decrypted": { "type": "boolean", "description": "Whether the value is decrypted or encrypted." }, "createdAt": { "type": "number", "description": "The timestamp when the environment variable was created." }, "updatedAt": { "type": "number", "description": "The timestamp when the environment variable was last updated." } }, "required": [ "id", "object", "key", "value", "decrypted", "createdAt" ], "additionalProperties": false, "description": "Detailed information for an environment variable including its value." }, "description": "Array of environment variable details." } }, "required": ["object", "data"], "additionalProperties": false, "description": "List response containing environment variables." }, "FileDetail": { "type": "object", "properties": { "object": { "type": "string", "const": "file", "description": "Fixed value identifying this object as a file." }, "name": { "type": "string", "description": "The name of the file, including its extension." }, "content": { "type": "string", "description": "The full contents of the file as a raw string." }, "locked": { "type": "boolean", "description": "Whether the file is locked to prevent AI from overwriting it during new version generation." } }, "required": ["object", "name", "content", "locked"], "additionalProperties": false, "description": "Detailed representation of a file, including its content and lock status." }, "FileSummary": { "type": "object", "properties": { "object": { "type": "string", "const": "file", "description": "Fixed value identifying this object as a file." }, "name": { "type": "string", "description": "The name of the file, including its extension." } }, "required": ["object", "name"], "additionalProperties": false, "description": "Basic metadata about a file, such as its type and name." }, "HookDetail": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the webhook." }, "object": { "type": "string", "const": "hook", "description": "Fixed value identifying this object as a webhook." }, "name": { "type": "string", "description": "A user-defined name to label the webhook." }, "events": { "type": "array", "items": { "type": "string", "enum": [ "chat.created", "chat.updated", "chat.deleted", "message.created", "message.updated", "message.deleted", "message.finished" ] }, "description": "List of event types this webhook is subscribed to." }, "chatId": { "type": "string", "description": "Optional ID of the chat that this webhook is scoped to." }, "url": { "type": "string", "description": "Target URL that receives event payloads for this webhook." } }, "required": ["id", "object", "name", "events", "url"], "additionalProperties": false, "description": "Full configuration details for a webhook, including its scope and subscription." }, "HookEventDetail": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the webhook event log entry." }, "object": { "type": "string", "const": "hook_event", "description": "Fixed value identifying this object as a webhook event." }, "event": { "type": "string", "enum": [ "chat.created", "chat.updated", "chat.deleted", "message.created", "message.updated", "message.deleted", "message.finished" ], "description": "The type of event that triggered the webhook." }, "status": { "type": "string", "enum": ["pending", "success", "error"], "default": "pending", "description": "The delivery status of the webhook (e.g., delivered, failed)." }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp of when the webhook event was triggered." } }, "required": ["id", "object", "event", "createdAt"], "additionalProperties": false, "description": "Detailed record of a webhook event, including its type, status, and timestamp." }, "HookSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the webhook." }, "object": { "type": "string", "const": "hook", "description": "Fixed value identifying this object as a webhook." }, "name": { "type": "string", "description": "A user-defined name to label the webhook." } }, "required": ["id", "object", "name"], "additionalProperties": false, "description": "Summary of a webhook, including its ID and display name." }, "IntegrationConnectionDetailSchema": { "type": "object", "properties": { "object": { "type": "string", "const": "integration_connection", "description": "The object type." }, "id": { "type": "string", "description": "The unique ID of the integration connection (format: {projectId}_{integrationId})." }, "connected": { "type": "boolean", "description": "Whether the integration is connected to the project." }, "integration": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the integration." }, "object": { "type": "string", "const": "integration", "description": "The object type." }, "slug": { "type": "string", "description": "The slug of the integration." }, "name": { "type": "string", "description": "The name of the integration." } }, "required": ["id", "object", "slug", "name"], "additionalProperties": false, "description": "Information about the connected integration." }, "metadata": { "type": "object", "additionalProperties": {}, "description": "Additional metadata about the integration connection." } }, "required": ["object", "id", "connected", "integration"], "additionalProperties": false, "description": "Detailed information about an integration connection to a project." }, "IntegrationConnectionListSchema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "type": "object", "properties": { "object": { "type": "string", "const": "integration_connection", "description": "The object type." }, "id": { "type": "string", "description": "The unique ID of the integration connection (format: {projectId}_{integrationId})." }, "connected": { "type": "boolean", "description": "Whether the integration is connected to the project." }, "integration": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the integration." }, "object": { "type": "string", "const": "integration", "description": "The object type." }, "slug": { "type": "string", "description": "The slug of the integration." }, "name": { "type": "string", "description": "The name of the integration." } }, "required": ["id", "object", "slug", "name"], "additionalProperties": false, "description": "Information about the connected integration." } }, "required": ["object", "id", "connected", "integration"], "additionalProperties": false, "description": "Summary information about an integration connection to a project." } } }, "required": ["object", "data"], "additionalProperties": false, "description": "List response containing integration connections." }, "IntegrationConnectionSummarySchema": { "type": "object", "properties": { "object": { "type": "string", "const": "integration_connection", "description": "The object type." }, "id": { "type": "string", "description": "The unique ID of the integration connection (format: {projectId}_{integrationId})." }, "connected": { "type": "boolean", "description": "Whether the integration is connected to the project." }, "integration": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the integration." }, "object": { "type": "string", "const": "integration", "description": "The object type." }, "slug": { "type": "string", "description": "The slug of the integration." }, "name": { "type": "string", "description": "The name of the integration." } }, "required": ["id", "object", "slug", "name"], "additionalProperties": false, "description": "Information about the connected integration." } }, "required": ["object", "id", "connected", "integration"], "additionalProperties": false, "description": "Summary information about an integration connection to a project." }, "IntegrationDetailSchema": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the integration." }, "object": { "type": "string", "const": "integration", "description": "The object type." }, "slug": { "type": "string", "description": "The slug of the integration." }, "name": { "type": "string", "description": "The name of the integration." }, "description": { "type": "string", "description": "A short description of the integration." }, "iconUrl": { "type": "string", "description": "URL to the integration icon." } }, "required": ["id", "object", "slug", "name", "description", "iconUrl"], "additionalProperties": false, "description": "Detailed information about an integration." }, "IntegrationListSchema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the integration." }, "object": { "type": "string", "const": "integration", "description": "The object type." }, "slug": { "type": "string", "description": "The slug of the integration." }, "name": { "type": "string", "description": "The name of the integration." }, "description": { "type": "string", "description": "A short description of the integration." }, "iconUrl": { "type": "string", "description": "URL to the integration icon." } }, "required": [ "id", "object", "slug", "name", "description", "iconUrl" ], "additionalProperties": false, "description": "Detailed information about an integration." } } }, "required": ["object", "data"], "additionalProperties": false, "description": "List of available integrations." }, "IntegrationSummarySchema": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the integration." }, "object": { "type": "string", "const": "integration", "description": "The object type." }, "slug": { "type": "string", "description": "The slug of the integration." }, "name": { "type": "string", "description": "The name of the integration." } }, "required": ["id", "object", "slug", "name"], "additionalProperties": false, "description": "Basic information about an integration." }, "MessageDetail": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the message." }, "object": { "type": "string", "const": "message", "description": "Fixed value identifying this object as a message." }, "content": { "type": "string", "description": "The main text content of the message." }, "experimental_content": { "type": "array", "items": { "anyOf": [ { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number", "const": 0 }, { "type": "array", "items": {} } ], "description": "AST content section containing parsed markdown/MDX nodes" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number", "const": 1 }, { "type": "object", "properties": { "title": { "type": "string" } }, "additionalProperties": true } ], "description": "Metadata section containing title and other properties" } ] }, "description": "The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change." }, "createdAt": { "type": "string", "description": "The ISO timestamp representing when the message was created." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp representing when the message was last updated." }, "type": { "type": "string", "enum": [ "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" ], "description": "Indicates the format or category of the message, such as plain text or code." }, "role": { "type": "string", "enum": ["user", "assistant"], "description": "Specifies whether the message was sent by the user or the assistant." }, "finishReason": { "type": "string", "enum": [ "stop", "length", "content-filter", "tool-calls", "error", "other", "unknown" ], "description": "The reason why the message generation finished." }, "apiUrl": { "type": "string", "description": "API URL to access this message via the API." }, "chatId": { "type": "string", "description": "The ID of the chat to which this message belongs." } }, "required": [ "id", "object", "content", "createdAt", "type", "role", "apiUrl", "chatId" ], "additionalProperties": false, "description": "Detailed message object extending MessageSummary with chat metadata." }, "MessageSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the message." }, "object": { "type": "string", "const": "message", "description": "Fixed value identifying this object as a message." }, "content": { "type": "string", "description": "The main text content of the message." }, "experimental_content": { "type": "array", "items": { "anyOf": [ { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number", "const": 0 }, { "type": "array", "items": {} } ], "description": "AST content section containing parsed markdown/MDX nodes" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number", "const": 1 }, { "type": "object", "properties": { "title": { "type": "string" } }, "additionalProperties": true } ], "description": "Metadata section containing title and other properties" } ] }, "description": "The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change." }, "createdAt": { "type": "string", "description": "The ISO timestamp representing when the message was created." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp representing when the message was last updated." }, "type": { "type": "string", "enum": [ "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" ], "description": "Indicates the format or category of the message, such as plain text or code." }, "role": { "type": "string", "enum": ["user", "assistant"], "description": "Specifies whether the message was sent by the user or the assistant." }, "finishReason": { "type": "string", "enum": [ "stop", "length", "content-filter", "tool-calls", "error", "other", "unknown" ], "description": "The reason why the message generation finished." }, "apiUrl": { "type": "string", "description": "API URL to access this message via the API." } }, "required": [ "id", "object", "content", "createdAt", "type", "role", "apiUrl" ], "additionalProperties": false, "description": "Summary of a single message within a chat, including role, content, type, timestamp, and API URL." }, "MessageSummaryList": { "type": "object", "properties": { "object": { "type": "string", "const": "list", "description": "Fixed value identifying this as a list response." }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the message." }, "object": { "type": "string", "const": "message", "description": "Fixed value identifying this object as a message." }, "content": { "type": "string", "description": "The main text content of the message." }, "experimental_content": { "type": "array", "items": { "anyOf": [ { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number", "const": 0 }, { "type": "array", "items": {} } ], "description": "AST content section containing parsed markdown/MDX nodes" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "number", "const": 1 }, { "type": "object", "properties": { "title": { "type": "string" } }, "additionalProperties": true } ], "description": "Metadata section containing title and other properties" } ] }, "description": "The parsed content of the message as an array structure containing AST nodes. This is an experimental field that may change." }, "createdAt": { "type": "string", "description": "The ISO timestamp representing when the message was created." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp representing when the message was last updated." }, "type": { "type": "string", "enum": [ "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" ], "description": "Indicates the format or category of the message, such as plain text or code." }, "role": { "type": "string", "enum": ["user", "assistant"], "description": "Specifies whether the message was sent by the user or the assistant." }, "finishReason": { "type": "string", "enum": [ "stop", "length", "content-filter", "tool-calls", "error", "other", "unknown" ], "description": "The reason why the message generation finished." }, "apiUrl": { "type": "string", "description": "API URL to access this message via the API." } }, "required": [ "id", "object", "content", "createdAt", "type", "role", "apiUrl" ], "additionalProperties": false, "description": "Summary of a single message within a chat, including role, content, type, timestamp, and API URL." }, "description": "Array of message summaries in this page of results." }, "pagination": { "type": "object", "properties": { "hasMore": { "type": "boolean", "description": "Indicates if there are more results available beyond this page." }, "nextCursor": { "type": "string", "description": "Cursor for fetching the next page of results." }, "nextUrl": { "type": "string", "description": "API URL for retrieving the next page of results." } }, "required": ["hasMore"], "additionalProperties": false, "description": "Pagination metadata for navigating through multiple pages of results." } }, "required": ["object", "data", "pagination"], "additionalProperties": false, "description": "List response containing multiple message summaries with cursor-based pagination." }, "ProductDetailSchema": { "type": "object", "properties": { "object": { "type": "string", "const": "product", "description": "The object type." }, "id": { "type": "string", "description": "The unique ID of the product." }, "slug": { "type": "string", "description": "The URL-friendly slug of the product." }, "name": { "type": "string", "description": "The name of the product." }, "description": { "type": "string", "description": "A short description of the product." }, "iconUrl": { "type": "string", "description": "URL to the product icon." }, "iconBackgroundColor": { "type": "string", "description": "Background color for the product icon." } }, "required": ["object", "id", "slug", "name", "description", "iconUrl"], "additionalProperties": false, "description": "Detailed information about a marketplace or store product." }, "ProductListSchema": { "type": "object", "properties": { "object": { "type": "string", "const": "list" }, "data": { "type": "array", "items": { "type": "object", "properties": { "object": { "type": "string", "const": "product", "description": "The object type." }, "id": { "type": "string", "description": "The unique ID of the product." }, "slug": { "type": "string", "description": "The URL-friendly slug of the product." }, "name": { "type": "string", "description": "The name of the product." }, "description": { "type": "string", "description": "A short description of the product." }, "iconUrl": { "type": "string", "description": "URL to the product icon." } }, "required": [ "object", "id", "slug", "name", "description", "iconUrl" ], "additionalProperties": false, "description": "Summary information about a marketplace or store product." } } }, "required": ["object", "data"], "additionalProperties": false, "description": "List of available marketplace and store products." }, "ProductSummarySchema": { "type": "object", "properties": { "object": { "type": "string", "const": "product", "description": "The object type." }, "id": { "type": "string", "description": "The unique ID of the product." }, "slug": { "type": "string", "description": "The URL-friendly slug of the product." }, "name": { "type": "string", "description": "The name of the product." }, "description": { "type": "string", "description": "A short description of the product." }, "iconUrl": { "type": "string", "description": "URL to the product icon." } }, "required": ["object", "id", "slug", "name", "description", "iconUrl"], "additionalProperties": false, "description": "Summary information about a marketplace or store product." }, "ProjectDetail": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the project." }, "object": { "type": "string", "const": "project", "description": "Fixed value identifying this object as a project." }, "name": { "type": "string", "description": "The name of the project as defined by the user." }, "privacy": { "type": "string", "enum": ["private", "team"], "description": "The privacy setting for the project - either private or team." }, "vercelProjectId": { "type": "string", "description": "Optional ID of the linked Vercel project, if connected." }, "createdAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp representing when the project was created." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp of the most recent update, if available." }, "apiUrl": { "type": "string", "format": "uri", "description": "The API endpoint URL for accessing this project programmatically." }, "webUrl": { "type": "string", "format": "uri", "description": "The web URL where the project can be viewed or managed." }, "description": { "type": "string", "description": "The description of the project." }, "instructions": { "type": "string", "description": "The instructions for the project." }, "chats": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the chat." }, "object": { "type": "string", "const": "chat", "description": "Fixed value identifying this object as a chat." }, "shareable": { "type": "boolean", "description": "Indicates whether the chat can be shared via public link." }, "privacy": { "type": "string", "enum": [ "public", "private", "team", "team-edit", "unlisted" ], "description": "Defines the visibility of the chat—private, team-only, or public." }, "name": { "type": "string", "description": "An optional name assigned to the chat by the user." }, "title": { "type": "string", "description": "Deprecated title field preserved for backward compatibility.", "deprecated": true }, "createdAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp representing when the chat was created." }, "updatedAt": { "type": "string", "description": "The ISO timestamp of the last update to the chat." }, "favorite": { "type": "boolean", "description": "Indicates whether the chat is marked as a favorite." }, "authorId": { "type": "string", "description": "The ID of the user who created the chat." }, "projectId": { "type": "string", "description": "Optional ID of the v0 project associated with this chat." }, "webUrl": { "type": "string", "description": "Web URL to view this chat in the browser." }, "apiUrl": { "type": "string", "description": "API URL to access this chat via the API." }, "latestVersion": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the version." }, "object": { "type": "string", "const": "version", "description": "Fixed value identifying this object as a version." }, "status": { "type": "string", "enum": ["pending", "completed", "failed"], "description": "The current status of the version generation process." }, "demoUrl": { "type": "string", "description": "Optional URL for previewing the generated output." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was created, in ISO 8601 format." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was last updated, in ISO 8601 format." } }, "required": ["id", "object", "status", "createdAt"], "additionalProperties": false, "description": "The most recent generated version of the chat, if available." } }, "required": [ "id", "object", "shareable", "privacy", "createdAt", "favorite", "authorId", "webUrl", "apiUrl" ], "additionalProperties": false, "description": "Summary of a chat, including metadata like privacy, author, latest version, and URLs." }, "description": "List of all chats that are associated with this project." } }, "required": [ "id", "object", "name", "privacy", "createdAt", "apiUrl", "webUrl", "chats" ], "additionalProperties": false, "description": "Full representation of a project, including its associated chats." }, "ProjectSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the project." }, "object": { "type": "string", "const": "project", "description": "Fixed value identifying this object as a project." }, "name": { "type": "string", "description": "The name of the project as defined by the user." }, "privacy": { "type": "string", "enum": ["private", "team"], "description": "The privacy setting for the project - either private or team." }, "vercelProjectId": { "type": "string", "description": "Optional ID of the linked Vercel project, if connected." }, "createdAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp representing when the project was created." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp of the most recent update, if available." }, "apiUrl": { "type": "string", "format": "uri", "description": "The API endpoint URL for accessing this project programmatically." }, "webUrl": { "type": "string", "format": "uri", "description": "The web URL where the project can be viewed or managed." } }, "required": [ "id", "object", "name", "privacy", "createdAt", "apiUrl", "webUrl" ], "additionalProperties": false, "description": "Summary of a project, including metadata, timestamps, and optional Vercel linkage." }, "ScopeSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the scope (e.g., user or team workspace)." }, "object": { "type": "string", "const": "scope", "description": "Fixed value identifying this object as a scope." }, "name": { "type": "string", "description": "An optional human-readable name for the scope." } }, "required": ["id", "object"], "additionalProperties": false, "description": "Basic information about a workspace or identity context for projects and chats." }, "SearchResultItem": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique ID of the item returned in the search result." }, "object": { "type": "string", "enum": ["chat", "project"], "description": "Type of item returned, either 'chat' or 'project'." }, "name": { "type": "string", "description": "The display name of the item." }, "createdAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp representing when the item was created." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The ISO timestamp of the last update to the item." }, "apiUrl": { "type": "string", "description": "API endpoint for accessing the item programmatically." }, "webUrl": { "type": "string", "description": "Web URL for viewing the item in the interface." } }, "required": ["id", "object", "name", "createdAt", "apiUrl", "webUrl"], "additionalProperties": false, "description": "Generic result returned from a search query, representing either a chat or a project." }, "UserDetail": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the user." }, "object": { "type": "string", "const": "user", "description": "Fixed value identifying this object as a user." }, "name": { "type": "string", "description": "Optional full name of the user." }, "email": { "type": "string", "description": "The user’s email address." }, "avatar": { "type": "string", "description": "URL to the user’s avatar image." } }, "required": ["id", "object", "email", "avatar"], "additionalProperties": false, "description": "Details of the authenticated user, including profile and contact information." }, "VercelProjectDetail": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the linked Vercel project." }, "object": { "type": "string", "const": "vercel_project", "description": "Fixed value identifying this object as a Vercel project." }, "name": { "type": "string", "description": "The name of the Vercel project." } }, "required": ["id", "object", "name"], "additionalProperties": false, "description": "Basic metadata about a Vercel project connected to a v0 project." }, "VercelProjectSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the linked Vercel project." }, "object": { "type": "string", "const": "vercel_project", "description": "Fixed value identifying this object as a Vercel project." }, "name": { "type": "string", "description": "The name of the Vercel project." } }, "required": ["id", "object", "name"], "additionalProperties": false, "description": "Basic metadata about a Vercel project connected to a v0 project." }, "VersionDetail": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the version." }, "object": { "type": "string", "const": "version", "description": "Fixed value identifying this object as a version." }, "status": { "type": "string", "enum": ["pending", "completed", "failed"], "description": "The current status of the version generation process." }, "demoUrl": { "type": "string", "description": "Optional URL for previewing the generated output." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was created, in ISO 8601 format." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was last updated, in ISO 8601 format." }, "files": { "type": "array", "items": { "type": "object", "properties": { "object": { "type": "string", "const": "file", "description": "Fixed value identifying this object as a file." }, "name": { "type": "string", "description": "The name of the file, including its extension." }, "content": { "type": "string", "description": "The full contents of the file as a raw string." }, "locked": { "type": "boolean", "description": "Whether the file is locked to prevent AI from overwriting it during new version generation." } }, "required": ["object", "name", "content", "locked"], "additionalProperties": false, "description": "Detailed representation of a file, including its content and lock status." }, "description": "A list of files that were generated or included in this version." } }, "required": ["id", "object", "status", "createdAt", "files"], "additionalProperties": false, "description": "Detailed version data including file contents." }, "VersionSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the version." }, "object": { "type": "string", "const": "version", "description": "Fixed value identifying this object as a version." }, "status": { "type": "string", "enum": ["pending", "completed", "failed"], "description": "The current status of the version generation process." }, "demoUrl": { "type": "string", "description": "Optional URL for previewing the generated output." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was created, in ISO 8601 format." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was last updated, in ISO 8601 format." } }, "required": ["id", "object", "status", "createdAt"], "additionalProperties": false, "description": "Summary of a generated version of a chat, including its status and optional demo link." }, "VersionSummaryList": { "type": "object", "properties": { "object": { "type": "string", "const": "list", "description": "Fixed value identifying this as a list response." }, "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "A unique identifier for the version." }, "object": { "type": "string", "const": "version", "description": "Fixed value identifying this object as a version." }, "status": { "type": "string", "enum": ["pending", "completed", "failed"], "description": "The current status of the version generation process." }, "demoUrl": { "type": "string", "description": "Optional URL for previewing the generated output." }, "createdAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was created, in ISO 8601 format." }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date and time when the version was last updated, in ISO 8601 format." } }, "required": ["id", "object", "status", "createdAt"], "additionalProperties": false, "description": "Summary of a generated version of a chat, including its status and optional demo link." }, "description": "Array of version summaries in this page of results." }, "pagination": { "type": "object", "properties": { "hasMore": { "type": "boolean", "description": "Indicates if there are more results available beyond this page." }, "nextCursor": { "type": "string", "description": "Cursor for fetching the next page of results." }, "nextUrl": { "type": "string", "description": "API URL for retrieving the next page of results." } }, "required": ["hasMore"], "additionalProperties": false, "description": "Pagination metadata for navigating through multiple pages of results." } }, "required": ["object", "data", "pagination"], "additionalProperties": false, "description": "List response containing multiple version summaries with cursor-based pagination." } }, "securitySchemes": { "apiKey": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "Your v0 API key. Get one at https://v0.app/chat/settings/keys" } } } }