Workspaces

Learn how to manage workspaces in the NextCoder platform

Overview

Workspaces are the fundamental building blocks of the NextCoder platform. Each workspace represents a project that can contain multiple AI agents, integrations, and configurations.

Workspace Structure

A workspace contains:

  • Project configuration and settings
  • AI agents for different tasks
  • Integrations with external services
  • Deployment configurations
  • Access control and team permissions

Creating a Workspace

Workspaces can be created through the dashboard UI or via the API.

// Create a new workspace via API
const response = await fetch('/api/workspaces', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'My New Project',
    planId: 'pro'
  }),
});

const workspace = await response.json();

Workspace API Endpoints

MethodEndpointDescription
GET/api/workspacesList all workspaces
POST/api/workspacesCreate a new workspace
GET/api/workspaces/{id}Get workspace details
PUT/api/workspaces/{id}Update a workspace
DELETE/api/workspaces/{id}Delete a workspace

Workspace Data Model

interface Workspace {
  id: string;
  name: string;
  ownerId: string;
  planId: string;
  createdAt: Date;
  updatedAt: Date;
}