curl --request PUT \
--url https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id}/folder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folder_id": 123
}
'import requests
url = "https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id}/folder"
payload = { "folder_id": 123 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({folder_id: 123})
};
fetch('https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id}/folder', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"name": "<string>",
"status": "<string>",
"total_runs": 123,
"assistant_mode": "<string>",
"created_by": "<string>",
"folder_id": 123,
"workflow_uuid": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Move an agent to a folder
Assign a workspace folder or move an agent to Uncategorized.
curl --request PUT \
--url https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id}/folder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folder_id": 123
}
'import requests
url = "https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id}/folder"
payload = { "folder_id": 123 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({folder_id: 123})
};
fetch('https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id}/folder', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": "2023-11-07T05:31:56Z",
"id": 123,
"name": "<string>",
"status": "<string>",
"total_runs": 123,
"assistant_mode": "<string>",
"created_by": "<string>",
"folder_id": 123,
"workflow_uuid": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}folder_id, or null to remove the folder assignment. The destination folder and agent must belong to the requested workspace; otherwise the operation returns 404.
The response is an agent summary. Moving an agent changes its organization within the workspace; it does not move the agent to another workspace or publish its draft.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.
Headers
Required with X-BW-LABS-AGENTS-API-KEY: the positive local workspace ID to access. The key owner must be a current member. Missing or invalid IDs return 400; non-member workspaces return 403. Not required for bearer authentication, which uses the user's selected workspace.
Path Parameters
Body
Response
Successful Response
Numeric workspace agent ID used by management endpoints.
Number of runs recorded for this agent.
Workspace folder ID, or null for Uncategorized.
Stable agent UUID used by the call-by-agent endpoint.