Switch the selected workspace group
curl --request POST \
--url https://agents.labs.bandwidth.com/api/v1/user/groups/{group_id}/switch \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.labs.bandwidth.com/api/v1/user/groups/{group_id}/switch"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.labs.bandwidth.com/api/v1/user/groups/{group_id}/switch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"selected_organization_id": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Workspace management
Switch the selected workspace group
Change the workspace group used by bearer-authenticated requests.
POST
/
api
/
v1
/
user
/
groups
/
{group_id}
/
switch
Switch the selected workspace group
curl --request POST \
--url https://agents.labs.bandwidth.com/api/v1/user/groups/{group_id}/switch \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.labs.bandwidth.com/api/v1/user/groups/{group_id}/switch"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.labs.bandwidth.com/api/v1/user/groups/{group_id}/switch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"selected_organization_id": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Requires an OAuth bearer token and membership in the target group. Returns
selected_organization_id. API keys do not use this operation: select their workspace per request with X-VOAI-ORGANIZATION-ID. Changing selection affects subsequent bearer requests for the account.Authorizations
Bandwidth Labs OAuth access token. Uses the user's selected workspace; the workspace header is not required. Do not also send an API key. Bearer-only operations may additionally require the Labs super_user role.
Path Parameters
Response
Successful Response