Skip to content

Update Role

POST/web/v1/workspaces/{workspaceId}/roles/{roleId}/update JWT

Updates an existing custom workspace role's name and/or description.

Required Headers

HeaderExample ValueDescription
Content-Typeapplication/jsonRequest content type
Acceptapplication/jsonExpected response type
X-Client-HashClient device fingerprint
Accept-Languageen, zh, zh-Hant, ja, viResponse language (default: en)
AuthorizationBearerJWT access token
X-Workspace-IdTarget workspace ID

Request Parameters

NameTypeRequiredInDescription
workspaceIdStringRequiredpathBusiness ID of the workspace
roleIdStringRequiredpathBusiness ID of the role

Request Body

json
{
  "roleName": "New Name",
  "description": "New description"
}

Request Example

json
{
  "roleName": "Senior Editor",
  "description": "Can edit and review"
}

Success Response

Status: 200 OK

Success 200
{
  "version": "1.3.0",
  "timestamp": 1709337600000,
  "success": true,
  "code": "2000",
  "message": "SUCCESS",
  "data": {
    "bizId": "ROLE_CUSTOM_TEST_001",
    "workspaceBizId": "WS_ROLE_TEST_001",
    "roleName": "New Name",
    "roleType": {
      "value": 10010902,
      "name": "CUSTOM",
      "code": "CUSTOM"
    },
    "description": "New description",
    "permissionCodes": null,
    "createdAt": "2026-03-22T10:30:00Z",
    "updatedAt": "2026-03-22T11:00:00Z"
  }
}

Error Responses

Unauthorized 401
{
  "success": false,
  "code": "4010",
  "message": "Invalid or expired token"
}
Conflict 409
{
  "success": false,
  "code": "WORKSPACE.OWNER_ROLE_PROTECTED",
  "message": "OWNER role cannot be modified"
}

Notes

  • Only CUSTOM roles can be updated. Attempting to update an OWNER role returns 409 WORKSPACE.OWNER_ROLE_PROTECTED.
  • Requires workspace:role:write permission.

SlaunchX Internal Documentation