---
title: Archive Session Thread
url: https://platform.claude.com/docs/en/api/csharp/beta/sessions/threads/archive
---

# Archive Session Thread

`BetaManagedAgentsSessionThread Beta.Sessions.Threads.Archive(parameters, cancellationToken = default)`

**POST** `/v1/sessions/{session_id}/threads/{thread_id}/archive`

Archive Session Thread

## Parameters

- `ThreadArchiveParams parameters`

  - `required string sessionID` (path parameter)

  - `required string threadID` (path parameter)

  - `IReadOnlyList<AnthropicBeta> betas` (header parameter)

    This endpoint is in beta: requests must send `managed-agents-2026-04-01` in this header.

    - `MessageBatches2024_09_24("message-batches-2024-09-24")`

    - `PromptCaching2024_07_31("prompt-caching-2024-07-31")`

    - `ComputerUse2024_10_22("computer-use-2024-10-22")`

    - `ComputerUse2025_01_24("computer-use-2025-01-24")`

    - `Pdfs2024_09_25("pdfs-2024-09-25")`

    - `TokenCounting2024_11_01("token-counting-2024-11-01")`

    - `TokenEfficientTools2025_02_19("token-efficient-tools-2025-02-19")`

    - `Output128k2025_02_19("output-128k-2025-02-19")`

    - `FilesApi2025_04_14("files-api-2025-04-14")`

    - `McpClient2025_04_04("mcp-client-2025-04-04")`

    - `McpClient2025_11_20("mcp-client-2025-11-20")`

    - `DevFullThinking2025_05_14("dev-full-thinking-2025-05-14")`

    - `InterleavedThinking2025_05_14("interleaved-thinking-2025-05-14")`

    - `CodeExecution2025_05_22("code-execution-2025-05-22")`

    - `ExtendedCacheTtl2025_04_11("extended-cache-ttl-2025-04-11")`

    - `Context1m2025_08_07("context-1m-2025-08-07")`

    - `ContextManagement2025_06_27("context-management-2025-06-27")`

    - `ModelContextWindowExceeded2025_08_26("model-context-window-exceeded-2025-08-26")`

    - `Skills2025_10_02("skills-2025-10-02")`

    - `FastMode2026_02_01("fast-mode-2026-02-01")`

    - `Output300k2026_03_24("output-300k-2026-03-24")`

    - `UserProfiles2026_03_24("user-profiles-2026-03-24")`

    - `UserProfiles2026_08_18("user-profiles-2026-08-18")`

    - `UserProfiles2026_09_04("user-profiles-2026-09-04")`

    - `AdvisorTool2026_03_01("advisor-tool-2026-03-01")`

    - `ManagedAgents2026_04_01("managed-agents-2026-04-01")`

    - `CacheDiagnosis2026_04_07("cache-diagnosis-2026-04-07")`

    - `Dreaming2026_04_21("dreaming-2026-04-21")`

    - `ThinkingTokenCount2026_05_13("thinking-token-count-2026-05-13")`

    - `ServerSideFallback2026_06_01("server-side-fallback-2026-06-01")`

    - `ServerSideFallback2026_07_01("server-side-fallback-2026-07-01")`

    - `FallbackCredit2026_06_01("fallback-credit-2026-06-01")`

    - `FallbackCredit2026_07_01("fallback-credit-2026-07-01")`

    - `AgentMemory2026_07_22("agent-memory-2026-07-22")`

    - `MidConversationToolChanges2026_07_01("mid-conversation-tool-changes-2026-07-01")`

    - `Compact2026_01_12("compact-2026-01-12")`

    - `ComputerUse2025_11_24("computer-use-2025-11-24")`

    - `McpTunnels2026_06_22("mcp-tunnels-2026-06-22")`

    - `StructuredOutputs2025_11_13("structured-outputs-2025-11-13")`

    - `TaskBudgets2026_03_13("task-budgets-2026-03-13")`

    - `ThinkingDisplayUpdates2026_08_18("thinking-display-updates-2026-08-18")`

    - `CEUserManagement2026_07_13("ce-user-management-2026-07-13")`

    - `MidConversationOutputConfig2026_07_01("mid-conversation-output-config-2026-07-01")`

    - `ThinkingBindingControls2026_08_01("thinking-binding-controls-2026-08-01")`

    - `MidConversationSystemClearAt2026_08_21("mid-conversation-system-clear-at-2026-08-21")`

    - `Compact2026_09_04("compact-2026-09-04")`

    - `InlineTools2026_09_15("inline-tools-2026-09-15")`

    - `McpClient2026_09_15("mcp-client-2026-09-15")`

    - `CEPlugins2026_09_01("ce-plugins-2026-09-01")`

    - `SpendLimitReads2026_09_26("spend-limit-reads-2026-09-26")`

    - `TelemetryDestinations2026_08_11("telemetry-destinations-2026-08-11")`

    - `Webhooks2026_10_07("webhooks-2026-10-07")`

    - `MessageThreads2026_08_12("message-threads-2026-08-12")`

    - `AnalyticsUsageCost2026_08_24("analytics-usage-cost-2026-08-24")`

    - `ExperimentalClaudeTag2026_10_21("experimental-claude-tag-2026-10-21")`

  - `string workspaceID` (header parameter)

    Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

    Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

