PUT
/
open
/
workspaces
/
{workspaceId}
/
users
/
{userId}
/
update-role
curl --request PUT \
  --url https://api.opnform.com/open/workspaces/{workspaceId}/users/{userId}/update-role \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "role": "admin"
}'

Update Workspace User Role

Change a member’s role within a workspace.

Authentication & Scope

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

Request

PUT /open/workspaces/{workspaceId}/users/{userId}/update-role HTTP/1.1
Host: api.opnform.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:

{
  "role": "readonly"
}

Response

200 OK – Confirmation message.

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

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

Authorizations

Authorization
string
header
required

Personal Access Token

Path Parameters

workspaceId
string
required
userId
string
required

Body

application/json

Response

200

Role updated