Workspaces API
API endpoints for creating and managing workspaces.
Overview
Workspaces are containers for projects within an organization. They provide logical grouping and access control.
List Workspaces
List all workspaces the authenticated user has access to.
GET /api/trpc/workspaces.list
Input Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
cursor | string | No | Pagination cursor |
limit | number | No | Results per page (default: 50) |
search | string | No | Search by workspace name |
Response:
{
"result": {
"data": {
"json": {
"workspaces": [
{
"id": "wsp_01HXK5QJBN3YZXM8KJP2RSNV4C",
"name": "Engineering",
"description": "Engineering team workspace",
"color": "#6366f1",
"icon": "code",
"visibility": "open",
"projectCount": 5,
"memberCount": 12,
"createdAt": "2026-01-20T10:00:00.000Z",
"updatedAt": "2026-03-15T09:00:00.000Z"
}
],
"nextCursor": null
}
}
}
}
Get Workspace
Retrieve a specific workspace by ID.
GET /api/trpc/workspaces.get?input={"json":{"id":"wsp_01HXK5..."}}
Response:
{
"result": {
"data": {
"json": {
"id": "wsp_01HXK5QJBN3YZXM8KJP2RSNV4C",
"name": "Engineering",
"description": "Engineering team workspace",
"color": "#6366f1",
"icon": "code",
"visibility": "open",
"members": [
{
"userId": "usr_01HXK5...",
"name": "Alice Johnson",
"role": "admin"
}
],
"projects": [
{
"id": "prj_01HXK5...",
"name": "Platform v2"
}
],
"createdAt": "2026-01-20T10:00:00.000Z"
}
}
}
}
Create Workspace
Create a new workspace. Requires Admin role.
POST /api/trpc/workspaces.create
Request:
{
"json": {
"name": "Design",
"description": "Design team workspace",
"color": "#ec4899",
"icon": "palette",
"visibility": "open"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Workspace name (1-100 characters) |
description | string | No | Short description |
color | string | No | Hex color code (default: auto-assigned) |
icon | string | No | Icon identifier |
visibility | string | No | open or closed (default: open) |
Response:
Returns the created workspace object.
Update Workspace
Update workspace settings. Requires Workspace Admin role.
POST /api/trpc/workspaces.update
Request:
{
"json": {
"id": "wsp_01HXK5...",
"name": "Design Team",
"color": "#f59e0b",
"visibility": "closed"
}
}
Delete Workspace
Permanently delete a workspace and all its contents. Requires Admin role.
POST /api/trpc/workspaces.delete
Request:
{
"json": {
"id": "wsp_01HXK5..."
}
}
This permanently deletes the workspace and all projects, boards, and items within it. This action cannot be undone.
Archive Workspace
Archive a workspace to hide it from the sidebar without deleting data.
POST /api/trpc/workspaces.archive
Request:
{
"json": {
"id": "wsp_01HXK5..."
}
}
Restore Workspace
Restore an archived workspace.
POST /api/trpc/workspaces.restore
Request:
{
"json": {
"id": "wsp_01HXK5..."
}
}
Manage Workspace Members
Add Member
POST /api/trpc/workspaces.members.add
{
"json": {
"workspaceId": "wsp_01HXK5...",
"userId": "usr_01HXK5...",
"role": "member"
}
}
Remove Member
POST /api/trpc/workspaces.members.remove
{
"json": {
"workspaceId": "wsp_01HXK5...",
"userId": "usr_01HXK5..."
}
}
Was this page helpful?