Archive an agent so it is hidden from the default listing while remaining accessible 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": "Used for API documentation testing",
"model": "ultimate",
"system": "You are the updated documentation testing assistant.",
"instructions": "You are the updated documentation testing assistant.",
"tools": [],
"mcp_servers": [],
"default_environment": "",
"version": 2,
"created_at": "2026-05-18T15:26:39.61669Z",
"updated_at": "2026-05-18T15:27:22.698411Z"
}
Response fields
Returns the full agent object after archival. The updated_at field is refreshed to the time of the archive operation.
|
Field |
Type |
Description |
|
|
string |
Always |
|
|
string |
Unique agent identifier. |
|
|
string |
Agent name. |
|
|
string |
Agent description. |
|
|
string |
Model identifier. |
|
|
string |
System prompt. |
|
|
string |
Alias of |
|
|
array |
Tool configuration. |
|
|
array |
MCP server configuration. |
|
|
string |
Default runtime environment. |
|
|
integer |
Current version number. |
|
|
string |
Creation time in ISO 8601. |
|
|
string |
Last update time in ISO 8601. Refreshed on archive. |
Errors
|
HTTP |
Type |
Trigger |
|
401 |
|
The PAT is invalid or expired. |
|
403 |
|
Caller lacks permission to archive this agent. |
|
404 |
|
No agent exists with the given ID. |
See Errors for the full error envelope.
Archive vs. delete
|
Action |
Effect |
Recoverable |
|
Archive |
The agent is hidden from the default listing; data is retained. |
Yes (unarchive supported). |
|
The agent is permanently removed. |
No. |
Notes
-
Archival is a soft delete; agent data remains in the system.
-
Archived agents are excluded from the default response of
GET /v1/agents. -
Archived agents are still retrievable via
GET /v1/agents/{agent_id}. -
The operation is idempotent; archiving an already-archived agent does not raise an error.