PUT
/
admin
/
workspaces
/
{workspaceId}
/
users
/
{userId}
from portkey_ai import Portkey

# Initialize the Portkey client
portkey = Portkey()

# Update user in workspace
updated_user = portkey.admin.workspaces.users.update(
workspace_id='WORKSPACE_SLUG',
user_id="USER_ID",
role='member'
)

print(updated_user)
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required
userId
string
required

Body

application/json

Response

200 - application/json

OK

The response is of type object.