Skip to content

Workspaces API

The Workspaces API lets you manage workspaces programmatically.

Get all workspaces for the authenticated user.

GET /api/workspace
ParameterTypeDescription
pagenumberPage number (default: 1)
limitnumberResults per page (default: 50, max: 100)
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Personal",
"userId": "880e8400-e29b-41d4-a716-446655440003",
"isDefault": true,
"totalStorageBytes": 1048576,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"contentCounts": {
"notes": 42,
"groups": 5,
"todos": 23
},
"storageUsage": 1048576,
"formattedStorageUsage": "1.0 MB"
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 2,
"totalPages": 1
},
"count": 2
}
Terminal window
curl -X GET "https://sidvy.com/api/workspace" \
-H "Authorization: Bearer sidvy_abc123..."

Create a new workspace. Users are limited to 2 workspaces on the free plan.

POST /api/workspace
{
"name": "Side Project"
}
FieldTypeRequiredDescription
namestringYesWorkspace name (must be unique per user)
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Side Project",
"userId": "880e8400-e29b-41d4-a716-446655440003",
"isDefault": false,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"storageUsage": 0,
"formattedStorageUsage": "0 B"
},
"count": 1
}
Terminal window
curl -X POST "https://sidvy.com/api/workspace" \
-H "Authorization: Bearer sidvy_abc123..." \
-H "Content-Type: application/json" \
-d '{"name": "Side Project"}'

Update a workspace’s name.

PUT /api/workspace
{
"workspaceId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Renamed Workspace"
}
FieldTypeRequiredDescription
workspaceIdstringYesWorkspace ID to update
namestringNoNew workspace name

Returns the updated workspace object in the same format as create, including storage usage fields.

Terminal window
curl -X PUT "https://sidvy.com/api/workspace" \
-H "Authorization: Bearer sidvy_abc123..." \
-H "Content-Type: application/json" \
-d '{"workspaceId": "550e8400-e29b-41d4-a716-446655440000", "name": "New Name"}'

Delete a workspace and all its contents.

DELETE /api/workspace
{
"workspaceId": "550e8400-e29b-41d4-a716-446655440000"
}
FieldTypeRequiredDescription
workspaceIdstringYesWorkspace ID to delete
{
"data": {
"deleted": true,
"workspaceId": "550e8400-e29b-41d4-a716-446655440000",
"deletedContent": {
"notes": 42,
"groups": 5,
"todos": 23
}
},
"count": 1
}
Terminal window
curl -X DELETE "https://sidvy.com/api/workspace" \
-H "Authorization: Bearer sidvy_abc123..." \
-H "Content-Type: application/json" \
-d '{"workspaceId": "550e8400-e29b-41d4-a716-446655440000"}'
{
"error": "FORBIDDEN",
"message": "Maximum number of workspaces reached (2)"
}
{
"error": "FORBIDDEN",
"message": "Cannot delete default workspace"
}
{
"error": "NOT_FOUND",
"message": "Workspace not found"
}
{
"error": "VALIDATION_ERROR",
"message": "Workspace name already exists"
}