Skip to main content

Get Storage Summary (v1)

Method & Path

GET /api/v1/workspace/:workspaceId/storage/summary

Description

Get optimized storage summary without file details. This endpoint is faster than getting full file lists.

Authentication

Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace permissions.

Headers

Authorization: Bearer <workspace_token>
Content-Type: application/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier

Response 200 OK

{
"totalSizeBytes": 524288000,
"totalSizeMB": 500,
"totalSizeGB": 0.49,
"quotaBytes": 1073741824,
"quotaMB": 1024,
"quotaGB": 1,
"usagePercentage": 48.83,
"byCategory": {
"sessions": 200000000,
"storefront": 150000000,
"vcard": 100000000,
"financial": 50000000,
"sms": 10000000,
"ai-tools": 5000000,
"other": 9280000
}
}

Response Fields

  • totalSizeBytes (number): Total storage used in bytes
  • totalSizeMB (number): Total storage used in megabytes
  • totalSizeGB (number): Total storage used in gigabytes
  • quotaBytes (number): Storage quota in bytes
  • quotaMB (number): Storage quota in megabytes
  • quotaGB (number): Storage quota in gigabytes
  • usagePercentage (number): Usage percentage (0-100)
  • byCategory (object): Storage usage grouped by category

Common Errors

401 Unauthorized: Missing or invalid authentication token

404 Not Found: Workspace not found

500 Internal Server Error: Server error occurred while processing the request