Update Workspace (v1)
Method + Path
PATCH /v1/workspace/:workspaceId
Actual backend path: /v1/workspace/:workspaceId
Description
Update workspace settings. All fields are optional - only provided fields will be updated.
Authentication
Required - JWT token in Authorization header
Required Permissions:
workspace.update
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Content-Type | string | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Request Body
{
"name": "Updated Workspace Name",
"slogan": "Updated slogan",
"email": "newemail@example.com"
}
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Workspace name (1-120 characters if provided) |
slogan | string | No | Workspace slogan (1-160 characters if provided) |
email | string | No | Workspace email address (must be valid email if provided) |
Response (200)
{
"workspace": {
"id": "507f1f77bcf86cd799439011",
"name": "Updated Workspace Name",
"slogan": "Updated slogan",
"email": "newemail@example.com",
"updatedAt": "2024-01-15T11:00:00Z"
}
}
Common Errors
- 400 Bad Request: Invalid request body
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Insufficient permissions (requires
workspace.update) - 404 Not Found: Workspace not found
- 409 Conflict: Email already exists
- 422 Unprocessable Entity: Validation errors
- 500 Internal Server Error: Server error