Skip to main content

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

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>
Content-TypestringYesapplication/json

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier

Request Body

{
"name": "Updated Workspace Name",
"slogan": "Updated slogan",
"email": "newemail@example.com"
}

Body Parameters

ParameterTypeRequiredDescription
namestringNoWorkspace name (1-120 characters if provided)
sloganstringNoWorkspace slogan (1-160 characters if provided)
emailstringNoWorkspace 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