1. CORE
PRAEMUNIO API
  • Praemunio API - v1
  • AUTHENTICATION
    • API KEY Authentification
      POST
  • CORE
    • Teams
      • Members
        • Get Team Members
        • Add Team Member
        • Add Team Member Copy
      • Get Account Teams
      • Create Team
      • Get Team Details
      • Update Team Data
      • Delete Team
      • Get Team Data
      • Get Team workspaces
      • Get Team logs
    • Workspaces
      • Get Account Drive
      • Get Workspaces By Team
      • Create New Workspace
      • Get Workspace Details
      • Get Team Workspaces
      • Update workspace
      • Delete workspace
    • Folders
      • Get Folders
      • Create Folder
      • Get Folder Details
      • Get Folder Content
      • Update Folder
      • Delete Folder
      • Move Folder
    • Documents
      • Get Document Info
      • Get Document By Workspace
      • Update Document
      • Delete Document
      • Archive Document
      • Restore Document
      • Move Document
      • Stream Document
      • Stream Document Copy
      • Upload Document
  1. CORE

Workspaces

Core API — Workspaces Module#

Praemunio API • Version 1 • Developer Documentation
The Workspaces module handles the creation, Drive root structuring, status lifecycle, and storage quota management of Praemunio storage environments.
KeyValue
Base URLhttps://api.praemunio.org/api/v1
FormatJSON (Content-Type: application/json)
AuthenticationBearer Token (Authorization: Bearer <access_token>)
Required Scopesworkspaces:read, workspaces:write, workspaces:delete

Table of contents#

1.
Overview & Storage Model
2.
Endpoints Reference
POST /workspaces/create
GET /workspaces/drive
GET /workspaces/details
GET /workspaces/content
GET /workspaces/teams
PUT /workspaces/update
DELETE /workspaces/delete
3.
Workspace Lifecycle State Machine
4.
Client Integration Example
5.
Error Reference

1. Overview & Storage Model#

A Workspace is a dedicated drive and storage vault owned by a team. All folders and documents live within a workspace. Workspaces enforce byte storage limits (storageLimit) and status controls (active, inactive, suspended).

2. Endpoints Reference#

POST /workspaces/create#

Initializes a new storage workspace for a team.
Scope Required: workspaces:write
HTTP Code: 201 Created

Request Body#

{
  "teamId": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d",
  "name": "Q4 Audit Vault",
  "description": "Secure workspace for Q4 compliance files",
  "storageLimit": 107374182400
}
FieldTypeRequiredDescription
teamIdstring (UUID)YesTarget team UUID
namestringYesMin 2 characters
descriptionstringNoWorkspace description
storageLimitnumberNoStorage quota in bytes (e.g. 100 GB = 107374182400)

Response (201 Created)#

{
  "success": true,
  "message": "Workspace created successfully",
  "result": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "teamId": "e4a9d1b0-7c2e-4f3a-8b1d-9e0f2a4c6b8d",
    "name": "Q4 Audit Vault",
    "description": "Secure workspace for Q4 compliance files",
    "status": "active",
    "storageUsed": 0,
    "storageLimit": 107374182400,
    "createdAt": "2026-09-30T11:00:00.000Z"
  },
  "errors": null,
  "except": null
}

GET /workspaces/drive#

Retrieves the global Drive overview for the caller's account, including total account storage metrics and available workspace trees.
Scope Required: workspaces:read
HTTP Code: 200 OK

Response (200 OK)#

{
  "success": true,
  "message": "Drive overview retrieved successfully",
  "result": {
    "totalStorageUsed": 524288000,
    "totalStorageLimit": 1099511627776,
    "workspacesCount": 3,
    "workspaces": [
      {
        "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
        "name": "Q4 Audit Vault",
        "status": "active",
        "storageUsed": 262144000
      }
    ]
  },
  "errors": null,
  "except": null
}

GET /workspaces/details#

Fetches workspace metadata and detailed storage statistics by workspace ID.
Scope Required: workspaces:read
Query Parameter: workspace_id (required UUID)

cURL Example#


GET /workspaces/content#

Lists top-level (root) folders and documents within a workspace.
Scope Required: workspaces:read
Query Parameter: workspace_id (required UUID)

Response (200 OK)#

{
  "success": true,
  "message": "Workspace content retrieved successfully",
  "result": {
    "folders": [
      {
        "id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
        "name": "Contracts 2026",
        "parentFolderId": null
      }
    ],
    "documents": [
      {
        "id": "d4e5f6a7-b8c9-0123-def0-456789012345",
        "name": "Master_Agreement.pdf",
        "status": "completed",
        "sizeBytes": 1048576
      }
    ]
  },
  "errors": null,
  "except": null
}

GET /workspaces/teams#

Lists all workspaces owned by a given team ID.
Scope Required: workspaces:read
Query Parameter: teamId (required UUID)

PUT /workspaces/update#

Updates workspace details or status (active, inactive, suspended).
Scope Required: workspaces:write

Request Body#

{
  "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "name": "Q4 Global Compliance Vault",
  "status": "active"
}

DELETE /workspaces/delete#

Deletes a workspace and purges associated directory structures.
Scope Required: workspaces:delete
HTTP Code: 204 No Content

Request Body#

{
  "workspace_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012"
}

3. Workspace Lifecycle State Machine#


4. Client Integration Example#


5. Error Reference#

HTTP StatusCodeCauseAction
400 Bad Requestinvalid_requestInvalid UUID or unknown status enumVerify request parameters
403 Forbiddeninsufficient_scopesMissing workspaces:read or workspaces:writeCheck API key permissions
404 Not Foundworkspace_not_foundWorkspace ID does not existVerify workspace ID

Support#

Visit docs.praemunio.io.
Modified at 2026-09-30 10:45:25
Previous
Get Team logs
Next
Get Account Drive
Built with