Skip to main content

Delete Agent

Soft-delete an Agent by marking its 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-deletes an Agent (marks its status as deleted). The API is idempotent: repeated deletion attempts will not return an error.
Deleting an Agent requires the 'Knowledge Base - Delete' permission.
The deletion operation is irreversible. Once deleted, the Agent cannot be restored, and its associated agent_id will no longer be usable for knowledge/search and knowledge/chat calls.

Authorizations

string
header
required

DashScope API Key,在控制台 API Key 页面 获取。

Body

application/json
string
required

Agent ID。

Response

200-application/json
string

请求唯一标识,排查问题时请提供此 ID。

integer

HTTP 状态码。

string

响应码,成功时为 Success。

string

提示信息。

enum<string>

请求状态:SUCCESS 或 FAILED。

SUCCESS,FAILED
boolean

请求是否成功。

string

Agent ID。

string

Agent 状态,删除后为 deleted。