All Products
Search
Document Center

:Archive an agent

Last Updated:Jul 16, 2026

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

Authorization

Yes

Bearer <PAT>

Path parameters

Parameter

Type

Required

Description

agent_id

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

type

string

Fixed value "agent"

id

string

Unique Agent identifier

name

string

Agent name

description

string

Agent description

model

string

Model identifier

system

string

System prompt

tools

Agent tool array

Tool configuration list

mcp_servers

MCP server array

MCP server configuration

skills

Skill binding array

Skill binding list

metadata

Metadata object

Custom metadata

multiagent

Multiagent | null

Multi-agent configuration. null when not set

version

integer

Current version number

archived_at

string|null

Archive timestamp (ISO 8601). null when not archived

created_at

string

Creation timestamp (ISO 8601)

updated_at

string

Last updated timestamp (ISO 8601), refreshed on archive

Errors

HTTP

type

Condition

401

authentication_error

PAT is invalid or expired

403

permission_error

Insufficient permissions to archive this Agent

404

not_found_error

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=true to GET /api/v1/cloud/agents to 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 version and does not create a new version snapshot