Delete Directory
curl --request DELETE \
--url https://api.app.shinzo.ai/v1/agent/{agentId}/filesystem/directories/{path} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recursive": true
}
'Agent Filesystem
Delete Directory
Delete a directory from an agent’s workspace.
DELETE
/
v1
/
agent
/
{agentId}
/
filesystem
/
directories
/
{path}
Delete Directory
curl --request DELETE \
--url https://api.app.shinzo.ai/v1/agent/{agentId}/filesystem/directories/{path} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recursive": true
}
'Authentication
Requires JWT token or Platform API key.string
required
Agent UUID
string
required
Directory path within the agent workspace (wildcard segment)
boolean
Delete the directory and all its contents recursively
Example Request
curl -X DELETE "https://api.app.shinzo.ai/v1/agent/agt_abc123/filesystem/directories/workspace/data/exports?recursive=true" \
-H "Authorization: Bearer <jwt_token>"
Response
{
"message": "Directory deleted successfully"
}
Status Codes
| Code | Description |
|---|---|
200 | Directory deleted successfully |
400 | Directory is not empty and recursive is not set to true |
401 | Invalid authentication |
403 | Access denied |
404 | Agent or directory not found |

