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
| Persona | Access |
|---|---|
| Admin | Yes, with businesses.manage |
| Analyst | No |
| Workspace Owner / Staff / Customer | No |
Authentication
Required: Admin JWT with businesses.manage.
Authorization: Bearer <admin_access_token>
Headers
Authorization: Bearer <admin_access_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace ID |
Request Body
{
"planId": "507f1f77bcf86cd799439011"
}
| Field | Type | Required | Description |
|---|---|---|---|
planId | string | Yes | MongoDB 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
workspaceIdorplanIdformat - 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