### Install Dependencies and Start Development Server Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Install all necessary project dependencies and start the local development server. These are common post-creation steps for any template. ```bash pnpm install pnpm dev ``` -------------------------------- ### Install Dependencies Source: https://v0.app/docs/api/platform/examples/classic-v0 Navigate to the example directory and install project dependencies using pnpm. ```bash cd examples/classic-v0 pnpm install ``` -------------------------------- ### Install Dependencies, Migrate Database, and Start v0 Clone Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Install project dependencies, run database migrations specific to the v0-clone template, and start the development server. ```bash pnpm install pnpm db:migrate # For v0-clone template pnpm dev ``` -------------------------------- ### Navigate to Example Directory Source: https://v0.app/docs/api/platform/examples/react-components Changes the current directory to the v0-sdk-react-example directory. This is the first step in setting up and running the example. ```bash cd examples/v0-sdk-react-example ``` -------------------------------- ### Create a Classic v0 Interface App Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Scaffold a new application using the 'classic-v0' template, replicating the iconic v0.dev interface. Install dependencies and start the development server. ```bash npx create-v0-sdk-app@latest my-classic-app --template classic-v0 cd my-classic-app pnpm install pnpm dev ``` -------------------------------- ### Create a New App with npx Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Use npx to run the create-v0-sdk-app command without global installation. This is the recommended way to start a new project. ```bash npx create-v0-sdk-app@latest my-app ``` -------------------------------- ### Run create-v0-sdk-app in Interactive Mode Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Execute create-v0-sdk-app without arguments to enter interactive mode. The CLI will guide you through project setup by prompting for project name, template, and package manager. ```bash npx create-v0-sdk-app@latest ``` -------------------------------- ### Install v0 SDK Source: https://v0.app/docs/api/platform/quickstart Install the v0 SDK using pnpm. This is the first step to using the SDK in your project. ```bash pnpm add v0-sdk ``` -------------------------------- ### Install @v0-sdk/react and v0-sdk Source: https://v0.app/docs/api/platform/guides/displaying-chat-messages Install the necessary packages for using the @v0-sdk/react library and the v0-sdk. Include `katex` for math rendering support. ```bash npm install @v0-sdk/react v0-sdk # For math rendering support npm install katex ``` -------------------------------- ### Install v0-sdk Source: https://v0.app/docs/api/platform/packages/v0-sdk Install the v0-sdk package using npm, pnpm, or yarn. ```bash npm install v0-sdk # or pnpm add v0-sdk # or yarn add v0-sdk ``` -------------------------------- ### Install create-v0-sdk-app Globally Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Install the create-v0-sdk-app globally using npm for command-line access. This allows you to run the command directly after installation. ```bash npm install -g create-v0-sdk-app create-v0-sdk-app my-app ``` -------------------------------- ### Quick Start with v0-sdk Source: https://v0.app/docs/api/platform/packages/v0-sdk Initialize the SDK with an API key and create a new chat. ```typescript import { V0 } from 'v0-sdk' const v0 = new V0({ apiKey: process.env.V0_API_KEY, }) // Create a new chat const chat = await v0.chats.create({ message: 'Create a todo app with React', }) console.log(chat.id) ``` -------------------------------- ### Install @v0-sdk/react Source: https://v0.app/docs/api/platform/packages/react Install the @v0-sdk/react package using npm, pnpm, or yarn. ```bash npm install @v0-sdk/react # or pnpm add @v0-sdk/react # or yarn add @v0-sdk/react ``` -------------------------------- ### Install v0 SDK Source: https://v0.app/docs/api/platform/overview Install the v0 SDK using npm or pnpm. This is the first step to integrating with the v0 Platform API. ```bash npm install v0-sdk # or pnpm add v0-sdk ``` -------------------------------- ### Run Development Server Source: https://v0.app/docs/api/platform/examples/classic-v0 Start the development server to run the classic-v0 application locally. ```bash pnpm dev ``` -------------------------------- ### Install @v0-sdk/ai-tools Source: https://v0.app/docs/api/platform/packages/ai-tools Install the AI SDK tools for the v0 Platform API using npm, pnpm, or yarn. ```bash npm install @v0-sdk/ai-tools ai # or pnpm add @v0-sdk/ai-tools ai # or yarn add @v0-sdk/ai-tools ai ``` -------------------------------- ### Run Full AI Integration Examples Source: https://v0.app/docs/api/platform/examples/ai-tools Execute different full AI integration examples: complete workflows, chat-focused, project management, and advanced agent patterns. ```bash # Complete workflow examples pnpm dev:full # Chat-focused example pnpm dev:chat # Project management example pnpm dev:project # Advanced agent patterns example pnpm dev:agent ``` -------------------------------- ### Install LangChain and OpenAI SDKs Source: https://v0.app/docs/api/platform/adapters/ai-tools Install specific packages for LangChain and OpenAI function integration. Includes their respective SDKs and v0 integrations. ```bash # LangChain integration npm install @v0-sdk/langchain-tools langchain # OpenAI Functions npm install @v0-sdk/openai-functions openai ``` -------------------------------- ### Install AI Tools SDK and AI Package Source: https://v0.app/docs/api/platform/adapters/ai-tools Install the necessary packages for AI tools integration using npm or pnpm. Includes base AI tools and the AI package. ```bash npm install @v0-sdk/ai-tools ai # or pnpm add @v0-sdk/ai-tools ai ``` -------------------------------- ### Create, Get, and Find Deployment Logs Source: https://v0.app/docs/api/platform/packages/v0-sdk Demonstrates creating a deployment, retrieving its status by ID, and fetching deployment logs. ```typescript // Create a deployment const deployment = await v0.deployments.create({ chatId: chat.id, versionId: chat.latestVersion.id, }) // Get deployment status const deploymentData = await v0.deployments.getById(deployment.id) // Get deployment logs const logs = await v0.deployments.findLogs(deployment.id) ``` -------------------------------- ### Create v0 Chat Prompt Example Source: https://v0.app/docs/api/platform/adapters/mcp-server Example prompt to ask your AI assistant to create a new v0 chat for a specific task. ```plaintext "Create a v0 chat for building a React dashboard component" ``` -------------------------------- ### Access v0 Chat Information Prompt Example Source: https://v0.app/docs/api/platform/adapters/mcp-server Example prompt to retrieve details about an existing v0 chat using its ID. ```plaintext "Show me the details of v0 chat ID abc123" ``` -------------------------------- ### Create, Get, and Find Projects Source: https://v0.app/docs/api/platform/packages/v0-sdk Shows how to create a new project, retrieve project details by ID, and list all projects. ```typescript // Create a project const project = await v0.projects.create({ name: 'My App', }) // Get project details const projectData = await v0.projects.getById(project.id) // List all projects const projects = await v0.projects.find() ``` -------------------------------- ### Send Message to v0 Chat Prompt Example Source: https://v0.app/docs/api/platform/adapters/mcp-server Example prompt to send a message to an existing v0 chat to continue a conversation. ```plaintext "Send a message to chat abc123 asking to add dark mode support" ``` -------------------------------- ### Document Environment Variables Source: https://v0.app/docs/api/platform/guides/environment-variables Shows how to document environment variables with descriptions, examples, and requirements, aiding team collaboration and understanding. ```typescript // Document your environment variables const environmentVariables = { // Database Configuration DATABASE_URL: { description: 'PostgreSQL connection string', example: 'postgresql://user:pass@localhost:5432/dbname', required: true, }, // API Configuration API_KEY: { description: 'Third-party service API key', example: 'sk_live_...', required: true, }, // Optional Configuration LOG_LEVEL: { description: 'Logging level', example: 'info', default: 'info', options: ['debug', 'info', 'warn', 'error'], }, } ``` -------------------------------- ### Create a new project using TypeScript Source: https://v0.app/docs/api/platform/reference/projects/create Use this snippet to programmatically create a new project. Ensure you have the v0-sdk installed and authenticated. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.projects.create({ name: 'My Project', }) console.log(result) ``` -------------------------------- ### Get Project API Endpoint Source: https://v0.app/docs/api/platform/overview Example of a RESTful API call to retrieve a specific project by its ID. This uses the GET method with a resource-specific identifier. ```http GET https://api.v0.dev/v1/projects/:id ``` -------------------------------- ### Set Up Environment Variables Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Copy the example environment file to .env and add your V0_API_KEY. This is a general step for setting up environment variables after app creation. ```bash cp .env.example .env # Add your V0_API_KEY ``` -------------------------------- ### Get Chat Messages API Endpoint Source: https://v0.app/docs/api/platform/overview Example of a RESTful API call to retrieve messages from a specific chat. This uses the GET method with the chat ID. ```http GET https://api.v0.dev/v1/chats/:id/messages ``` -------------------------------- ### Get Environment Variable using TypeScript Source: https://v0.app/docs/api/platform/reference/projects/get-env-var Use this snippet to retrieve an environment variable by its project and environment variable IDs. Set 'decrypted' to 'true' to get the unencrypted value. Ensure you have the v0-sdk installed. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.projects.getEnvVar({ projectId: 'project_abc123', environmentVariableId: 'env_def456', decrypted: 'true', }) console.log(result) ``` -------------------------------- ### Quick Start with StreamingMessage Source: https://v0.app/docs/api/platform/packages/react A basic example of using the StreamingMessage component to display a message and log completion. ```tsx import { StreamingMessage } from '@v0-sdk/react' function ChatInterface({ message }) { return ( { console.log('Streaming complete:', result) }} /> ) } ``` -------------------------------- ### Set Up Environment Variables Source: https://v0.app/docs/api/platform/examples/ai-tools Create a .env file to store your v0 API key and AI Gateway API key. ```bash V0_API_KEY=your_v0_api_key_here AI_GATEWAY_API_KEY=your_ai_gateway_api_key_here ``` -------------------------------- ### TypeScript Example Source: https://v0.app/docs/api/platform/reference/projects/get-by-chat-id Use this snippet to retrieve a project by its chat ID in TypeScript. Ensure you have the v0 SDK installed and configured. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.projects.getByChatId({ chatId: '123', }) console.log(result) ``` -------------------------------- ### Get Deployment by ID in TypeScript Source: https://v0.app/docs/api/platform/reference/deployments/get-by-id Use this snippet to retrieve deployment details programmatically. Ensure the 'v0-sdk' is installed and imported. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.deployments.getById({ deploymentId: '123', }) console.log(result) ``` -------------------------------- ### Confirm Integration Installation with resolveTask Source: https://v0.app/docs/api/platform/guides/handling-integrations Confirm that an integration has been successfully installed or connected for the chat. Pass the exact integration names requested by the assistant. This endpoint can also be used to confirm other setup tasks like MCP presets or environment variables. ```typescript import { v0 } from 'v0-sdk' await v0.chats.resolveTask({ chatId: '123', task: { type: 'confirmed-steps', connectedIntegrationNames: ['Neon'], }, }) ``` -------------------------------- ### TypeScript Example Source: https://v0.app/docs/api/platform/reference/chats/get-version Use this snippet to retrieve a specific chat version in TypeScript. Ensure you have the v0-sdk installed and an active API key. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.chats.getVersion() console.log(result) ``` -------------------------------- ### Get Usage Report in TypeScript Source: https://v0.app/docs/api/platform/reference/reports/get-usage Use this snippet to fetch usage data for the authenticated user or team. Ensure you have the v0-sdk installed and imported. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.reports.getUsage() console.log(result) ``` -------------------------------- ### Retrieve MCP Server Details (TypeScript) Source: https://v0.app/docs/api/platform/reference/mcp-servers/get-by-id Use this TypeScript snippet to get the details of an MCP server by its ID. Ensure you have the v0-sdk installed and are authenticated. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.mcpServers.getById({ mcpServerId: 'mcp_123', }) console.log(result) ``` -------------------------------- ### Set Up Environment Variables for v0 Clone Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Copy the example environment file and edit it with your API keys. This step is crucial for the v0-clone template to function correctly. ```bash cp .env.example .env # Edit .env with your API keys ``` -------------------------------- ### Get Chat Message in TypeScript Source: https://v0.app/docs/api/platform/reference/chats/get-message Use this snippet to retrieve a specific chat message in TypeScript. Ensure you have the 'v0-sdk' installed and your API key configured. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.chats.getMessage() console.log(result) ``` -------------------------------- ### List Projects API Endpoint Source: https://v0.app/docs/api/platform/overview Example of a RESTful API call to list all projects. This follows the standard GET request pattern for resource collection. ```http GET https://api.v0.dev/v1/projects ``` -------------------------------- ### Get User Plan in TypeScript Source: https://v0.app/docs/api/platform/reference/user/get-plan Use this snippet to fetch the user's current subscription plan details programmatically. Ensure the v0-sdk is installed and configured. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.user.getPlan() console.log(result) ``` -------------------------------- ### Get User Activity Report (TypeScript) Source: https://v0.app/docs/api/platform/reference/reports/get-user-activity Use this snippet to fetch user activity data programmatically using the v0 SDK. Ensure the SDK is installed and authenticated. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.reports.getUserActivity() console.log(result) ``` -------------------------------- ### Get Project by ID using TypeScript Source: https://v0.app/docs/api/platform/reference/projects/get-by-id Use this snippet to fetch project details programmatically using the v0 SDK in TypeScript. Ensure you have the SDK installed and authenticated. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.projects.getById({ projectId: '123', }) console.log(result) ``` -------------------------------- ### Get User Scopes with TypeScript Source: https://v0.app/docs/api/platform/reference/user/get-scopes Use this TypeScript snippet to fetch accessible scopes for the authenticated user via the v0 SDK. Ensure the v0 SDK is installed and configured. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.user.getScopes() console.log(result) ``` -------------------------------- ### Initialize Project from Existing Files Source: https://v0.app/docs/api/platform/overview Initializes a chat with existing project files. This is the recommended method for starting with your current codebase as it is faster and does not consume tokens. ```typescript // Most common: Initialize from existing files const chat = await v0.chats.init({ type: 'files', files: [ { name: 'src/App.tsx', content: appCode }, { name: 'package.json', content: packageJson }, ], }) ``` -------------------------------- ### Create a New Project Source: https://v0.app/docs/api/platform/overview Demonstrates how to create a new project using the v0 SDK. This is one way to start a new development container. ```typescript const project = await v0.projects.create({ name: 'My React App', }) ``` -------------------------------- ### Get Billing Usage (TypeScript) Source: https://v0.app/docs/api/platform/reference/user/get-billing Use this snippet to fetch billing usage and quota information for the authenticated user using the v0 SDK. Ensure the v0 SDK is installed and configured. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.user.getBilling() console.log(result) ``` -------------------------------- ### Get Chat Details to Find Vercel Project ID Source: https://v0.app/docs/api/platform/guides/handling-integrations Retrieve chat details to obtain the `vercelProjectId`, which is necessary for Vercel API calls related to integration setup. Ensure the chat is linked to a Vercel project before proceeding. ```typescript import { v0 } from 'v0-sdk' const chat = await v0.chats.getById({ chatId: '123', }) if (!chat.vercelProjectId) { throw new Error('This chat is not linked to a Vercel project yet.') } const vercelProjectId = chat.vercelProjectId ``` -------------------------------- ### Database Setup for v0 Clone Template Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Perform database migrations specifically for the v0-clone template. This command ensures the database schema is correctly set up. ```bash pnpm db:migrate ``` -------------------------------- ### Find Projects with cURL Source: https://v0.app/docs/api/platform/reference/projects/find This example shows how to fetch a list of v0 projects using a cURL command. You need to provide your API key in the Authorization header. ```cURL curl -X GET https://api.v0.dev/v1/projects \ -H "Authorization: Bearer $V0_API_KEY" \ -H "Content-Type: application/json" ``` -------------------------------- ### Initialize v0 Chat with Files Source: https://v0.app/docs/api/platform/overview Use the `v0.chats.init()` method to start a chat session, providing context by specifying the type as 'files' and listing the relevant files. ```typescript import { v0 } from 'v0-sdk' // Or with custom configuration: // import { createClient } from 'v0-sdk' // const v0 = createClient({ apiKey: process.env.V0_API_KEY }) // Create chat const chat = await v0.chats.init({ type: 'files', files: myFiles, }) ``` -------------------------------- ### Initialize Chat with Organized Files Source: https://v0.app/docs/api/platform/guides/start-from-existing-code Use this to initialize a chat with a well-organized file structure. Ensure all necessary files and their contents are provided. ```typescript // ✅ Good: Organized file structure const chat = await v0.chats.init({ type: 'files', files: [ { name: 'src/components/Button.tsx', content: '...' }, { name: 'src/components/Card.tsx', content: '...' }, { name: 'src/styles/globals.css', content: '...' }, { name: 'package.json', content: '...', locked: true }, ], }) ``` -------------------------------- ### Compare chats.init() and chats.create() Source: https://v0.app/docs/api/platform/guides/start-from-existing-code Illustrates the difference between `chats.init()` for existing code and `chats.create()` for AI-generated code. `init` is fast and free, while `create` uses tokens for generation. ```typescript // chats.init() - Fast, no tokens, existing code const initChat = await v0.chats.init({ type: 'files', files: existingFiles, }) // chats.create() - Slower, uses tokens, generates code const createChat = await v0.chats.create({ message: 'Create a React dashboard with charts', }) ``` -------------------------------- ### Find v0 Chats Prompt Example Source: https://v0.app/docs/api/platform/adapters/mcp-server Example prompt to search for v0 chats based on keywords or topics. ```plaintext "Find my v0 chats related to React components" ``` -------------------------------- ### Protect Configuration Files During Initialization Source: https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes This example demonstrates initializing a chat with source code files unlocked and configuration files locked to prevent AI modification. ```typescript const chat = await v0.chats.init({ type: 'files', files: [ // Source code - AI can modify { name: 'src/App.tsx', content: appCode, locked: false }, { name: 'src/components/Header.tsx', content: headerCode, locked: false }, // Configuration - AI cannot modify { name: 'package.json', content: packageJson, locked: true }, { name: 'tsconfig.json', content: tsConfig, locked: true }, { name: '.env.example', content: envExample, locked: true }, { name: 'README.md', content: readme, locked: true }, ], }) ``` -------------------------------- ### All Tools (High Context) Example Source: https://v0.app/docs/api/platform/examples/ai-tools Use all available v0 tools by passing v0Tools to the generateText function. This includes over 20 tools, adding significant context to AI calls. ```typescript import { v0Tools } from '@v0-sdk/ai-tools' const result = await generateText({ model: 'openai/gpt-5-mini', prompt: 'Create a new React component', tools: v0Tools({ apiKey: process.env.V0_API_KEY }), }) ``` -------------------------------- ### Use All Available Tools Source: https://v0.app/docs/api/platform/packages/ai-tools Initialize all v0 tools for maximum AI agent capability when interacting with the v0 Platform API. This includes over 20 tools, which adds significant context to AI calls. ```typescript import { v0Tools } from '@v0-sdk/ai-tools' const tools = v0Tools({ apiKey: process.env.V0_API_KEY, }) const result = await generateText({ model: openai('gpt-4o-mini'), prompt: 'Build a complete web app with deployment', tools, }) ``` -------------------------------- ### Find Projects using Default Client Source: https://v0.app/docs/api/platform/overview Demonstrates how to find projects using the default v0 client, which automatically authenticates using the V0_API_KEY environment variable. ```typescript import { v0 } from 'v0-sdk' // Automatically uses process.env.V0_API_KEY const projects = await v0.projects.find() ``` -------------------------------- ### Create a New App with a Specific Template Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Use the --template flag to specify a pre-defined template when creating a new application. This allows for quick setup of specific project structures. ```bash npx create-v0-sdk-app@latest my-app --template v0-clone ``` -------------------------------- ### Configure v0 SDK Client Options Source: https://v0.app/docs/api/platform/packages/v0-sdk Initialize the V0 client with custom options like API key, base URL, timeout, and retry count. ```typescript const v0 = new V0({ apiKey: 'your-api-key', baseURL: 'https://api.v0.dev/v1', // Optional timeout: 30000, // Optional, in milliseconds maxRetries: 3, // Optional }) ``` -------------------------------- ### Get Usage Report in cURL Source: https://v0.app/docs/api/platform/reference/reports/get-usage This cURL command demonstrates how to make a GET request to the usage reports endpoint. Replace $V0_API_KEY with your actual API key. ```cURL curl -X GET https://api.v0.dev/v1/reports/usage \ -H "Authorization: Bearer $V0_API_KEY" \ -H "Content-Type: application/json" ``` -------------------------------- ### Get User Scopes with cURL Source: https://v0.app/docs/api/platform/reference/user/get-scopes This cURL command demonstrates how to retrieve user scopes using a direct HTTP GET request. Replace $V0_API_KEY with your actual API key. ```cURL curl -X GET https://api.v0.dev/v1/user/scopes \ -H "Authorization: Bearer $V0_API_KEY" \ -H "Content-Type: application/json" ``` -------------------------------- ### Create a new project using cURL Source: https://v0.app/docs/api/platform/reference/projects/create This cURL command demonstrates how to create a new project via the API. Replace $V0_API_KEY with your actual API key and adjust the JSON payload as needed. ```cURL curl -X POST https://api.v0.dev/v1/projects \ -H "Authorization: Bearer $V0_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "My Project" }' ``` -------------------------------- ### Create a v0 Clone App Source: https://v0.app/docs/api/platform/packages/create-v0-sdk-app Scaffold a new application using the 'v0-clone' template, which provides a full-featured replica of v0.dev with authentication and multi-tenant support. After creation, navigate to the project directory. ```bash npx create-v0-sdk-app@latest my-v0-clone --template v0-clone cd my-v0-clone ``` -------------------------------- ### Create MCP Server without Authentication Source: https://v0.app/docs/api/platform/reference/mcp-servers/create Use this to create an MCP server that does not require any authentication. The TypeScript example uses the v0 SDK, while the cURL example shows the equivalent HTTP request. ```TypeScript import { v0 } from 'v0-sdk' const result = await v0.mcpServers.create({ name: 'My MCP Server', url: 'https://mcp.example.com/sse', }) console.log(result) ``` ```cURL curl -X POST https://api.v0.dev/v1/mcp-servers \ -H "Authorization: Bearer $V0_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "My MCP Server", "url": "https://mcp.example.com/sse" }' ``` -------------------------------- ### Import Repository and Selectively Lock Files Source: https://v0.app/docs/api/platform/guides/lock-files-from-ai-changes This example first imports a repository with all files unlocked, then selectively locks specific configuration files using updateVersion. ```typescript // First, import everything unlocked const chat = await v0.chats.init({ type: 'repo', repo: { url: 'https://github.com/username/project', }, lockAllFiles: false, }) // Then lock specific files await v0.chats.updateVersion({ chatId: chat.id, versionId: chat.latestVersion.id, files: [ // Lock configuration files only { name: 'package.json', content: existingPackageJson, locked: true }, { name: 'vite.config.ts', content: existingViteConfig, locked: true }, ], }) ``` -------------------------------- ### Get User Scopes Source: https://v0.app/docs/api/platform/reference/user/get-scopes Retrieves all accessible scopes for the authenticated user. ```APIDOC ## GET /user/scopes ### Description Retrieves all accessible scopes for the authenticated user, such as personal workspaces or shared teams. ### Method GET ### Endpoint /user/scopes ### Response #### Success Response (200) - **object** (list) - Required - Description: - **data** (object[]) - Required - Description: - **id** (string) - Optional - A unique identifier for the scope (e.g., user or team workspace). - **object** ('scope') - Optional - Fixed value identifying this object as a scope. - **name** (string) - Optional - An optional human-readable name for the scope. #### Response Example { "data": [ { "id": "scope_id_1", "object": "scope", "name": "Workspace Admin" }, { "id": "scope_id_2", "object": "scope", "name": "Team Member" } ] } ```