SSharaFormsDocs
Workspace Users

Update User Role

Change a member's role within a workspace.

PUT/open/workspaces/{workspaceId}/users/{userId}/update-role

Change a member's role within a workspace.

#Authentication & Scope

Requires the workspace-users-write ability and admin privileges in the workspace.

#Request

http
PUT /open/workspaces/{workspaceId}/users/{userId}/update-role HTTP/1.1
Host: api.sharaforms.com
Content-Type: application/json
Authorization: Bearer <token>

#Path Parameters

ParameterTypeDescription
workspaceIdnumberID of the workspace.
userIdnumberID of the user to update.

#Body Parameters

FieldTypeRequiredDescription
rolestringYesNew role (admin, user, or readonly).

Example:

json
{
  "role": "readonly"
}

#Response

200 OK – Confirmation message.

json
{
  "message": "User role changed successfully."
}

403 Forbidden – Token lacks workspace-users-write or you lack permission.