Skip to main content

Copy Agent

Copy an existing Agent to generate a new draft

POST
/api/v1/indices/rag/app/copy
cURL
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/app/copy" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "aid-8f3a1b2c4d5e6f70"
}'
{
  "request_id": "a7b8c9d0-e1f2-3456-abcd-567890123456",
  "status_code": 200,
  "code": "Success",
  "message": "",
  "status": "SUCCESS",
  "success": true,
  "data": {
    "agent_id": "aid-9a0b1c2d3e4f5678",
    "agent_name": "copy_Customer Service Q&A Assistant v2",
    "agent_version": "beta",
    "agent_status": "draft"
  }
}
Copy an existing Agent to generate a new Agent (name automatically prefixed with copy_), with status draft and version beta.
Copying an Agent requires Knowledge Base - Create permission.

Authorizations

string
header
required

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

Body

application/json
string
required

Source 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.

object