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.
Unique identifier for the workspace (UUID)
ID of the user who owns the workspace
Display name of the workspace
Optional description of the workspace
Template used to initialize the workspace. Options: blank, getting_started
Whether the workspace is publicly accessible
URL-friendly identifier for the workspace
Icon identifier for the workspace
Color identifier for the workspace card
Sort position for ordering workspaces
ISO 8601 timestamp of when the workspace was last opened
ISO 8601 timestamp of workspace creation
ISO 8601 timestamp of last update
Whether the workspace is shared with the current user (not owned by them)
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
Description of the workspace
Template to use for initialization. Options: blank (default), getting_started
Whether the workspace should be public. Defaults to false
Icon identifier for the workspace
Color identifier for the workspace card
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
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
Request Body
Updated name for the workspace. Slug will be regenerated if name changes
Updated public visibility setting
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
Response
Deleting a workspace will cascade delete all associated events, snapshots, collaborators, and invites. This action cannot be undone.