from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Add user to workspace
user = portkey.admin.workspaces.users.create(
workspace_id="WORKSPACE_SLUG",
users=[
{
"id": "USER_ID",
"role": "member"
}
]
)
print(user)
{}
from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Add user to workspace
user = portkey.admin.workspaces.users.create(
workspace_id="WORKSPACE_SLUG",
users=[
{
"id": "USER_ID",
"role": "member"
}
]
)
print(user)
{}
OK
The response is of type object
.
Was this page helpful?