Skip to main content

Update Workspace Additional Storage (v1)

Update additional storage allocation for a workspace.

Method & Path

PATCH /api/v1/admin/workspaces/:workspaceId/storage

Description

Updates the additional storage (in MB) allocated to a workspace beyond its plan's storage limit. The total storage quota for the workspace will be calculated as: Plan storage + Additional storage.

Authentication

Required: Admin authentication with businesses.manage permission.

Headers

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

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesThe workspace ID

Request Body

{
"additionalStorageMB": 1024
}

Request Body Schema

FieldTypeRequiredDescription
additionalStorageMBnumberYesAdditional storage in MB (must be >= 0)

Response 200 OK

{
"message": "Workspace storage updated successfully",
"workspace": {
"id": "507f1f77bcf86cd799439011",
"additionalStorageMB": 1024,
"updatedAt": "2024-01-15T10:00:00.000Z"
}
}

Common Errors

  • 401 Unauthorized: Missing or invalid admin authentication token
  • 403 Forbidden: Insufficient permissions (missing businesses.manage permission)
  • 404 Not Found: Workspace not found
  • 400 Bad Request: Invalid request body or validation errors (e.g., negative storage value)
  • 422 Unprocessable Entity: Validation errors
  • 500 Internal Server Error: Server error

Notes

  • Additional storage is added to the plan's storage limit
  • Total quota = Plan maxstorage flag + additionalStorageMB
  • Storage quota calculation automatically includes additional storage
  • Setting to 0 removes additional storage allocation