Skip to main content

Delete Agent

Soft delete an Agent, marking status as deleted

POST
/api/v1/indices/rag/app/delete
cURL
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/app/delete" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "aid-8f3a1b2c4d5e6f70"
}'
{
  "request_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
  "status_code": 200,
  "code": "Success",
  "message": "",
  "status": "SUCCESS",
  "success": true,
  "data": {
    "agent_id": "aid-8f3a1b2c4d5e6f70",
    "agent_status": "deleted"
  }
}
Soft delete an Agent (marks status as deleted). The API is idempotent: repeated deletions do not error.
Deleting an Agent requires Knowledge Base - Delete permission.
Deletion is irreversible. Once deleted, the Agent cannot be restored and the associated agent_id can no longer be used for knowledge/search and knowledge/chat calls.

Authorizations

string
header
required

DashScope API Key, obtained from the API Key page in the console.

Body

application/json
string
required

Agent ID.

Response

200-application/json
string

Unique request identifier. Provide this ID when troubleshooting issues.

integer

HTTP status code.

string

Response code. Success on success.

string

Informational message.

enum<string>

Request status: SUCCESS or FAILED.

SUCCESS,FAILED
boolean

Whether the request succeeded.

string

Agent ID.

string

Agent status. deleted after deletion.