Skip to main content

Update workspace plan (v1)

Method & Path

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

Backend path: PATCH /v1/admin/workspaces/:workspaceId/plan

Description

Assigns an active subscription plan to a client workspace. Does not recalculate subscriptionEndDate; use subscription extension endpoints if billing dates must change.

Persona access

PersonaAccess
AdminYes, with businesses.manage
AnalystNo
Workspace Owner / Staff / CustomerNo

Authentication

Required: Admin JWT with businesses.manage.

Authorization: Bearer <admin_access_token>

Headers

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

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID

Request Body

{
"planId": "507f1f77bcf86cd799439011"
}
FieldTypeRequiredDescription
planIdstringYesMongoDB ID of an active plan

Response 200 OK

{
"message": "Workspace plan updated successfully",
"workspace": { }
}

The workspace object matches the Get Workspace summary shape.

Common Errors

  • 400 Bad Request: Invalid workspaceId or planId format
  • 401 Unauthorized: Missing or invalid admin token
  • 403 Forbidden: Missing businesses.manage
  • 404 Not Found: Workspace not found
  • 422 Unprocessable Entity: Plan missing, inactive, or validation failed