Skip to main content
The Workspace API provides endpoints for creating, reading, updating, and deleting workspaces. Workspaces in ThinkEx are container entities that hold various items like canvases, flowcharts, and text documents.

Authentication

All workspace endpoints require authentication. Include a valid session token in your requests.

Base URL

https://thinkex.app/api/workspaces

Workspace Object

The workspace object contains metadata and configuration for a workspace.
id
string
required
Unique identifier for the workspace (UUID)
userId
string
required
ID of the user who owns the workspace
name
string
required
Display name of the workspace
description
string
Optional description of the workspace
template
string
Template used to initialize the workspace. Options: blank, getting_started
isPublic
boolean
Whether the workspace is publicly accessible
slug
string
URL-friendly identifier for the workspace
icon
string
Icon identifier for the workspace
color
string
Color identifier for the workspace card
sortOrder
integer
Sort position for ordering workspaces
lastOpenedAt
string
ISO 8601 timestamp of when the workspace was last opened
createdAt
string
ISO 8601 timestamp of workspace creation
updatedAt
string
ISO 8601 timestamp of last update
isShared
boolean
Whether the workspace is shared with the current user (not owned by them)
permissionLevel
string
User’s permission level for shared workspaces. Options: owner, editor, viewer

List Workspaces

curl https://thinkex.app/api/workspaces \
  -H "Cookie: your-session-cookie"

Response

Returns a list of all workspaces accessible to the authenticated user, including both owned workspaces and workspaces shared with them.
{
  "workspaces": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "userId": "user_123",
      "name": "My Project",
      "description": "Project workspace",
      "template": "blank",
      "isPublic": false,
      "slug": "my-project",
      "icon": "briefcase",
      "color": "blue",
      "sortOrder": 0,
      "lastOpenedAt": "2024-01-15T10:30:00Z",
      "createdAt": "2024-01-01T00:00:00Z",
      "updatedAt": "2024-01-15T10:30:00Z",
      "isShared": false
    }
  ]
}

Create Workspace

curl -X POST https://thinkex.app/api/workspaces \
  -H "Content-Type: application/json" \
  -H "Cookie: your-session-cookie" \
  -d '{
    "name": "New Project",
    "description": "My new workspace",
    "template": "blank",
    "icon": "rocket",
    "color": "purple"
  }'

Request Body

name
string
required
Name of the workspace
description
string
Description of the workspace
template
string
Template to use for initialization. Options: blank (default), getting_started
is_public
boolean
Whether the workspace should be public. Defaults to false
icon
string
Icon identifier for the workspace
color
string
Color identifier for the workspace card
initialState
object
Custom initial state for the workspace. If not provided, template-based state is used

Response

{
  "workspace": {
    "id": "550e8400-e29b-41d4-a716-446655440001",
    "userId": "user_123",
    "name": "New Project",
    "description": "My new workspace",
    "template": "blank",
    "isPublic": false,
    "slug": "new-project",
    "icon": "rocket",
    "color": "purple",
    "sortOrder": 1,
    "createdAt": "2024-01-20T14:30:00Z",
    "updatedAt": "2024-01-20T14:30:00Z",
    "state": {
      "workspaceId": "550e8400-e29b-41d4-a716-446655440001",
      "globalTitle": "New Project",
      "items": []
    }
  }
}

Get Workspace

curl https://thinkex.app/api/workspaces/{id} \
  -H "Cookie: your-session-cookie"

Path Parameters

id
string
required
The workspace ID (UUID)

Response

Returns the workspace with its complete state, including all items.
{
  "workspace": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "userId": "user_123",
    "name": "My Project",
    "description": "Project workspace",
    "template": "blank",
    "isPublic": false,
    "slug": "my-project",
    "icon": "briefcase",
    "color": "blue",
    "sortOrder": 0,
    "lastOpenedAt": "2024-01-15T10:30:00Z",
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-15T10:30:00Z",
    "isShared": false,
    "permissionLevel": "owner",
    "state": {
      "workspaceId": "550e8400-e29b-41d4-a716-446655440000",
      "globalTitle": "My Project",
      "items": []
    }
  }
}

Update Workspace

curl -X PATCH https://thinkex.app/api/workspaces/{id} \
  -H "Content-Type: application/json" \
  -H "Cookie: your-session-cookie" \
  -d '{
    "name": "Updated Project Name",
    "description": "New description"
  }'

Path Parameters

id
string
required
The workspace ID (UUID)

Request Body

name
string
Updated name for the workspace. Slug will be regenerated if name changes
description
string
Updated description
is_public
boolean
Updated public visibility setting
icon
string
Updated icon identifier
color
string
Updated color identifier

Response

{
  "workspace": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "userId": "user_123",
    "name": "Updated Project Name",
    "description": "New description",
    "template": "blank",
    "isPublic": false,
    "slug": "updated-project-name",
    "icon": "briefcase",
    "color": "blue",
    "sortOrder": 0,
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-20T15:00:00Z"
  }
}
Only workspace owners can update workspace metadata. Collaborators with editor permissions can modify workspace content through events.

Delete Workspace

curl -X DELETE https://thinkex.app/api/workspaces/{id} \
  -H "Cookie: your-session-cookie"

Path Parameters

id
string
required
The workspace ID (UUID)

Response

{
  "success": true
}
Deleting a workspace will cascade delete all associated events, snapshots, collaborators, and invites. This action cannot be undone.

Build docs developers (and LLMs) love