Library
File Scenario in Folder
Move one of your agents’ scenarios into a folder, or take it out.
PUT
/
v2
/
agents
/
library
/
scenario-folders
curl -X PUT https://api.bland.ai/v2/agents/library/scenario-folders \
-H "authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "b5154820-6f11-4886-8523-d896934528ae",
"node_id": "00fa3bcf-56f5-45b9-8996-427d57b091b7",
"folder_id": "6f0e2a6c-1d3b-4f6e-9a57-2c8d1e4b7a90"
}'
curl -X PUT https://api.bland.ai/v2/agents/library/scenario-folders \
-H "authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "b5154820-6f11-4886-8523-d896934528ae",
"node_id": "00fa3bcf-56f5-45b9-8996-427d57b091b7",
"folder_id": null
}'
{
"data": {
"agent_id": "b5154820-6f11-4886-8523-d896934528ae",
"node_id": "00fa3bcf-56f5-45b9-8996-427d57b091b7",
"folder_id": "6f0e2a6c-1d3b-4f6e-9a57-2c8d1e4b7a90"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Folder not found"
}
]
}
Overview
Files one scenario in a folder. If the scenario is already in a folder, it moves to the new one. Setfolder_id to null to take it out of its folder. Taking out a scenario that isn’t filed still succeeds.
Create the folder first with Create Folder. For how folders work, see List Scenario Folders.
Requires an admin, owner, operator, or prompter role. Restricted API keys can’t call this endpoint. Use a full-access key.
Headers
Body Parameters
The agent the scenario belongs to. Returns
404 NOT_FOUND if the agent isn’t in your organization or has been deleted.The scenario’s node ID: the
id of a scenario from List Library Scenarios. 1 to 200 characters. Bland doesn’t check that the agent has a node with this ID, so check it before you send it.The folder to file the scenario in, or
null to take it out of its folder. Returns 404 NOT_FOUND if the folder isn’t in your organization.agent_id or folder_id that isn’t a UUID, or a node_id outside 1 to 200 characters returns 400 BAD_REQUEST.
Response
curl -X PUT https://api.bland.ai/v2/agents/library/scenario-folders \
-H "authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "b5154820-6f11-4886-8523-d896934528ae",
"node_id": "00fa3bcf-56f5-45b9-8996-427d57b091b7",
"folder_id": "6f0e2a6c-1d3b-4f6e-9a57-2c8d1e4b7a90"
}'
curl -X PUT https://api.bland.ai/v2/agents/library/scenario-folders \
-H "authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "b5154820-6f11-4886-8523-d896934528ae",
"node_id": "00fa3bcf-56f5-45b9-8996-427d57b091b7",
"folder_id": null
}'
{
"data": {
"agent_id": "b5154820-6f11-4886-8523-d896934528ae",
"node_id": "00fa3bcf-56f5-45b9-8996-427d57b091b7",
"folder_id": "6f0e2a6c-1d3b-4f6e-9a57-2c8d1e4b7a90"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Folder not found"
}
]
}
Docs for agents: llms.txt
Was this page helpful?
⌘I
curl -X PUT https://api.bland.ai/v2/agents/library/scenario-folders \
-H "authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "b5154820-6f11-4886-8523-d896934528ae",
"node_id": "00fa3bcf-56f5-45b9-8996-427d57b091b7",
"folder_id": "6f0e2a6c-1d3b-4f6e-9a57-2c8d1e4b7a90"
}'
curl -X PUT https://api.bland.ai/v2/agents/library/scenario-folders \
-H "authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "b5154820-6f11-4886-8523-d896934528ae",
"node_id": "00fa3bcf-56f5-45b9-8996-427d57b091b7",
"folder_id": null
}'
{
"data": {
"agent_id": "b5154820-6f11-4886-8523-d896934528ae",
"node_id": "00fa3bcf-56f5-45b9-8996-427d57b091b7",
"folder_id": "6f0e2a6c-1d3b-4f6e-9a57-2c8d1e4b7a90"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Folder not found"
}
]
}