---
title: "Archive Agent"
method: POST
path: "/v1/agents/{agent_id}/archive?beta=true"
---

# Archive Agent

`POST /v1/agents/{agent_id}/archive?beta=true`

## Request

- Base URL: `https://api.anthropic.com`
- URL: `https://api.anthropic.com/v1/agents/{agent_id}/archive?beta=true`
- Auth: none declared
- TypeScript: <https://skmtc.dev/anthropics/apis/anthropic-api/docs/v1/agents/:agent_id/archive%3Fbeta=true/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `agent_id` string, required

## Headers

- `anthropic-version` string: The version of the Claude API you want to use. Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
- `anthropic-beta` AnthropicBeta[]: This endpoint is in beta: requests must send `managed-agents-2026-04-01` in this header.
  - union: Beta names you can send in the `anthropic-beta` header. See [Beta headers](https://platform.claude.com/docs/en/api/beta-headers) for how to send them and where to find the name a feature needs.
    - string
    - 'message-batches-2024-09-24' | 'prompt-caching-2024-07-31' | 'computer-use-2024-10-22' | 'computer-use-2025-01-24' | 'pdfs-2024-09-25' | 'token-counting-2024-11-01' | 'token-efficient-tools-2025-02-19' | 'output-128k-2025-02-19' | 'files-api-2025-04-14' | 'mcp-client-2025-04-04' | 'mcp-client-2025-11-20' | 'dev-full-thinking-2025-05-14' | 'interleaved-thinking-2025-05-14' | 'code-execution-2025-05-22' | 'extended-cache-ttl-2025-04-11' | 'context-1m-2025-08-07' | 'context-management-2025-06-27' | 'model-context-window-exceeded-2025-08-26' | 'skills-2025-10-02' | 'fast-mode-2026-02-01' | 'output-300k-2026-03-24' | 'user-profiles-2026-03-24' | 'user-profiles-2026-08-18' | 'user-profiles-2026-09-04' | 'advisor-tool-2026-03-01' | 'managed-agents-2026-04-01' | 'cache-diagnosis-2026-04-07' | 'dreaming-2026-04-21' | 'thinking-token-count-2026-05-13' | 'server-side-fallback-2026-06-01' | 'server-side-fallback-2026-07-01' | 'fallback-credit-2026-06-01' | 'fallback-credit-2026-07-01' | 'agent-memory-2026-07-22' | 'mid-conversation-tool-changes-2026-07-01' | 'compact-2026-01-12' | 'computer-use-2025-11-24' | 'mcp-tunnels-2026-06-22' | 'structured-outputs-2025-11-13' | 'task-budgets-2026-03-13' | 'thinking-display-updates-2026-08-18' | 'ce-user-management-2026-07-13' | 'mid-conversation-output-config-2026-07-01' | 'thinking-binding-controls-2026-08-01' | 'mid-conversation-system-clear-at-2026-08-21' | 'compact-2026-09-04' | 'inline-tools-2026-09-15' | 'mcp-client-2026-09-15' | 'ce-plugins-2026-09-01' | 'spend-limit-reads-2026-09-26' | 'telemetry-destinations-2026-08-11' | 'webhooks-2026-10-07' | 'admin-user-sign-out-2026-10-08' | 'message-threads-2026-08-12' | 'analytics-usage-cost-2026-08-24' | 'experimental-claude-tag-2026-10-21'
- `anthropic-workspace-id` string

## Response `200`

Successful response (OK)

- BetaManagedAgentsAgent: A Managed Agents `agent`.
  - `type` 'agent', required
  - `id` string, required
  - `version` integer, required: The agent's current version. Starts at 1 and increments when the agent is modified.
  - `name` string, required
  - `description` string, nullable, required
  - `model` BetaManagedAgentsModelConfig, required: Model identifier and configuration.
    - `id` union, required: The model that will power your agent. See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
      - 'claude-fable-5-2': Built for the most ambitious work in coding, enterprise workflows, and the sciences
      - 'claude-haiku-5-5': Fastest model for high-volume, real-time tasks
      - 'claude-sonnet-5-5': Efficient model for coding and agents
      - 'claude-opus-5-5': Powerful intelligence for coding, knowledge work, and long-running agents
      - 'claude-fable-5-1': Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows
      - 'claude-sonnet-5': Efficient model for coding and agents
      - 'claude-fable-5': Next generation of intelligence for the hardest knowledge work and coding problems
      - 'claude-opus-5': Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-8': Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-7': Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-6': Powerful intelligence for long-running agents and coding
      - 'claude-sonnet-4-6': Best combination of speed and intelligence
      - 'claude-haiku-4-5'
      - 'claude-haiku-4-5-20251001'
      - 'claude-opus-4-5': Powerful intelligence for long-running agents and coding
      - 'claude-opus-4-5-20251101': Powerful intelligence for long-running agents and coding
      - 'claude-sonnet-4-5': High-performance model for agents and coding
      - 'claude-sonnet-4-5-20250929': High-performance model for agents and coding
      - string
    - `speed` 'standard' | 'fast'
    - `effort` union: How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.
      - object: Low effort. Favors latency over reasoning depth.
        - `type` 'low', required
      - object: Medium effort. Balances latency and reasoning depth.
        - `type` 'medium', required
      - object: High effort. Favors reasoning depth.
        - `type` 'high', required
      - object: Extra-high effort. Not all models accept this level.
        - `type` 'xhigh', required
      - object: Maximum effort. Favors reasoning depth over latency.
        - `type` 'max', required
    - `inference_geo` string: Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.
  - `system` string, nullable, required
  - `tools` BetaManagedAgentsAgentTool[], required
    - union: Union type for tool configurations returned in API responses.
      - object
        - `type` 'agent_toolset_20260401', required
        - `default_config` BetaManagedAgentsAgentToolsetDefaultConfig, required: Resolved default configuration for agent tools.
          - `enabled` boolean, required
          - `permission_policy` union, required: Permission policy for tool execution.
            - object: Tool calls are automatically approved without user confirmation.
              - …
            - object: Tool calls require user confirmation before execution.
              - …
            - object: The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.
              - …
        - `configs` BetaManagedAgentsAgentToolConfigUnion[], required
          - union: Configuration for a specific agent tool.
            - object: Configuration for the bash tool.
              - …
            - object: Configuration for the edit tool.
              - …
            - object: Configuration for the read tool.
              - …
            - object: Configuration for the write tool.
              - …
            - object: Configuration for the glob tool.
              - …
            - object: Configuration for the grep tool.
              - …
            - object: Configuration for the web_fetch tool.
              - …
            - object: Configuration for the web_search tool.
              - …
      - object
        - `type` 'mcp_toolset', required
        - `mcp_server_name` string, required
        - `default_config` BetaManagedAgentsMCPToolsetDefaultConfig, required: Resolved default configuration for all tools from an MCP server.
          - `enabled` boolean, required
          - `permission_policy` union, required: Permission policy for tool execution.
            - object: Tool calls are automatically approved without user confirmation.
              - …
            - object: Tool calls require user confirmation before execution.
              - …
            - object: The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.
              - …
        - `configs` BetaManagedAgentsMCPToolConfig[], required
          - `name` string, required
          - `enabled` boolean, required
          - `permission_policy` union, required: Permission policy for tool execution.
            - object: Tool calls are automatically approved without user confirmation.
              - …
            - object: Tool calls require user confirmation before execution.
              - …
            - object: The server decides each tool call individually: it judges, from the tool, its input, and the session content so far, whether the call is safe to execute or high-risk, and evaluates it to allow when judged safe and to deny when judged high-risk. A call the server cannot reach a judgement on evaluates to ask.
              - …
      - object: A custom tool as returned in API responses.
        - `type` 'custom', required
        - `name` string, required
        - `description` string, required
        - `input_schema` BetaManagedAgentsCustomToolInputSchema, required: JSON Schema for custom tool input parameters.
          - `properties` object, nullable
          - `required` string[], nullable
          - `type` 'object', required
  - `mcp_servers` BetaManagedAgentsMCPServer[], required
    - `type` 'url', required
    - `name` string, required
    - `url` string, required
  - `skills` BetaManagedAgentsSkill[], required
    - union: Resolved skill as returned in API responses.
      - BetaManagedAgentsAnthropicSkill: A resolved Anthropic-managed skill.
        - `type` 'anthropic', required
        - `skill_id` string, required
        - `version` string, required
      - BetaManagedAgentsCustomSkill: A resolved user-created custom skill.
        - `type` 'custom', required
        - `skill_id` string, required
        - `version` string, required
  - `metadata` object, required
  - `created_at` string, date-time, required: A timestamp in RFC 3339 format
  - `updated_at` string, date-time, required: A timestamp in RFC 3339 format
  - `archived_at` string, date-time, required: A timestamp in RFC 3339 format
  - `multiagent` union, required: Resolved multiagent orchestration configuration as returned in API responses.
    - object: Resolved coordinator topology with a concrete agent roster.
      - `type` 'coordinator', required
      - `agents` BetaManagedAgentsMultiagentRosterEntry[], required: Agents the coordinator may spawn as session threads, each resolved to a specific version.
        - union: A resolved multiagent roster entry.
          - BetaManagedAgentsAgentReference: A resolved agent reference with a concrete version.
            - `type` 'agent', required
            - `id` string, required
            - `version` integer, required
          - BetaManagedAgentsAdvisor: Platform advisor roster entry: a model the session's primary thread may consult mid-turn.
            - `type` 'advisor', required
            - `model` string, required: The advisor model id.
    - object: Resolved multiagent configuration with three members, each enabled or disabled on its own.
      - `type` 'multiagent_20261001', required
      - `workflows` union, required: Whether the agent can start workflow runs.
        - BetaManagedAgentsMultiagentWorkflowsEnabled: The agent can start workflow runs.
          - `type` 'enabled', required
          - `inline_agents` union, required: Whether the agent can define inline agents. The agent defines an inline agent itself, in a workflow run's plan or when it spawns a session thread, and the inline agent is not saved.
            - BetaManagedAgentsMultiagentInlineAgentsEnabled: The agent can define inline agents.
              - …
            - BetaManagedAgentsMultiagentInlineAgentsDisabled: The agent cannot define inline agents.
              - …
          - `predefined_agents` BetaManagedAgentsAgentReference[], required: Predefined agents, which are saved agents that a run's plan can use, each resolved to a specific version.
            - `type` 'agent', required
            - `id` string, required
            - `version` integer, required
        - BetaManagedAgentsMultiagentWorkflowsDisabled: The agent cannot start workflow runs.
          - `type` 'disabled', required
      - `subagents` union, required: Whether the agent can spawn session threads.
        - BetaManagedAgentsMultiagentSubagentsEnabled: The agent can spawn session threads.
          - `type` 'enabled', required
          - `inline_agents` union, required: Whether the agent can define inline agents. The agent defines an inline agent itself, in a workflow run's plan or when it spawns a session thread, and the inline agent is not saved.
            - BetaManagedAgentsMultiagentInlineAgentsEnabled: The agent can define inline agents.
              - …
            - BetaManagedAgentsMultiagentInlineAgentsDisabled: The agent cannot define inline agents.
              - …
          - `predefined_agents` BetaManagedAgentsAgentReference[], required: Predefined agents, which are saved agents that this agent can spawn as session threads, each resolved to a specific version.
            - `type` 'agent', required
            - `id` string, required
            - `version` integer, required
        - BetaManagedAgentsMultiagentSubagentsDisabled: The agent cannot spawn session threads.
          - `type` 'disabled', required
      - `advisor` union, required: Whether the session's primary thread can consult an advisor model.
        - BetaManagedAgentsMultiagentAdvisorEnabled: The session's primary thread can consult `model` mid-turn.
          - `type` 'enabled', required
          - `model` string, required: The advisor model id.
        - BetaManagedAgentsMultiagentAdvisorDisabled: The agent has no advisor.
          - `type` 'disabled', required
  - `execution_identity` union, required: Execution principal for runs of this agent as returned in API responses.
    - BetaManagedAgentsAwsRoleExecutionIdentity: An AWS IAM role principal as returned in API responses.
      - `type` 'aws_role', required
      - `role_arn` string, required: The IAM role's ARN.
    - BetaManagedAgentsServiceAccountExecutionIdentity: The Anthropic-managed service account as returned in API responses.
      - `type` 'service_account', required

## Other responses

- `400`: Invalid argument - The client specified an invalid argument
- `401`: Unauthenticated - The request does not have valid authentication credentials
- `403`: Permission denied - The caller does not have permission to execute the specified operation
- `404`: Not found - Some requested entity was not found
- `408`: Deadline exceeded - The deadline expired before the operation could complete
- `409`: Aborted - The operation was aborted due to concurrency issue
- `412`: Failed precondition - Operation was rejected because the system is not in required state
- `413`: Out of range - Operation was attempted past the valid range
- `429`: Resource exhausted - Some resource has been exhausted (rate limiting)
- `431`: Request header fields too large - Request metadata was too large
- `499`: Cancelled - The operation was cancelled by the client
- `500`: Internal - Internal server error
- `501`: Unimplemented - The operation is not implemented or supported
- `503`: Unavailable - The service is currently unavailable
- `504`: Deadline exceeded - Upstream service did not respond in time

## Changes

- **2026-11-09** `d53195e9d075`: 1 info
  - added `subschema #1` to the `model/id` response property `anyOf` list for the response status `200`
- **2026-11-05** `037a593978dc`: 1 info
  - added the enum value `admin-user-sign-out-2026-10-08` to the property `items/anyOf[subschema #2]/` of the `header` request parameter `anthropic-beta`
- **2026-11-02** `9578ce4001dd`: 1 info
  - the `tools/items/oneOf[#/components/schemas/BetaManagedAgentsAgentToolset20260401]/configs/items/oneOf[#/components/schemas/BetaManagedAgentsWebSearchToolConfig]/user_location/anyOf[#/components/schemas/BetaManagedAgentsUserLocation]/country/anyOf[subschema #1]/` response's property pattern `^[A-Z]{2}$` was added for the status `200`
- **2026-10-23** `f538a797852c`: 1 info
  - added the enum value `experimental-claude-tag-2026-10-21` to the property `items/anyOf[subschema #2]/` of the `header` request parameter `anthropic-beta`
- **2026-10-23** `8071e43a8476`: 1 info
  - added the enum value `analytics-usage-cost-2026-08-24` to the property `items/anyOf[subschema #2]/` of the `header` request parameter `anthropic-beta`

[Operation history](https://skmtc.dev/anthropics/apis/anthropic-api/changes/v1/agents/:agent_id/archive%3Fbeta=true/post.md)

---

[API](https://skmtc.dev/anthropics/apis/anthropic-api.md) - [All operations](https://skmtc.dev/anthropics/apis/anthropic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anthropics/apis/anthropic-api/revisions/690622377a5e?raw)
