Create a workspace group
curl --request POST \
--url https://agents.labs.bandwidth.com/api/v1/user/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"tenant_id": 123
}
'import requests
url = "https://agents.labs.bandwidth.com/api/v1/user/groups"
payload = {
"name": "<string>",
"tenant_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', tenant_id: 123})
};
fetch('https://agents.labs.bandwidth.com/api/v1/user/groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"group_id": 123,
"name": "<string>",
"tenant_id": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Workspace management
Create a workspace group
Add a group to a workspace you administer.
POST
/
api
/
v1
/
user
/
groups
Create a workspace group
curl --request POST \
--url https://agents.labs.bandwidth.com/api/v1/user/groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"tenant_id": 123
}
'import requests
url = "https://agents.labs.bandwidth.com/api/v1/user/groups"
payload = {
"name": "<string>",
"tenant_id": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', tenant_id: 123})
};
fetch('https://agents.labs.bandwidth.com/api/v1/user/groups', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"group_id": 123,
"name": "<string>",
"tenant_id": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Requires an OAuth bearer token and Admin or Owner access to the supplied tenant. Send
tenant_id and a nonempty name. Returns the new group_id and makes it the selected group. The creator becomes the group owner. API keys are not accepted.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.