Workspace Members
Add a Workspace Member
API Reference
Virtual Keys
Prompts
- POSTCreate Prompt
- GETList Prompts
- GETRetrieve Prompt
- PUTUpdate Prompt
- DELDelete Prompt
- PUTPublish Prompt
- GETList Prompt Versions
- GETRetrieve Prompt Version
- PUTUpdate Prompt Version
- Prompt Partials
- Prompt Labels
- Prompt Collections
API Keys
Analytics [BETA]
- Summary
- Groups Paginated Data
- Graphs - Time Series Data
User Invites
Workspaces
Workspace Members
OpenAPI
Add a Workspace Member
POST
/
admin
/
workspaces
/
{workspaceId}
/
users
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)
{}
Authorizations
Path Parameters
Body
application/json
Response
200 - application/json
OK
The response is of type object
.
Was this page helpful?
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)
{}