Skip to main content
POST
/
agent
/
delete
/
:id
Delete Agent
curl --request POST \
  --url https://api.example.com/agent/delete/:id

Delete Agent

Permanently delete an agent and all its associated resources including persistent storage.

Endpoint

POST /agent/delete/:id

Authentication

Requires JWT token or Platform API key.

Path Parameters

ParameterTypeDescription
idstringAgent UUID

Request Body

FieldTypeDefaultDescription
forcebooleanfalseForce delete even if agent has running tasks

Example Request

curl -X POST https://api.app.shinzo.ai/agent/delete/agt_abc123def456 \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{}'

Response

{
  "message": "Agent deleted successfully",
  "uuid": "agt_abc123def456",
  "deleted_at": "2025-01-20T16:00:00Z"
}

Status Codes

CodeDescription
200Agent deleted successfully
401Invalid authentication
403AI Agents feature not enabled
404Agent not found
409Agent has running tasks (use force: true to override)
This action is permanent and cannot be undone. All agent data including files, task history, and configuration will be deleted.

Force Delete

If the agent has running tasks, you must either:
  1. Cancel the running tasks first
  2. Use force: true in the request body to delete anyway
curl -X POST https://api.app.shinzo.ai/agent/delete/agt_abc123def456 \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{"force": true}'