Update a workspace person
OpenAPI contract
- Method
- PATCH
- Path
/api/v1/workspaces/{id}/people/{personId}- Security
- jwtBearer (bearer)
- Response status
- 200 400 401 403 404 409 429 500
Request and response schemas
JSON
{
"requestBody": {
"application/json": {
"$ref": "#/components/schemas/UpdateWorkspacePersonRequest"
}
},
"responses": {
"200": {
"description": "Workspace person updated",
"content": {
"application/json": {
"$ref": "#/components/schemas/WorkspacePersonResponse"
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"404": {
"description": "Requested workspace resource was not found",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"409": {
"description": "Request conflicts with current workspace state",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}PATCH /api/v1/workspaces/{id}/people/{personId} is JWT-only and requires people:manage. Send a workspace role: ADMIN, DEVELOPER, VIEWER, or BILLING. The personId may identify either an active membership or a pending invitation in this workspace.
The service refuses to demote the workspace's last active ADMIN. A missing person, an inactive membership, or an ID from another workspace is reported as not found.
json
{"role":"VIEWER"}