## Returns

- `class BetaManagedAgentsSessionThread`

  An execution thread within a `session`. Each session has one primary thread plus zero or more child threads.

  - `JsonElement Type = "session_thread"`

  - `required string ID`

    Unique identifier for this thread.

  - `required Agent Agent`

    Resolved agent definition for this thread. Snapshot of the agent at thread creation time.

    - `class BetaManagedAgentsSessionThreadAgent`

      Resolved `agent` definition for a single `session_thread`. Snapshot of the agent at thread creation time. The multiagent roster is not repeated here; read it from `Session.agent`.

      - `JsonElement Type = "agent"`

      - `required string ID`

      - `required string? Description`

      - `required BetaManagedAgentsExecutionIdentity ExecutionIdentity`

        Execution principal snapshotted from the agent at session creation. Always present; `{"type": "service_account"}` when runs carry no customer-named principal.

        - `class BetaManagedAgentsAwsRoleExecutionIdentity`

          An AWS IAM role principal as returned in API responses.

          - `JsonElement Type = "aws_role"`

          - `required string RoleArn`

            The IAM role's ARN.

        - `class BetaManagedAgentsServiceAccountExecutionIdentity`

          The Anthropic-managed service account as returned in API responses.

          - `JsonElement Type = "service_account"`

      - `required IReadOnlyList<BetaManagedAgentsMcpServerUrlDefinition> McpServers`

        - `JsonElement Type = "url"`

        - `required string Name`

        - `required string Url`

      - `required BetaManagedAgentsModelConfig Model`

        Model identifier and configuration.

        - `required BetaManagedAgentsModel ID`

          The model that will power your agent.

          See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

          - `ClaudeHaiku5_5("claude-haiku-5-5")`

            Fastest model for high-volume, real-time tasks

          - `ClaudeSonnet5_5("claude-sonnet-5-5")`

            Efficient model for coding and agents

          - `ClaudeOpus5_5("claude-opus-5-5")`

            Powerful intelligence for coding, knowledge work, and long-running agents

          - `ClaudeFable5_1("claude-fable-5-1")`

            Frontier intelligence for ambitious tasks across coding, scientific discovery, and enterprise workflows

          - `ClaudeSonnet5("claude-sonnet-5")`

            Efficient model for coding and agents

          - `ClaudeFable5("claude-fable-5")`

            Next generation of intelligence for the hardest knowledge work and coding problems

          - `ClaudeOpus5("claude-opus-5")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeOpus4_8("claude-opus-4-8")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeOpus4_7("claude-opus-4-7")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeOpus4_6("claude-opus-4-6")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeSonnet4_6("claude-sonnet-4-6")`

            Best combination of speed and intelligence

          - `ClaudeHaiku4_5("claude-haiku-4-5")`

          - `ClaudeHaiku4_5_20251001("claude-haiku-4-5-20251001")`

          - `ClaudeOpus4_5("claude-opus-4-5")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeOpus4_5_20251101("claude-opus-4-5-20251101")`

            Powerful intelligence for long-running agents and coding

          - `ClaudeSonnet4_5("claude-sonnet-4-5")`

            **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

            High-performance model for agents and coding

          - `ClaudeSonnet4_5_20250929("claude-sonnet-4-5-20250929")`

            **Deprecated**: Will reach end-of-life on November 30, 2026. Please migrate to claude-sonnet-5-5. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.

            High-performance model for agents and coding

        - `Effort Effort`

          How hard Claude works on each inference call. One of `low`, `medium`, `high`, `xhigh`, `max`. Always present; resolved to the per-model default at save time when not supplied.

          - `class BetaManagedAgentsEffortLow`

            Low effort. Favors latency over reasoning depth.

            - `JsonElement Type = "low"`

          - `class BetaManagedAgentsEffortMedium`

            Medium effort. Balances latency and reasoning depth.

            - `JsonElement Type = "medium"`

          - `class BetaManagedAgentsEffortHigh`

            High effort. Favors reasoning depth.

            - `JsonElement Type = "high"`

          - `class BetaManagedAgentsEffortXhigh`

            Extra-high effort. Not all models accept this level.

            - `JsonElement Type = "xhigh"`

          - `class BetaManagedAgentsEffortMax`

            Maximum effort. Favors reasoning depth over latency.

            - `JsonElement Type = "max"`

        - `string InferenceGeo`

          Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.

        - `Speed Speed`

          Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Defaults to `standard`. Not all models support `fast`; invalid combinations are rejected at create time.

          - `Standard("standard")`

          - `Fast("fast")`

      - `required string Name`

      - `required IReadOnlyList<Skill> Skills`

        - `class BetaManagedAgentsAnthropicSkill`

          A resolved Anthropic-managed skill.

          - `JsonElement Type = "anthropic"`

          - `required string SkillID`

          - `required string Version`

        - `class BetaManagedAgentsCustomSkill`

          A resolved user-created custom skill.

          - `JsonElement Type = "custom"`

          - `required string SkillID`

          - `required string Version`

      - `required string? System`

      - `required IReadOnlyList<Tool> Tools`

        - `class BetaManagedAgentsAgentToolset20260401`

          - `JsonElement Type = "agent_toolset_20260401"`

          - `required IReadOnlyList<BetaManagedAgentsAgentToolConfig> Configs`

            - `class BetaManagedAgentsBashToolConfig`

              Configuration for the bash tool.

              - `JsonElement Type = "bash"`

              - `required bool Enabled`

              - `JsonElement Name = "bash"`

              - `required PermissionPolicy PermissionPolicy`

                Permission policy for tool execution.

                - `class BetaManagedAgentsAlwaysAllowPolicy`

                  Tool calls are automatically approved without user confirmation.

                  - `JsonElement Type = "always_allow"`

                - `class BetaManagedAgentsAlwaysAskPolicy`

                  Tool calls require user confirmation before execution.

                  - `JsonElement Type = "always_ask"`

                - `class BetaManagedAgentsAutoPolicy`

                  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.

                  - `JsonElement Type = "auto"`

            - `class BetaManagedAgentsEditToolConfig`

              Configuration for the edit tool.

              - `JsonElement Type = "edit"`

              - `required bool Enabled`

              - `JsonElement Name = "edit"`

              - `required PermissionPolicy PermissionPolicy`

                Permission policy for tool execution.

                - `class BetaManagedAgentsAlwaysAllowPolicy`

                  Tool calls are automatically approved without user confirmation.

                - `class BetaManagedAgentsAlwaysAskPolicy`

                  Tool calls require user confirmation before execution.

                - `class BetaManagedAgentsAutoPolicy`

                  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.

            - `class BetaManagedAgentsReadToolConfig`

              Configuration for the read tool.

              - `JsonElement Type = "read"`

              - `required bool Enabled`

              - `JsonElement Name = "read"`

              - `required PermissionPolicy PermissionPolicy`

                Permission policy for tool execution.

                - `class BetaManagedAgentsAlwaysAllowPolicy`

                  Tool calls are automatically approved without user confirmation.

                - `class BetaManagedAgentsAlwaysAskPolicy`

                  Tool calls require user confirmation before execution.

                - `class BetaManagedAgentsAutoPolicy`

                  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.

            - `class BetaManagedAgentsWriteToolConfig`

              Configuration for the write tool.

              - `JsonElement Type = "write"`

              - `required bool Enabled`

              - `JsonElement Name = "write"`

              - `required PermissionPolicy PermissionPolicy`

                Permission policy for tool execution.

                - `class BetaManagedAgentsAlwaysAllowPolicy`

                  Tool calls are automatically approved without user confirmation.

                - `class BetaManagedAgentsAlwaysAskPolicy`

                  Tool calls require user confirmation before execution.

                - `class BetaManagedAgentsAutoPolicy`

                  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.

            - `class BetaManagedAgentsGlobToolConfig`

              Configuration for the glob tool.

              - `JsonElement Type = "glob"`

              - `required bool Enabled`

              - `JsonElement Name = "glob"`

              - `required PermissionPolicy PermissionPolicy`

                Permission policy for tool execution.

                - `class BetaManagedAgentsAlwaysAllowPolicy`

                  Tool calls are automatically approved without user confirmation.

                - `class BetaManagedAgentsAlwaysAskPolicy`

                  Tool calls require user confirmation before execution.

                - `class BetaManagedAgentsAutoPolicy`

                  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.

            - `class BetaManagedAgentsGrepToolConfig`

              Configuration for the grep tool.

              - `JsonElement Type = "grep"`

              - `required bool Enabled`

              - `JsonElement Name = "grep"`

              - `required PermissionPolicy PermissionPolicy`

                Permission policy for tool execution.

                - `class BetaManagedAgentsAlwaysAllowPolicy`

                  Tool calls are automatically approved without user confirmation.

                - `class BetaManagedAgentsAlwaysAskPolicy`

                  Tool calls require user confirmation before execution.

                - `class BetaManagedAgentsAutoPolicy`

                  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.

            - `class BetaManagedAgentsWebFetchToolConfig`

              Configuration for the web_fetch tool.

              - `JsonElement Type = "web_fetch"`

              - `required bool Enabled`

              - `JsonElement Name = "web_fetch"`

              - `required PermissionPolicy PermissionPolicy`

                Permission policy for tool execution.

                - `class BetaManagedAgentsAlwaysAllowPolicy`

                  Tool calls are automatically approved without user confirmation.

                - `class BetaManagedAgentsAlwaysAskPolicy`

                  Tool calls require user confirmation before execution.

                - `class BetaManagedAgentsAutoPolicy`

                  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.

              - `required BetaManagedAgentsWebFetchUrlSources? UrlSources`

                Which sources contribute URLs the tool may fetch, always in the object form. Null when not set, which allows every source.

                - `required BetaManagedAgentsWebFetchUrlSourceToolFilter? ClientToolResults`

                  Which custom tools' results contribute URLs that may be fetched. Null when not set, which allows every custom tool's results.

                  - `class BetaManagedAgentsWebFetchUrlSourceAll`

                    Every URL from this source may be fetched. This is the default.

                    - `JsonElement Type = "all"`

                  - `class BetaManagedAgentsWebFetchUrlSourceNone`

                    This source contributes no URLs that may be fetched.

                    - `JsonElement Type = "none"`

                  - `class BetaManagedAgentsWebFetchUrlSourceOnly`

                    Only the named tools' results contribute URLs that may be fetched.

                    - `JsonElement Type = "only"`

                    - `required IReadOnlyList<BetaManagedAgentsWebFetchUrlSourceToolReference> Tools`

                      The tools whose results contribute. Between 1 and 128 entries, each with a different name. An empty list is rejected; use "none" to allow no tool's results.

                      - `JsonElement Type = "tool_reference"`

                        Must be "tool_reference".

                      - `required string Name`

                        Name of the tool. Compared exactly, so upper and lower case letters are different.

                        minLength: 1, maxLength: 128

                  - `class BetaManagedAgentsWebFetchUrlSourceExcept`

                    Every tool's results contribute URLs that may be fetched, except the named tools' results.

                    - `JsonElement Type = "except"`

                    - `required IReadOnlyList<BetaManagedAgentsWebFetchUrlSourceToolReference> Tools`

                      The tools whose results do not contribute. Between 1 and 128 entries, each with a different name. An empty list is rejected; use "all" to leave out no tool's results.

                      - `JsonElement Type = "tool_reference"`

                        Must be "tool_reference".

                      - `required string Name`

                        Name of the tool. Compared exactly, so upper and lower case letters are different.

                        minLength: 1, maxLength: 128

                - `required BetaManagedAgentsWebFetchUrlSourceToolFilter? ServerToolResults`

                  Which of the web_search and web_fetch tools' results contribute URLs that may be fetched. Null when not set, which allows both.

                - `required BetaManagedAgentsWebFetchUrlSourceUserInput? UserInput`

                  Whether URLs in the text of user messages may be fetched. Null when not set, which allows them.

                  - `class BetaManagedAgentsWebFetchUrlSourceAll`

                    Every URL from this source may be fetched. This is the default.

                  - `class BetaManagedAgentsWebFetchUrlSourceNone`

                    This source contributes no URLs that may be fetched.

              - `IReadOnlyList<string> AllowedDomains`

              - `IReadOnlyList<string> BlockedDomains`

              - `int? MaxContentTokens`

                format: int32

            - `class BetaManagedAgentsWebSearchToolConfig`

              Configuration for the web_search tool.

              - `JsonElement Type = "web_search"`

              - `required bool Enabled`

              - `JsonElement Name = "web_search"`

              - `required PermissionPolicy PermissionPolicy`

                Permission policy for tool execution.

                - `class BetaManagedAgentsAlwaysAllowPolicy`

                  Tool calls are automatically approved without user confirmation.

                - `class BetaManagedAgentsAlwaysAskPolicy`

                  Tool calls require user confirmation before execution.

                - `class BetaManagedAgentsAutoPolicy`

                  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.

              - `IReadOnlyList<string> AllowedDomains`

              - `IReadOnlyList<string> BlockedDomains`

              - `BetaManagedAgentsUserLocation? UserLocation`

                Approximate user location for search result localization.

                - `JsonElement Type = "approximate"`

                  Location precision. Only "approximate" is supported.

                - `string? City`

                  City name.

                  minLength: 1, maxLength: 255

                - `string? Country`

                  Two-letter ISO 3166-1 country code, uppercase.

                - `string? Region`

                  Region or state name.

                  minLength: 1, maxLength: 255

                - `string? Timezone`

                  IANA timezone identifier, e.g. "America/Los_Angeles".

                  minLength: 1, maxLength: 255

          - `required BetaManagedAgentsAgentToolsetDefaultConfig DefaultConfig`

            Resolved default configuration for agent tools.

            - `required bool Enabled`

            - `required PermissionPolicy PermissionPolicy`

              Permission policy for tool execution.

              - `class BetaManagedAgentsAlwaysAllowPolicy`

                Tool calls are automatically approved without user confirmation.

              - `class BetaManagedAgentsAlwaysAskPolicy`

                Tool calls require user confirmation before execution.

              - `class BetaManagedAgentsAutoPolicy`

                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.

        - `class BetaManagedAgentsMcpToolset`

          - `JsonElement Type = "mcp_toolset"`

          - `required IReadOnlyList<BetaManagedAgentsMcpToolConfig> Configs`

            - `required bool Enabled`

            - `required string Name`

            - `required PermissionPolicy PermissionPolicy`

              Permission policy for tool execution.

              - `class BetaManagedAgentsAlwaysAllowPolicy`

                Tool calls are automatically approved without user confirmation.

              - `class BetaManagedAgentsAlwaysAskPolicy`

                Tool calls require user confirmation before execution.

              - `class BetaManagedAgentsAutoPolicy`

                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.

          - `required BetaManagedAgentsMcpToolsetDefaultConfig DefaultConfig`

            Resolved default configuration for all tools from an MCP server.

            - `required bool Enabled`

            - `required PermissionPolicy PermissionPolicy`

              Permission policy for tool execution.

              - `class BetaManagedAgentsAlwaysAllowPolicy`

                Tool calls are automatically approved without user confirmation.

              - `class BetaManagedAgentsAlwaysAskPolicy`

                Tool calls require user confirmation before execution.

              - `class BetaManagedAgentsAutoPolicy`

                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.

          - `required string McpServerName`

        - `class BetaManagedAgentsCustomTool`

          A custom tool as returned in API responses.

          - `JsonElement Type = "custom"`

          - `required string Description`

          - `required BetaManagedAgentsCustomToolInputSchema InputSchema`

            JSON Schema for custom tool input parameters.

            - `JsonElement Type = "object"`

            - `IReadOnlyDictionary<string, JsonElement>? Properties`

            - `IReadOnlyList<string>? Required`

          - `required string Name`

      - `required int Version`

        format: int32

    - `class BetaManagedAgentsAdvisor`

      Platform advisor roster entry: a model the session's primary thread may consult mid-turn.

      - `JsonElement Type = "advisor"`

      - `required string Model`

        The advisor model id.

    - `class BetaManagedAgentsInlineAgent`

      An agent that has no Agent resource, and so no `id` or `version`. It is defined inline, in a workflow run's plan or when a session thread is spawned, and is not saved.

      - `JsonElement Type = "inline"`

      - `required string? Description`

      - `required BetaManagedAgentsExecutionIdentity ExecutionIdentity`

        The session's execution principal.

      - `required IReadOnlyList<BetaManagedAgentsMcpServerUrlDefinition> McpServers`

        - `JsonElement Type = "url"`

        - `required string Name`

        - `required string Url`

      - `required BetaManagedAgentsModelConfig Model`

        Model identifier and configuration.

      - `required string Name`

        The name that the agent's definition gave, or one that the server assigned.

      - `required IReadOnlyList<Skill> Skills`

        - `class BetaManagedAgentsAnthropicSkill`

          A resolved Anthropic-managed skill.

        - `class BetaManagedAgentsCustomSkill`

          A resolved user-created custom skill.

      - `required string? System`

      - `required IReadOnlyList<Tool> Tools`

        - `class BetaManagedAgentsAgentToolset20260401`

        - `class BetaManagedAgentsMcpToolset`

        - `class BetaManagedAgentsCustomTool`

          A custom tool as returned in API responses.

  - `required DateTimeOffset? ArchivedAt`

    When the thread was archived. Null if not archived.

    format: date-time

  - `required DateTimeOffset CreatedAt`

    When the thread was created.

    format: date-time

  - `required string? ParentThreadID`

    Parent thread that spawned this thread. Null for the primary thread.

  - `required string SessionID`

    The session this thread belongs to.

  - `required BetaManagedAgentsSessionThreadStats? Stats`

    Timing statistics for this thread. Null until the thread's first status transition.

    - `double ActiveSeconds`

      Cumulative time in seconds the thread spent actively running. Excludes idle time.

      format: double

    - `double DurationSeconds`

      Elapsed time since thread creation in seconds. For archived threads, frozen at the final update.

      format: double

    - `double StartupSeconds`

      Time in seconds for the thread to begin running. Zero for child threads, which start immediately.

      format: double

  - `required BetaManagedAgentsSessionThreadStatus Status`

    Current execution status of the thread.

    - `Running("running")`

    - `Idle("idle")`

    - `Rescheduling("rescheduling")`

    - `Terminated("terminated")`

  - `required DateTimeOffset UpdatedAt`

    When the thread was last updated.

    format: date-time

  - `required BetaManagedAgentsSessionThreadUsage? Usage`

    Cumulative token usage for this thread. Null until the thread's first idle transition.

    - `double ActiveSeconds`

      Cumulative time in seconds this thread spent in running status. Equal to `stats.active_seconds`; surfaced here so a thread's usage carries every quantity its cost is priced on.

      format: double

    - `BetaManagedAgentsCacheCreationUsage CacheCreation`

      Tokens used to create prompt cache entries, broken down by cache TTL.

      - `int Ephemeral1hInputTokens`

        Tokens used to create 1-hour ephemeral cache entries.

        format: int32

      - `int Ephemeral5mInputTokens`

        Tokens used to create 5-minute ephemeral cache entries.

        format: int32

    - `int CacheReadInputTokens`

      Total tokens read from prompt cache.

      format: int32

    - `int InputTokens`

      Total input tokens consumed across all turns.

      format: int32

    - `BetaMonetaryAmount? ListCost`

      Cumulative list cost of this thread across all turns, priced at public list rates. Absent until cost tracking is available for the thread. Each figure is rounded to the nearest cent independently and the session's aggregate `usage.list_cost` additionally includes session runtime, so per-thread costs do not sum exactly to the session figure; the session figure is authoritative and is what a budget is enforced against.

      - `required string Amount`

        Amount in minor units of the currency, as an integer decimal string with no leading zeros: "2500" is $25.00 and "50" is fifty cents. A string rather than a number so no float rounding is ever applied.

      - `required BetaCurrency Currency`

        Uppercase ISO-4217 currency code. `USD` is the only currency currently supported; the accepted set is closed and grows only when a new currency is priced.

    - `int OutputTokens`

      Total output tokens generated across all turns.

      format: int32

    - `BetaManagedAgentsServerToolUsage? ServerToolUse`

      Cumulative server-executed tool usage across all turns of this thread. Absent until server-tool tracking is available for the thread.

      - `int WebFetchRequests`

        Number of server-executed web fetch requests.

        format: int32

      - `int WebSearchRequests`

        Number of server-executed web search requests.

        format: int32

  - `required string? WorkflowRunID`

    Identifier of the workflow run that created the thread, or `null` for any other thread.

