Skip to main content
POST /v1/agents/{agent_id}/archive Archives the specified Agent. Archived Agents are hidden from the default list but remain retrievable by ID.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>

Path parameters

ParameterTypeRequiredDescription
agent_idstringYesAgent unique identifier

Request body

No request body.

Example request

curl -X POST "https://api.qoder.com/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 an updated documentation testing assistant.",
  "tools": [],
  "mcp_servers": [],
  "skills": [],
  "metadata": {},
  "version": 2,
  "archived": true,
  "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 full Agent object after archival. updated_at reflects the time of the archive operation.
FieldTypeDescription
typestringAlways "agent"
idstringAgent unique identifier
namestringAgent name
descriptionstringAgent description
modelstringModel identifier
systemstringSystem prompt
toolsarray of Agent toolTool configuration list
mcp_serversarray of MCP serverMCP server configuration
skillsarray of Skill bindingSkill bindings
metadataMetadata objectCustom metadata
versionintegerCurrent version
archivedbooleanWhether archived
archived_atstring|nullArchive time (ISO 8601), null when not archived
created_atstringCreation time (ISO 8601)
updated_atstringLast update time (ISO 8601), refreshed on archive

Errors

HTTPTypeTrigger
401authentication_errorPAT invalid or expired
403permission_errorNot authorized to archive this Agent
404not_found_errorAgent with the given ID does not exist
See Errors for the full error envelope.

Notes

  • Archive retains Agent data.
  • Archived Agents are excluded from the default list returned by GET /v1/agents.
  • Pass include_archived=true on GET /v1/agents to include archived Agents in list results.
  • They remain retrievable via GET /v1/agents/{agent_id}.
  • The operation is idempotent; archiving an already-archived Agent does not raise an error.
  • Archiving does not increment the Agent version and does not create a version snapshot.

Agent setup

Create a reusable, versioned agent configuration.