Delete an agent
curl --request DELETE \
--url https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Agents
Delete an agent
Permanently delete an agent that has no dependent runs or campaigns.
DELETE
/
api
/
v1
/
workflow
/
{workflow_id}
Delete an agent
curl --request DELETE \
--url https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agents.labs.bandwidth.com/api/v1/workflow/{workflow_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}This permanently deletes the agent. To retain history and stop using an agent, archive it instead.
404.
If campaigns or runs still depend on the agent, the service returns 409. Inspect detail.blockers; resolve the dependencies where supported or archive the agent. The service does not silently delete dependent history.
{
"detail": {
"detail": "Cannot delete workflow with active dependents",
"blockers": {"workflow_runs": 2}
}
}
Authorizations
LabsAuthLabsApiKey
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
Response
Successful Response