Archive a specified Agent. Archived Agents no longer appear in the default list but remain accessible by ID.
POST /api/v1/cloud/agents/{agent_id}/archive
Archive a specified Agent. Once archived, the Agent will not appear in the default list but can still be accessed directly by ID.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
Path parameters
|
Parameter |
Type |
Required |
Description |
|
|
string |
Yes |
Unique Agent identifier |
Request body
No request body is required.
Example request
curl -X POST "https://api.qoder.com.cn/api/v1/cloud/agents/agent_019eXXXX.../archive" \
-H "Authorization: Bearer $QODER_PAT"
Example response
HTTP 200 OK
{
"type": "agent",
"id": "agent_019eXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"name": "doc-test-agent-updated",
"description": "For API documentation testing",
"model": "ultimate",
"system": "You are the updated documentation testing assistant.",
"tools": [],
"mcp_servers": [],
"skills": [],
"metadata": {},
"multiagent": null,
"version": 2,
"archived_at": "2026-05-18T15:27:22.698411Z",
"created_at": "2026-05-18T15:26:39.61669Z",
"updated_at": "2026-05-18T15:27:22.698411Z"
}
Response fields
Returns the complete Agent object after archiving. The updated_at field is set to the time of the archive operation.
|
Field |
Type |
Description |
|
|
string |
Fixed value |
|
|
string |
Unique Agent identifier |
|
|
string |
Agent name |
|
|
string |
Agent description |
|
|
string |
Model identifier |
|
|
string |
System prompt |
|
|
Agent tool array |
Tool configuration list |
|
|
MCP server array |
MCP server configuration |
|
|
Skill binding array |
Skill binding list |
|
|
Metadata object |
Custom metadata |
|
|
Multiagent | null |
Multi-agent configuration. |
|
|
integer |
Current version number |
|
|
string|null |
Archive timestamp (ISO 8601). |
|
|
string |
Creation timestamp (ISO 8601) |
|
|
string |
Last updated timestamp (ISO 8601), refreshed on archive |
Errors
|
HTTP |
type |
Condition |
|
401 |
|
PAT is invalid or expired |
|
403 |
|
Insufficient permissions to archive this Agent |
|
404 |
|
The Agent with the specified ID does not exist |
Notes
-
Archiving preserves the Agent data
-
Archived Agents do not appear in the default list of
GET /api/v1/cloud/agents -
Pass
include_archived=truetoGET /api/v1/cloud/agentsto include archived Agents in the list -
Archived Agents can still be accessed directly via
GET /api/v1/cloud/agents/{agent_id} -
The archive operation is idempotent; archiving an already-archived Agent does not return an error
-
Archiving does not increment the Agent's
versionand does not create a new version snapshot