## Example

```csharp
using System;
using Anthropic.Models.Beta.Sessions.Threads;

ThreadArchiveParams parameters = new()
{
    SessionID = "sesn_011CZkZAtmR3yMPDzynEDxu7",
    ThreadID = "sthr_011CZkZVWa6oJjw1rgXZpnBt",
};

var betaManagedAgentsSessionThread = await client.Beta.Sessions.Threads.Archive(parameters);

Console.WriteLine(betaManagedAgentsSessionThread);
```

### Response (200)

```json
{
  "id": "sthr_011CZkZVWa6oJjw1rgXZpnBt",
  "agent": {
    "id": "agent_011CZkYqphY8vELVzwCUpqiQ",
    "description": "A focused research subagent.",
    "execution_identity": {
      "type": "service_account"
    },
    "mcp_servers": [
      {
        "name": "example-mcp",
        "type": "url",
        "url": "https://example-server.modelcontextprotocol.io/sse"
      }
    ],
    "model": {
      "id": "claude-opus-5-5",
      "effort": {
        "type": "low"
      },
      "inference_geo": "inference_geo",
      "speed": "standard"
    },
    "name": "Researcher",
    "skills": [
      {
        "skill_id": "xlsx",
        "type": "anthropic",
        "version": "1"
      }
    ],
    "system": "You are a research subagent that gathers and summarises sources for the coordinating agent.",
    "tools": [
      {
        "configs": [
          {
            "enabled": true,
            "name": "bash",
            "permission_policy": {
              "type": "always_allow"
            },
            "type": "bash"
          }
        ],
        "default_config": {
          "enabled": true,
          "permission_policy": {
            "type": "always_ask"
          }
        },
        "type": "agent_toolset_20260401"
      }
    ],
    "type": "agent",
    "version": 1
  },
  "archived_at": null,
  "created_at": "2026-03-15T10:00:00Z",
  "parent_thread_id": null,
  "session_id": "sesn_011CZkZAtmR3yMPDzynEDxu7",
  "stats": {
    "active_seconds": 0,
    "duration_seconds": 0,
    "startup_seconds": 0
  },
  "status": "idle",
  "type": "session_thread",
  "updated_at": "2026-03-15T10:00:00Z",
  "usage": {
    "active_seconds": 0,
    "cache_creation": {
      "ephemeral_1h_input_tokens": 0,
      "ephemeral_5m_input_tokens": 0
    },
    "cache_read_input_tokens": 0,
    "input_tokens": 0,
    "list_cost": {
      "amount": "2500",
      "currency": "USD"
    },
    "output_tokens": 0,
    "server_tool_use": {
      "web_fetch_requests": 0,
      "web_search_requests": 3
    }
  },
  "workflow_run_id": null
}
```
