Anthropic-compatible API

2026-10-22

Anthropic-compatible API

Base URL

Loading…

Get started

Loading…

Endpoints

MethodPathDescriptionSupport
POST/v1/messagesCreate a Message● Supported
POST/v1/messages/count_tokensCount tokens for a request◐ Partial
GET/v1/modelsList models● Supported
POST/v1/filesUpload a file● Supported
GET/v1/filesList files● Supported
GET/v1/files/{file_id}Get file metadata● Supported
DELETE/v1/files/{file_id}Delete a file● Supported
GET/v1/files/{file_id}/contentDownload file content● Supported

Differences from Anthropic

  • Create a Message:Preserves top-level cache_control, top_k, metadata.user_id, output_config.format, thinking.display and anthropic-user-profile-id. Native-only options restrict routing; requests fail when no provider can preserve them. Nonempty anthropic-workspace-id returns 400. container, inference_geo and service_tier are accepted and ignored; see field support for other extensions. Unknown top-level fields are forwarded unchanged to same-protocol upstream providers, which decide whether to accept them. Declared fields still undergo type and range validation; invalid values return 400 naming the field.
  • Count tokens for a request:Returns a model-family-calibrated estimate, including Chinese text and tool definitions, with the response header x-praxis-token-count: estimated. Do not use it as an exact usage or billing count.
  • List models:Always returns capabilities, max_input_tokens and max_tokens; unknown catalog facts are null. The total context window is not substituted for an independent input limit. Nonempty anthropic-workspace-id returns 400; anthropic-beta version selection is not implemented.
  • Upload a file:SDK 0.128.0 sends form file and optional form expires_in_seconds (3600–7776000 seconds). Any other form field, including purpose, returns 400 invalid_request_error such as "purpose: Extra inputs are not permitted". The only accepted query parameter is the SDK's beta; other query parameters return 400, and a query expires_in_seconds is told to move into the form. Uploads are stored as user_data. anthropic-workspace-id is not supported and returns 400.
  • List files:Newest first. Paginate with after_id / before_id and limit (sending both returns 400), or with the page cursor (next_page); use only one of the three. Responses contain data, has_more, first_id, last_id and next_page. ids (up to 100 distinct IDs) is mutually exclusive with page, after_id, before_id and limit. scope_id requires the anthropic-beta: managed-agents-2026-04-01 header; a missing header returns 400 and a nonexistent session scope returns 404. anthropic-workspace-id returns 400.
  • Download file content:Only files produced by the code execution tool can be downloaded; downloading a file you uploaded yourself (purpose user_data) returns 400 invalid_request_error, the same as Anthropic's own API.

For authoritative parameter definitions, see the official Anthropic documentation.

Errors follow the Anthropic format, see errors; quotas and response headers are covered in rate limits.

Create a Message

POST /anthropic/v1/messages● Supported

Official Anthropic docs ↗

Request body

  • modelstring必填◐ Partially supported

    Body param: The model that will complete your prompt. See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

    deepseek-v4-pro, glm-5.3-flash, qwen3.8-flash and claude-opus-5 can be called; deepseek-v4-flash returns 400 on this face.

  • max_tokensnumber必填

    Body param: The maximum number of tokens to generate before stopping. Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate. Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response. Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.

    Limits output tokens, including reasoning.

  • messagesarray必填◐ Partially supported

    Body param: Input messages. Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn. Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages. If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. Example with a single `user` message: ```json [{ "role": "user", "content": "Hello, Claude" }] ``` Example with multiple conversational turns: ```json [ { "role": "user", "content": "Hello there." }, { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, { "role": "user", "content": "Can you explain LLMs in plain English?" } ] ``` Example with a partially-filled response from Claude: ```json [ { "role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" }, { "role": "assistant", "content": "The best answer is (" } ] ``` Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent: ```json { "role": "user", "content": "Hello, Claude" } ``` ```json { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } ``` See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API. There is a limit of 100,000 messages in a single request.

    Text and tool round trips work. Managed document file_id returns 400; qwen3.8-flash can read inline PDFs. Images have model-specific size limits.

    ▸ 展开子字段(2)
    • contentstring | array必填

      Message content: a plain string (shorthand for one text block) or an array of content blocks such as text, image, document, tool_use and tool_result.

    • rolestring必填

      Who produced the message. Use user for your turns and assistant to replay earlier model turns; system-role messages are accepted by the shape but system instructions normally go in the top-level system field.

  • streamboolean可选◐ Partially supported

    Body param: Whether to incrementally stream the response using server-sent events. See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details.

    Content and tool streaming work; extra message_delta events may precede content and message_start usage is zero.

  • systemstring | array可选

    Body param: System prompt. A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).

    Verified to take effect.

  • temperaturenumber可选
  • top_pnumber可选
  • top_knumber可选
  • stop_sequencesarray可选◐ Partially supported

    Body param: Custom text sequences that will cause the model to stop generating. Our models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `"end_turn"`. If you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `"stop_sequence"` and the response `stop_sequence` value will contain the matched stop sequence.

    Works on deepseek-v4-pro and qwen3.8-flash; glm-5.3-flash truncates text but does not report accurate stop_reason/stop_sequence.

  • toolsarray可选

    Body param: Definitions of tools that the model may use. If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks. There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)). Each tool definition includes: - `name`: Name of the tool. - `description`: Optional, but strongly-recommended description of the tool. - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks. For example, if you defined `tools` as: ```json [ { "name": "get_stock_price", "description": "Get the current stock price for a given ticker symbol.", "input_schema": { "type": "object", "properties": { "ticker": { "type": "string", "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." } }, "required": ["ticker"] } } ] ``` And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this: ```json [ { "type": "tool_use", "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", "name": "get_stock_price", "input": { "ticker": "^GSPC" } } ] ``` You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message: ```json [ { "type": "tool_result", "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", "content": "259.75 USD" } ] ``` Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output. See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.

    Verified to take effect.

  • ▸ 更多参数(16)
    • tool_choiceobject可选◐ Partially supported

      Body param: How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.

      All four modes work on qwen3.8-flash; deepseek-v4-pro ignores any/tool/none and glm-5.3-flash ignores none.

      ▸ 展开子字段(3)
      • typestring必填
        取值 none
      • disable_parallel_tool_useboolean可选○ Currently ignored

        Whether to disable parallel tool use. Defaults to `false`. If set to `true`, the model will output exactly one tool use.

        Accepted but currently has no effect. true may still return multiple tool calls.

      • namestring必填

        The name of the tool to use.

    • metadataobject可选◐ Partially supported

      Body param: An object describing metadata about the request.

      Accepts metadata; metadata.user_id is carried on same-protocol lines without promising an upstream echo.

      ▸ 展开子字段(1)
      • user_idstring可选

        An external identifier for the user who is associated with the request. This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.

    • cache_controlobject可选◐ Partially supported

      Body param: Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.

      Implicit cache hits occur on deepseek-v4-pro, qwen3.8-flash and glm-5.3-flash, but do not establish that the marker controls caching. No hits were observed on claude-opus-5, and ttl=1h had no observed effect.

      ▸ 展开子字段(2)
      • typestring必填

        Always `ephemeral`. Discriminator that marks this object as a CacheControlEphemeral in a `type`-tagged union.

        取值 ephemeral
      • ttlstring可选

        The time-to-live for the cache control breakpoint. This may be one the following values: - `5m`: 5 minutes - `1h`: 1 hour Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.

    • containerstring | object可选○ Currently ignored

      Accepted and ignored; the platform does not implement container.

      ▸ 展开子字段(2)
      • idstring可选

        Container id

      • skillsarray可选

        List of skills to load in the container

    • inference_geostring可选○ Currently ignored

      Accepted and ignored; the platform does not implement inference_geo.

    • output_configobject可选

      Body param: Configuration options for the model's output, such as the output format.

      ▸ 展开子字段(2)
      • effortstring可选◐ Partially supported

        All possible effort levels.

        Only high/xhigh work on deepseek-v4-pro; other levels return 400. All levels return 400 on qwen3.8-flash. glm-5.3-flash accepts levels but usage is not monotonic.

      • formatobject可选◐ Partially supported

        A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)

        json_schema works on deepseek-v4-pro and qwen3.8-flash; glm-5.3-flash returns 400 when combined with thinking.

    • service_tierstring可选○ Currently ignored

      Accepted and ignored; the platform does not implement service_tier.

    • thinkingobject可选◐ Partially supported

      Body param: Configuration for enabling Claude's extended thinking. When enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit. See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.

      disabled works on deepseek-v4-pro and qwen3.8-flash; any thinking parameter returns 400 on glm-5.3-flash. adaptive also returns 400 on tested deepseek-v4-pro and qwen3.8-flash.

      ▸ 展开子字段(3)
      • budget_tokensnumber必填◐ Partially supported

        Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality. Must be ≥1024 and less than `max_tokens`. See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.

        Accepted on deepseek-v4-pro and qwen3.8-flash but is not a reliable upper bound; glm-5.3-flash returns 400.

      • typestring必填
        取值 adaptive
      • displaystring可选○ Currently ignored

        Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`.

        Accepted but currently has no effect. omitted still returns the full thinking content.

    • context_managementobject可选○ Currently ignored

      Accepted and ignored; the platform does not implement context_management.

    • diagnosticsobject可选○ Currently ignored

      Accepted and ignored; the platform does not implement diagnostics.

    • mcp_serversarray可选○ Currently ignored

      Accepted and ignored; the platform does not implement mcp_servers.

    • speedstring可选○ Currently ignored

      Accepted and ignored; the platform does not implement speed.

    • output_formatobject可选○ Currently ignored

      Accepted and ignored legacy field; use output_config.format for structured output.

    • compactionobject可选○ Unsupported

      Recognized compaction; not implemented, and returns 400 explicitly stating that the parameter is not supported.

    • fallback_credit_tokenstring可选○ Unsupported

      Recognized fallback_credit_token; not implemented, and returns 400 explicitly stating that the parameter is not supported.

    • fallbacksstring可选○ Unsupported

      Recognized fallbacks; not implemented, and returns 400 explicitly stating that the parameter is not supported.

Returns

200

With stream=true the reply streams as server-sent events (text/event-stream).

Preserves top-level cache_control, top_k, metadata.user_id, output_config.format, thinking.display and anthropic-user-profile-id. Native-only options restrict routing; requests fail when no provider can preserve them. Nonempty anthropic-workspace-id returns 400. container, inference_geo and service_tier are accepted and ignored; see field support for other extensions. Unknown top-level fields are forwarded unchanged to same-protocol upstream providers, which decide whether to accept them. Declared fields still undergo type and range validation; invalid values return 400 naming the field.

Errors follow the Anthropic format — see error codes

Response

HTTP 200

Message created

application/json

NameTypeDescription
idstringUnique object identifier. The format and length of IDs may change over time.
containernull | objectInformation about the container used in the request (for the code execution tool)
container.idstringIdentifier for the container used in this request
container.expires_atstringThe time at which the container will expire.
container.skillsnull | array<object>Skills loaded in the container
contentarray<object>Content generated by the model. This is an array of content blocks, each of which has a `type` that determines its shape. Example: ```json [{ "type": "text", "text": "Hi, I'm Claude." }] ``` If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output. For example, if the input `messages` were: ```json [ { "role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" }, { "role": "assistant", "content": "The best answer is (" } ] ``` Then the response `content` might be: ```json [{ "type": "text", "text": "B)" }] ```
content[].citationsnull | array<object>Citations supporting the text block. The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.
content[].textstringThe text generated by the model.
content[].typestringAlways `text`. Discriminator that marks this object as a TextBlock in a `type`-tagged union. / Always `thinking`. Discriminator that marks this object as a ThinkingBlock in a `type`-tagged union. / Always `redacted_thinking`. Discriminator that marks this object as a RedactedThinkingBlock in a `type`-tagged union. / Always `tool_use`. Discriminator that marks this object as a ToolUseBlock in a `type`-tagged union. / Always `server_tool_use`. Discriminator that marks this object as a ServerToolUseBlock in a `type`-tagged union. / Always `web_search_tool_result`. Discriminator that marks this object as a WebSearchToolResultBlock in a `type`-tagged union. / Always `web_fetch_tool_result`. Discriminator that marks this object as a WebFetchToolResultBlock in a `type`-tagged union. / Always `code_execution_tool_result`. Discriminator that marks this object as a CodeExecutionToolResultBlock in a `type`-tagged union. / Always `bash_code_execution_tool_result`. Discriminator that marks this object as a BashCodeExecutionToolResultBlock in a `type`-tagged union. / Always `text_editor_code_execution_tool_result`. Discriminator that marks this object as a TextEditorCodeExecutionToolResultBlock in a `type`-tagged union. / Always `tool_search_tool_result`. Discriminator that marks this object as a ToolSearchToolResultBlock in a `type`-tagged union. / Always `container_upload`. Discriminator that marks this object as a ContainerUploadBlock in a `type`-tagged union.
content[].signaturestringA value used to verify that this thinking block was generated by Claude when it is passed back to the API. This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact. See extended thinking for details.
content[].thinkingstringThe text of Claude's thinking process for this block.
content[].datastringThe contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content. Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. See extended thinking for details.
content[].idstringId of the tool call; send it back as tool_use_id in the tool_result block that answers it. / Id of the server tool call; the matching result block repeats it as tool_use_id.
content[].callerobjectWhich party invoked the tool: the model directly or a code execution tool. / Which party invoked the server tool: the model directly or a code execution tool. / Which party invoked the search: the model directly or a code execution tool. / Which party invoked the fetch: the model directly or a code execution tool.
content[].inputanyArguments the model chose, as a JSON object that follows the tool's input_schema. / Arguments the model passed to the server tool, as a JSON object.
content[].namestringName of the tool the model wants to call. / Name of the server tool the model called, such as web_search, web_fetch or code_execution.
content[].toolset_namenull | stringFor a toolset member tool_use, the toolset family.
content[].contentobject | array<object> | object | object | object | object | objectSearch results (array of web_search_result blocks) or an error object. / The fetched document or an error object. / Result of the code execution: a result block, an encrypted result block, or an error object. / Result of the bash command: a result block or an error object. / Result of the text editor command: a view, create or str_replace result block, or an error object. / Result of the tool search: a search result block that lists tool references, or an error object.
content[].tool_use_idstringId of the web_search server tool call this result belongs to. / Id of the web_fetch server tool call this result belongs to. / Id of the code_execution server tool call this result belongs to. / Id of the bash_code_execution server tool call this result belongs to. / Id of the text_editor_code_execution server tool call this result belongs to. / Id of the tool search server tool call this result belongs to.
content[].file_idstringId of the file that was uploaded into the code execution container.
modelstringThe model that will complete your prompt. See models for additional details and options.
rolestringConversational role of the generated message. This will always be `"assistant"`.
stop_detailsnull | objectStructured information about a refusal.
stop_details.categorynull | stringThe policy category that triggered a refusal. - `cyber` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - `bio` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - `frontier_llm` - The request could assist the development of competing AI models, which is restricted under Anthropic's commercial terms. Benign machine learning work can also trigger this category. - `reasoning_extraction` - The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use adaptive thinking. - `general_harms` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category.
stop_details.explanationnull | stringHuman-readable explanation of the refusal. This text is not guaranteed to be stable. `null` when no explanation is available for the category.
stop_details.typestringAlways `refusal`. Discriminator that marks this object as a RefusalStopDetails in a `type`-tagged union.
stop_reasonnull | stringThe reason that we stopped. This may be one the following values: - `"end_turn"`: the model reached a natural stopping point - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated - `"tool_use"`: the model invoked one or more tools - `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue. - `"refusal"`: when streaming classifiers intervene to handle potential policy violations - `"model_context_window_exceeded"`: we exceeded the model's context window In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.
stop_sequencenull | stringWhich custom stop sequence was generated, if any. This value will be a non-null string if one of your custom stop sequences was generated.
typestringObject type. For Messages, this is always `"message"`.
usageobjectBilling and rate-limit usage. Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response. For example, `output_tokens` will be non-zero, even for an empty string response from Claude. Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.
usage.cache_creationnull | objectBreakdown of cached tokens by TTL
usage.cache_creation_input_tokensnull | numberThe number of input tokens used to create the cache entry.
usage.cache_read_input_tokensnull | numberThe number of input tokens read from the cache.
usage.inference_geonull | stringThe geographic region where inference was performed for this request.
usage.input_tokensnumberThe number of input tokens which were used.
usage.output_tokensnumberThe number of output tokens which were used.
usage.output_tokens_detailsnull | objectBreakdown of output tokens by category. `output_tokens` remains the inclusive, authoritative total used for billing. This object provides a read-only decomposition for observability — for example, how many of the billed output tokens were spent on internal reasoning that may have been summarized before being returned to you.
usage.server_tool_usenull | objectThe number of server tool requests.
usage.service_tiernull | stringIf the request used the priority, standard, or batch tier.

text/event-stream — chunk / event object

NameTypeDescription
deltaobjectFinal fields of the message sent with message_delta: why generation stopped and the container. / The incremental change to the content block at index.
delta.containernull | objectInformation about the container used in the request (for the code execution tool)
delta.stop_detailsnull | objectStructured information about a refusal.
delta.stop_reasonnull | stringWhy the model stopped; null while the message is still generating.
delta.stop_sequencenull | stringThe custom stop sequence that was matched; null unless stop_reason is stop_sequence.
delta.textstringText fragment to append to the text block.
delta.typestringAlways `text_delta`. Discriminator that marks this object as a TextDelta in a `type`-tagged union. / Always `input_json_delta`. Discriminator that marks this object as a InputJSONDelta in a `type`-tagged union. / Always `citations_delta`. Discriminator that marks this object as a CitationsDelta in a `type`-tagged union. / Always `thinking_delta`. Discriminator that marks this object as a ThinkingDelta in a `type`-tagged union. / Always `signature_delta`. Discriminator that marks this object as a SignatureDelta in a `type`-tagged union.
delta.partial_jsonstringFragment of the tool input JSON string; concatenate all fragments of a block and parse the result when the block stops.
delta.citationobjectThe citation to attach to the text block being streamed.
delta.thinkingstringThe incremental `thinking` text for this content block. Concatenate the `thinking` values of successive `thinking_delta` events to assemble the block's full `thinking` value.
delta.signaturestringThe `signature` for this thinking block: an opaque value used to verify that the block was generated by Claude when it is passed back to the API. Delivered in a `signature_delta` event just before the block's `content_block_stop` event.
typestringAlways `message_delta`. Discriminator that marks this object as a RawMessageDeltaEvent in a `type`-tagged union. / Always `content_block_delta`. Discriminator that marks this object as a RawContentBlockDeltaEvent in a `type`-tagged union. / Always `message_start`. Discriminator that marks this object as a RawMessageStartEvent in a `type`-tagged union. / Always `message_stop`. Discriminator that marks this object as a RawMessageStopEvent in a `type`-tagged union. / Always `content_block_start`. Discriminator that marks this object as a RawContentBlockStartEvent in a `type`-tagged union. / Always `content_block_stop`. Discriminator that marks this object as a RawContentBlockStopEvent in a `type`-tagged union.
usageobjectBilling and rate-limit usage. Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response. For example, `output_tokens` will be non-zero, even for an empty string response from Claude. Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.
usage.cache_creation_input_tokensnull | numberThe cumulative number of input tokens used to create the cache entry.
usage.cache_read_input_tokensnull | numberThe cumulative number of input tokens read from the cache.
usage.input_tokensnull | numberThe cumulative number of input tokens which were used.
usage.output_tokensnumberThe cumulative number of output tokens which were used.
usage.output_tokens_detailsnull | objectBreakdown of output tokens by category. `output_tokens` remains the inclusive, authoritative total used for billing. This object provides a read-only decomposition for observability — for example, how many of the billed output tokens were spent on internal reasoning that may have been summarized before being returned to you.
usage.server_tool_usenull | objectThe number of server tool requests.
indexnumberZero-based index of the content block this delta applies to. / Zero-based index of the content block that starts. / Zero-based index of the content block that ends.
messageobjectThe complete Message object being started; its content is empty at message_start and filled by the following content_block events.
message.idstringUnique object identifier. The format and length of IDs may change over time.
message.containernull | objectInformation about the container used in the request (for the code execution tool)
message.contentarray<object>Content generated by the model. This is an array of content blocks, each of which has a `type` that determines its shape. Example: ```json [{ "type": "text", "text": "Hi, I'm Claude." }] ``` If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output. For example, if the input `messages` were: ```json [ { "role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" }, { "role": "assistant", "content": "The best answer is (" } ] ``` Then the response `content` might be: ```json [{ "type": "text", "text": "B)" }] ```
message.modelstringThe model that will complete your prompt. See models for additional details and options.
message.rolestringConversational role of the generated message. This will always be `"assistant"`.
message.stop_detailsnull | objectStructured information about a refusal.
message.stop_reasonnull | stringThe reason that we stopped. This may be one the following values: - `"end_turn"`: the model reached a natural stopping point - `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum - `"stop_sequence"`: one of your provided custom `stop_sequences` was generated - `"tool_use"`: the model invoked one or more tools - `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue. - `"refusal"`: when streaming classifiers intervene to handle potential policy violations - `"model_context_window_exceeded"`: we exceeded the model's context window In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.
message.stop_sequencenull | stringWhich custom stop sequence was generated, if any. This value will be a non-null string if one of your custom stop sequences was generated.
message.typestringObject type. For Messages, this is always `"message"`.
message.usageobjectBilling and rate-limit usage. Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response. For example, `output_tokens` will be non-zero, even for an empty string response from Claude. Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`.
content_blockobjectThe content block as it starts, with empty text or input to be filled by deltas.
content_block.citationsnull | array<object>Citations supporting the text block. The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`.
content_block.textstringThe text generated by the model.
content_block.typestringAlways `text`. Discriminator that marks this object as a TextBlock in a `type`-tagged union. / Always `thinking`. Discriminator that marks this object as a ThinkingBlock in a `type`-tagged union. / Always `redacted_thinking`. Discriminator that marks this object as a RedactedThinkingBlock in a `type`-tagged union. / Always `tool_use`. Discriminator that marks this object as a ToolUseBlock in a `type`-tagged union. / Always `server_tool_use`. Discriminator that marks this object as a ServerToolUseBlock in a `type`-tagged union. / Always `web_search_tool_result`. Discriminator that marks this object as a WebSearchToolResultBlock in a `type`-tagged union. / Always `web_fetch_tool_result`. Discriminator that marks this object as a WebFetchToolResultBlock in a `type`-tagged union. / Always `code_execution_tool_result`. Discriminator that marks this object as a CodeExecutionToolResultBlock in a `type`-tagged union. / Always `bash_code_execution_tool_result`. Discriminator that marks this object as a BashCodeExecutionToolResultBlock in a `type`-tagged union. / Always `text_editor_code_execution_tool_result`. Discriminator that marks this object as a TextEditorCodeExecutionToolResultBlock in a `type`-tagged union. / Always `tool_search_tool_result`. Discriminator that marks this object as a ToolSearchToolResultBlock in a `type`-tagged union. / Always `container_upload`. Discriminator that marks this object as a ContainerUploadBlock in a `type`-tagged union.
content_block.signaturestringA value used to verify that this thinking block was generated by Claude when it is passed back to the API. This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact. See extended thinking for details.
content_block.thinkingstringThe text of Claude's thinking process for this block.
content_block.datastringThe contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content. Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. See extended thinking for details.
content_block.idstringId of the tool call; send it back as tool_use_id in the tool_result block that answers it. / Id of the server tool call; the matching result block repeats it as tool_use_id.
content_block.callerobjectWhich party invoked the tool: the model directly or a code execution tool. / Which party invoked the server tool: the model directly or a code execution tool. / Which party invoked the search: the model directly or a code execution tool. / Which party invoked the fetch: the model directly or a code execution tool.
content_block.inputanyArguments the model chose, as a JSON object that follows the tool's input_schema. / Arguments the model passed to the server tool, as a JSON object.
content_block.namestringName of the tool the model wants to call. / Name of the server tool the model called, such as web_search, web_fetch or code_execution.
content_block.toolset_namenull | stringFor a toolset member tool_use, the toolset family.
content_block.contentobject | array<object> | object | object | object | object | objectSearch results (array of web_search_result blocks) or an error object. / The fetched document or an error object. / Result of the code execution: a result block, an encrypted result block, or an error object. / Result of the bash command: a result block or an error object. / Result of the text editor command: a view, create or str_replace result block, or an error object. / Result of the tool search: a search result block that lists tool references, or an error object.
content_block.tool_use_idstringId of the web_search server tool call this result belongs to. / Id of the web_fetch server tool call this result belongs to. / Id of the code_execution server tool call this result belongs to. / Id of the bash_code_execution server tool call this result belongs to. / Id of the text_editor_code_execution server tool call this result belongs to. / Id of the tool search server tool call this result belongs to.
content_block.file_idstringId of the file that was uploaded into the code execution container.

POST /anthropic/v1/messages/count_tokens◐ Partial

Official Anthropic docs ↗

Request body

  • modelstring必填

    Body param: The model that will complete your prompt. See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.

    Required and checked for existence; selects native lines and local tokenizers.

  • messagesarray必填◐ Partially supported

    Body param: Input messages. Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn. Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages. If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. Example with a single `user` message: ```json [{ "role": "user", "content": "Hello, Claude" }] ``` Example with multiple conversational turns: ```json [ { "role": "user", "content": "Hello there." }, { "role": "assistant", "content": "Hi, I'm Claude. How can I help you?" }, { "role": "user", "content": "Can you explain LLMs in plain English?" } ] ``` Example with a partially-filled response from Claude: ```json [ { "role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun" }, { "role": "assistant", "content": "The best answer is (" } ] ``` Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent: ```json { "role": "user", "content": "Hello, Claude" } ``` ```json { "role": "user", "content": [{ "type": "text", "text": "Hello, Claude" }] } ``` See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API. There is a limit of 100,000 messages in a single request.

    Native counting preserves messages. Local counting uses o200k or family-calibrated estimates; images use known model rules or approximate allowances for unknown dimensions. Image URLs are not downloaded.

    ▸ 展开子字段(2)
    • contentstring | array必填

      Message content: a plain string (shorthand for one text block) or an array of content blocks such as text, image, document, tool_use and tool_result.

    • rolestring必填

      Who produced the message. Use user for your turns and assistant to replay earlier model turns; system-role messages are accepted by the shape but system instructions normally go in the top-level system field.

  • systemstring | array可选◐ Partially supported

    Body param: System prompt. A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).

    Forwarded natively; included in local estimates.

  • toolsarray可选◐ Partially supported

    Body param: Definitions of tools that the model may use. If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks. There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)). Each tool definition includes: - `name`: Name of the tool. - `description`: Optional, but strongly-recommended description of the tool. - `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks. For example, if you defined `tools` as: ```json [ { "name": "get_stock_price", "description": "Get the current stock price for a given ticker symbol.", "input_schema": { "type": "object", "properties": { "ticker": { "type": "string", "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." } }, "required": ["ticker"] } } ] ``` And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this: ```json [ { "type": "tool_use", "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", "name": "get_stock_price", "input": { "ticker": "^GSPC" } } ] ``` You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message: ```json [ { "type": "tool_result", "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", "content": "259.75 USD" } ] ``` Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output. See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.

    Forwarded natively; local estimates include definitions and framing.

  • tool_choiceobject可选◐ Partially supported

    Body param: How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all.

    Forwarded natively; included in local estimates.

    ▸ 展开子字段(3)
    • typestring必填

      Disable tool calls for this request.

      取值 none
    • disable_parallel_tool_useboolean可选

      Whether to disable parallel tool use. Defaults to `false`. If set to `true`, the model will output exactly one tool use.

    • namestring必填

      The name of the tool to use.

  • cache_controlobject可选◐ Partially supported

    Body param: Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.

    Native counting preserves message cache markers; counts do not predict cache hits or billing.

    ▸ 展开子字段(2)
    • typestring必填

      Always `ephemeral`. Discriminator that marks this object as a CacheControlEphemeral in a `type`-tagged union.

      取值 ephemeral
    • ttlstring可选

      The time-to-live for the cache control breakpoint. This may be one the following values: - `5m`: 5 minutes - `1h`: 1 hour Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.

  • output_configobject可选◐ Partially supported

    Body param: Configuration options for the model's output, such as the output format.

    Forwarded natively; additional template tokens are not exact locally.

    ▸ 展开子字段(2)
    • effortstring可选

      All possible effort levels.

    • formatobject可选

      A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)

  • thinkingobject可选◐ Partially supported

    Body param: Configuration for enabling Claude's extended thinking. When enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit. See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.

    Forwarded natively; local counting does not promise exact thinking-template accounting.

    ▸ 展开子字段(3)
    • budget_tokensnumber必填

      Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality. Must be ≥1024 and less than `max_tokens`. See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.

    • typestring必填

      Let the model choose its reasoning budget, subject to output_config.effort when supplied.

      取值 adaptive
    • displaystring可选

      Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. Defaults to `summarized`.

Returns

200

Returns a model-family-calibrated estimate, including Chinese text and tool definitions, with the response header x-praxis-token-count: estimated. Do not use it as an exact usage or billing count.

Errors follow the Anthropic format — see error codes

Response

HTTP 200

Token count

application/json

NameTypeDescription
input_tokensnumberThe total number of tokens across the provided list of messages, system prompt, and tools.

List models

GET /anthropic/v1/models● Supported

Official Anthropic docs ↗

Request parameters

  • limitnumber可选

    query: Number of items per page.

    Verified to take effect.

  • before_idstring可选

    query:

    Verified to take effect.

  • after_idstring可选

    query:

    Verified to take effect.

Returns

200

Always returns capabilities, max_input_tokens and max_tokens; unknown catalog facts are null. The total context window is not substituted for an independent input limit. Nonempty anthropic-workspace-id returns 400; anthropic-beta version selection is not implemented.

Errors follow the Anthropic format — see error codes

Response

HTTP 200

Models listed

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique model identifier.
data[].capabilitiesnull | objectModel capability information.
data[].created_atstringRFC 3339 datetime string representing the time at which the model was released. May be set to an epoch value if the release date is unknown.
data[].display_namestringA human-readable name for the model.
data[].max_input_tokensnull | numberMaximum input context window size in tokens for this model.
data[].max_tokensnull | numberMaximum value for the `max_tokens` parameter when using this model.
data[].typestringObject type. For Models, this is always `"model"`.
has_moreboolean
first_idnull | string
last_idnull | string

Upload a file

POST /anthropic/v1/files● Supported

Official Anthropic docs ↗

Request body

  • filestring必填◐ Partially supported

    Body param: The file to upload. Only the final path component of the part's `filename` is kept; an absent or empty `filename` is replaced with `unnamed` plus the extension for the file's stored `mime_type`, when known.

    Text, PDF and PNG uploads are accepted. Types are detected from content; arbitrary binary data is not supported.

  • expires_in_secondsnumber可选◐ Partially supported

    Body param: Seconds from upload until the file expires and its bytes become permanently unavailable. Must be between 3600 (one hour) and 7776000 (ninety days).

    The form field supports 3600–7776000 seconds; as a query parameter it returns 400 asking you to send it in the form.

Returns

200

SDK 0.128.0 sends form file and optional form expires_in_seconds (3600–7776000 seconds). Any other form field, including purpose, returns 400 invalid_request_error such as "purpose: Extra inputs are not permitted". The only accepted query parameter is the SDK's beta; other query parameters return 400, and a query expires_in_seconds is told to move into the form. Uploads are stored as user_data. anthropic-workspace-id is not supported and returns 400.

Errors follow the Anthropic format — see error codes

Response

HTTP 200

File uploaded

application/json

NameTypeDescription
idstringUnique object identifier. The format and length of IDs may change over time.
created_atstringRFC 3339 datetime string representing when the file was created.
filenamestringOriginal filename of the uploaded file.
mime_typestringMIME type of the file.
size_bytesnumberSize of the file in bytes.
typestringObject type. For files, this is always `"file"`.
downloadablebooleanWhether the file can be downloaded.
expires_atnull | stringRFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value.
scopenull | objectThe scope of this file, indicating the context in which it was created (e.g., a session).
scope.idstringThe ID of the scoping resource (e.g., the session ID).
scope.typestringThe type of scope (e.g., `"session"`).

List files

GET /anthropic/v1/files● Supported

Official Anthropic docs ↗

Request parameters

  • idsarray可选

    query: Query param: Restrict the result set to Files whose `id` is in this list. At most 100 entries (after de-duplication). Mutually exclusive with `page` and `limit`. When supplied, the response is always a single page (`next_page` is null). IDs that do not resolve to a visible File — including deleted Files — are silently omitted.

    Verified to take effect.

  • scope_idstring可选◐ Partially supported

    query: Query param: Filter by scope ID. Only returns files associated with the specified scope (e.g., a session ID).

    Requires anthropic-beta: managed-agents-2026-04-01. Invalid scope_id returns 400; a nonexistent session scope returns 404.

  • limitnumber可选

    query: Number of items per page.

    Verified to take effect.

  • pagestring可选

    query:

    Verified to take effect.

  • after_idstring可选

    query: Return the page of files immediately after this file id (older files).

    Returns the page after this file (older files); cannot be combined with before_id or page.

  • before_idstring可选

    query: Return the page of files immediately before this file id (newer files).

    Returns the page before this file (newer files); cannot be combined with after_id or page.

Returns

200

Newest first. Paginate with after_id / before_id and limit (sending both returns 400), or with the page cursor (next_page); use only one of the three. Responses contain data, has_more, first_id, last_id and next_page. ids (up to 100 distinct IDs) is mutually exclusive with page, after_id, before_id and limit. scope_id requires the anthropic-beta: managed-agents-2026-04-01 header; a missing header returns 400 and a nonexistent session scope returns 404. anthropic-workspace-id returns 400.

Errors follow the Anthropic format — see error codes

Response

HTTP 200

Files listed

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique object identifier. The format and length of IDs may change over time.
data[].created_atstringRFC 3339 datetime string representing when the file was created.
data[].filenamestringOriginal filename of the uploaded file.
data[].mime_typestringMIME type of the file.
data[].size_bytesnumberSize of the file in bytes.
data[].typestringObject type. For files, this is always `"file"`.
data[].downloadablebooleanWhether the file can be downloaded.
data[].expires_atnull | stringRFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value.
data[].scopenull | objectThe scope of this file, indicating the context in which it was created (e.g., a session).
next_pagenull | string

Get file metadata

Upload a file first, then replace the example file ID with its returned ID.

GET /anthropic/v1/files/{file_id}● Supported

Official Anthropic docs ↗

Request parameters

  • file_idstring必填

    path:

Returns

200

Errors follow the Anthropic format — see error codes

Response

HTTP 200

Metadata

application/json

NameTypeDescription
idstringUnique object identifier. The format and length of IDs may change over time.
created_atstringRFC 3339 datetime string representing when the file was created.
filenamestringOriginal filename of the uploaded file.
mime_typestringMIME type of the file.
size_bytesnumberSize of the file in bytes.
typestringObject type. For files, this is always `"file"`.
downloadablebooleanWhether the file can be downloaded.
expires_atnull | stringRFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value.
scopenull | objectThe scope of this file, indicating the context in which it was created (e.g., a session).
scope.idstringThe ID of the scoping resource (e.g., the session ID).
scope.typestringThe type of scope (e.g., `"session"`).

Delete a file

Upload a file first, then replace the example file ID with its returned ID.

DELETE /anthropic/v1/files/{file_id}● Supported

Official Anthropic docs ↗

Request parameters

  • file_idstring必填

    path:

Returns

200

Errors follow the Anthropic format — see error codes

Response

HTTP 200

Deleted

application/json

NameTypeDescription
idstringID of the deleted file.
typestringDeleted object type. For file deletion, this is always `"file_deleted"`.

Download file content

Upload a file first, then replace the example file ID with its returned ID.

GET /anthropic/v1/files/{file_id}/content● Supported

Official Anthropic docs ↗

Request parameters

  • file_idstring必填

    path:

Returns

400

Only files produced by the code execution tool can be downloaded; downloading a file you uploaded yourself (purpose user_data) returns 400 invalid_request_error, the same as Anthropic's own API.

Errors follow the Anthropic format — see error codes

Response

HTTP 200

Binary content

No response body is declared.

Claude Managed Agents API

Base URL

Loading…

Get started

Loading…

Run a session

  1. Create an agent and save its agent_… ID.
  2. Create a session, replacing agent with that ID. Save the returned sesn_… ID.
  3. Subscribe to events before sending a message, using the same real session ID in both requests.
  4. After agent.message, wait for session.status_idle; list historical events to read previous replies.

Use the base URL above as the SDK base URL. All requests require an API Key, anthropic-version: 2023-06-01 and anthropic-beta: managed-agents-2026-04-01. Try it supplies these protocol headers; replace resource IDs yourself.

All 95 official operations are declared: 41 are supported or partially supported (see the badges in the endpoint list); the other 54 are not implemented yet and answer 501 (not_implemented_error, x-should-retry: false) with no side effects and no charge. See endpoint notes for capability and vault limits.

Endpoints

Agents (6 endpoints, 6 available)

MethodPathDescriptionSupport
POST/v1/agentsCreate Agent◐ Partial
GET/v1/agentsList Agents● Supported
GET/v1/agents/{agent_id}Get Agent● Supported
POST/v1/agents/{agent_id}Update Agent◐ Partial
GET/v1/agents/{agent_id}/versionsList Agent Versions● Supported
POST/v1/agents/{agent_id}/archiveArchive Agent● Supported

Sessions & events (9 endpoints, 8 available)

MethodPathDescriptionSupport
POST/v1/sessionsCreate Session◐ Partial
GET/v1/sessionsList Sessions◐ Partial
GET/v1/sessions/{session_id}Get Session● Supported
POST/v1/sessions/{session_id}/eventsSend Events◐ Partial
GET/v1/sessions/{session_id}/eventsList Events● Supported
GET/v1/sessions/{session_id}/events/streamStream Events◐ Partial
POST/v1/sessions/{session_id}Update Session◐ Partial
DELETE/v1/sessions/{session_id}Delete Session○ Unsupported
POST/v1/sessions/{session_id}/archiveArchive Session● Supported

Deployments (10 endpoints, 0 available)

MethodPathDescriptionSupport
GET/v1/deployment_runsList Deployment Runs○ Unsupported
GET/v1/deployment_runs/{deployment_run_id}Get Deployment Run○ Unsupported
GET/v1/deploymentsList Deployments○ Unsupported
POST/v1/deploymentsCreate Deployment○ Unsupported
GET/v1/deployments/{deployment_id}Get Deployment○ Unsupported
POST/v1/deployments/{deployment_id}Update Deployment○ Unsupported
POST/v1/deployments/{deployment_id}/archiveArchive Deployment○ Unsupported
POST/v1/deployments/{deployment_id}/pausePause Deployment○ Unsupported
POST/v1/deployments/{deployment_id}/runRun Deployment○ Unsupported
POST/v1/deployments/{deployment_id}/unpauseUnpause Deployment○ Unsupported

Environments (6 endpoints, 5 available)

MethodPathDescriptionSupport
GET/v1/environmentsList Environments◐ Partial
POST/v1/environmentsCreate Environment◐ Partial
DELETE/v1/environments/{environment_id}Delete Environment○ Unsupported
GET/v1/environments/{environment_id}Get Environment◐ Partial
POST/v1/environments/{environment_id}Update Environment◐ Partial
POST/v1/environments/{environment_id}/archiveArchive Environment◐ Partial

Environment work (8 endpoints, 0 available)

MethodPathDescriptionSupport
GET/v1/environments/{environment_id}/workList Work Items○ Unsupported
GET/v1/environments/{environment_id}/work/{work_id}Get Work Item○ Unsupported
POST/v1/environments/{environment_id}/work/{work_id}Update Work Item○ Unsupported
POST/v1/environments/{environment_id}/work/{work_id}/ackAcknowledge Work Item○ Unsupported
POST/v1/environments/{environment_id}/work/{work_id}/heartbeatHeartbeat Work Item○ Unsupported
POST/v1/environments/{environment_id}/work/{work_id}/stopStop Work Item○ Unsupported
GET/v1/environments/{environment_id}/work/pollPoll Work Items○ Unsupported
GET/v1/environments/{environment_id}/work/statsWork Item Stats○ Unsupported

Memory stores (14 endpoints, 0 available)

MethodPathDescriptionSupport
GET/v1/memory_storesList Memory Stores○ Unsupported
POST/v1/memory_storesCreate Memory Store○ Unsupported
DELETE/v1/memory_stores/{memory_store_id}Delete Memory Store○ Unsupported
GET/v1/memory_stores/{memory_store_id}Get Memory Store○ Unsupported
POST/v1/memory_stores/{memory_store_id}Update Memory Store○ Unsupported
POST/v1/memory_stores/{memory_store_id}/archiveArchive Memory Store○ Unsupported
GET/v1/memory_stores/{memory_store_id}/memoriesList Memories○ Unsupported
POST/v1/memory_stores/{memory_store_id}/memoriesCreate Memory○ Unsupported
DELETE/v1/memory_stores/{memory_store_id}/memories/{memory_id}Delete Memory○ Unsupported
GET/v1/memory_stores/{memory_store_id}/memories/{memory_id}Get Memory○ Unsupported
POST/v1/memory_stores/{memory_store_id}/memories/{memory_id}Update Memory○ Unsupported
GET/v1/memory_stores/{memory_store_id}/memory_versionsList Memory Versions○ Unsupported
GET/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}Get Memory Version○ Unsupported
POST/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redactRedact Memory Version○ Unsupported

Session resources (5 endpoints, 4 available)

MethodPathDescriptionSupport
GET/v1/sessions/{session_id}/resourcesList Session Resources◐ Partial
POST/v1/sessions/{session_id}/resourcesAdd Session Resource◐ Partial
DELETE/v1/sessions/{session_id}/resources/{resource_id}Delete Session Resource◐ Partial
GET/v1/sessions/{session_id}/resources/{resource_id}Get Session Resource◐ Partial
POST/v1/sessions/{session_id}/resources/{resource_id}Update Session Resource○ Unsupported

Session threads (5 endpoints, 5 available)

MethodPathDescriptionSupport
GET/v1/sessions/{session_id}/threadsList Threads◐ Partial
GET/v1/sessions/{session_id}/threads/{thread_id}Get Thread◐ Partial
POST/v1/sessions/{session_id}/threads/{thread_id}/archiveArchive Thread◐ Partial
GET/v1/sessions/{session_id}/threads/{thread_id}/eventsList Thread Events◐ Partial
GET/v1/sessions/{session_id}/threads/{thread_id}/streamStream Thread Events◐ Partial

Skills (9 endpoints, 0 available)

MethodPathDescriptionSupport
GET/v1/skillsList Skills○ Unsupported
POST/v1/skillsCreate Skill○ Unsupported
DELETE/v1/skills/{skill_id}Delete Skill○ Unsupported
GET/v1/skills/{skill_id}Get Skill○ Unsupported
GET/v1/skills/{skill_id}/versionsList Skill Versions○ Unsupported
POST/v1/skills/{skill_id}/versionsCreate Skill Version○ Unsupported
DELETE/v1/skills/{skill_id}/versions/{version}Delete Skill Version○ Unsupported
GET/v1/skills/{skill_id}/versions/{version}Get Skill Version○ Unsupported
GET/v1/skills/{skill_id}/versions/{version}/contentDownload Skill Version Content○ Unsupported

Tunnels (10 endpoints, 0 available)

MethodPathDescriptionSupport
GET/v1/tunnelsList Tunnels○ Unsupported
POST/v1/tunnelsCreate Tunnel○ Unsupported
GET/v1/tunnels/{tunnel_id}Get Tunnel○ Unsupported
POST/v1/tunnels/{tunnel_id}/archiveArchive Tunnel○ Unsupported
GET/v1/tunnels/{tunnel_id}/certificatesList Tunnel Certificates○ Unsupported
POST/v1/tunnels/{tunnel_id}/certificatesCreate Tunnel Certificate○ Unsupported
GET/v1/tunnels/{tunnel_id}/certificates/{certificate_id}Get Tunnel Certificate○ Unsupported
POST/v1/tunnels/{tunnel_id}/certificates/{certificate_id}/archiveArchive Tunnel Certificate○ Unsupported
POST/v1/tunnels/{tunnel_id}/reveal_tokenReveal Tunnel Token○ Unsupported
POST/v1/tunnels/{tunnel_id}/rotate_tokenRotate Tunnel Token○ Unsupported

Vaults & credentials (13 endpoints, 13 available)

MethodPathDescriptionSupport
GET/v1/vaultsList Vaults● Supported
POST/v1/vaultsCreate Vault● Supported
DELETE/v1/vaults/{vault_id}Delete Vault● Supported
GET/v1/vaults/{vault_id}Get Vault● Supported
POST/v1/vaults/{vault_id}Update Vault● Supported
POST/v1/vaults/{vault_id}/archiveArchive Vault● Supported
GET/v1/vaults/{vault_id}/credentialsList Credentials◐ Partial
POST/v1/vaults/{vault_id}/credentialsCreate Credential◐ Partial
DELETE/v1/vaults/{vault_id}/credentials/{credential_id}Delete Credential◐ Partial
GET/v1/vaults/{vault_id}/credentials/{credential_id}Get Credential◐ Partial
POST/v1/vaults/{vault_id}/credentials/{credential_id}Update Credential◐ Partial
POST/v1/vaults/{vault_id}/credentials/{credential_id}/archiveArchive Credential◐ Partial
POST/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validateValidate Credential MCP OAuth◐ Partial

Differences from Claude Managed Agents

  • Create Agent:Supports text prompts, models, metadata and built-in tools. MCP, skills and additional model controls are not supported and return 400. multiagent accepts null or a coordinator roster of 1–20 agent IDs, {type:"agent",id,version?} references or at most one {type:"self"}. Versions are pinned on create/update. Members must be distinct, exist, be unarchived and have no multiagent topology. The compatibility API provides only the eight official tools: bash, edit, glob, grep, read, write, web_search and web_fetch. configs rejects other tool names. Sessions created here do not provide background tasks, Monitor or subagents. Use /agent/v1 for all native tools. Each coordinator permits at most one advisor whose model must be available and differ from the agent model; only the primary session can consult it, each consultation uses a separate advisor thread, and advice returns via agent.thread_message_received.
  • Get Agent:Replace example resource IDs with IDs from resources you created.
  • Update Agent:Use version for optimistic concurrency; conflicts return 409 and unchanged updates preserve the version. MCP and skills are not supported. multiagent accepts null or a coordinator roster of 1–20 agent IDs, {type:"agent",id,version?} references or at most one {type:"self"}. Versions are pinned on create/update. Members must be distinct, exist, be unarchived and have no multiagent topology. The compatibility API provides only the eight official tools: bash, edit, glob, grep, read, write, web_search and web_fetch. configs rejects other tool names. Sessions created here do not provide background tasks, Monitor or subagents. Use /agent/v1 for all native tools. Each coordinator permits at most one advisor whose model must be available and differ from the agent model; only the primary session can consult it, each consultation uses a separate advisor thread, and advice returns via agent.thread_message_received.
  • List Agent Versions:Replace example resource IDs with IDs from resources you created.
  • Archive Agent:Archived agents remain readable, including versions, but cannot be updated. Only archive your own test agent.
  • Create Session:Create an agent first and replace agent_123 with its returned id. environment_id is required on this compatibility surface: use node22 or a tenant-owned cloud environment. The native /agent/v1 surface allows omission to select a light machine. Inline agent overrides, budgets and vaults are not supported. Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.
  • List Sessions:Supports limit, page and agent_id. agent_version, time ranges, deployment_id, memory_store_id, include_archived, order and statuses are not supported and return 400.
  • Get Session:Replace example resource IDs with IDs from resources you created.
  • Send Events:Each user.message accepts exactly one nonempty text block. Replace sesn_123 with your session id. Text user.message, user.interrupt and tool confirmation are supported; other input variants are not. The response acknowledges inputs; read replies from event history or the stream. A user.message sent while the session waits for tool approval is queued: the returned event has processed_at null and runs in order once the approval is resolved.
  • List Events:Send a message before reading history. Until processing finishes, only admitted input may be visible. Pagination, event type and time filters are supported. A session waiting for tool approval pauses on session.status_idle with stop_reason requires_action, whose event_ids list the agent.tool_use events to confirm. A failed run emits session.error before session.status_terminated. As in the official API, agent.thinking is a progress signal without content.
  • Stream Events:Keep the SSE connection open and send a message in another request after replacing sesn_123. Stopping the stream disconnects the subscription, not the agent. SDK 0.124.0 filters session.usage; read history for full usage. Pass event_deltas[]=agent.message to receive incremental text previews before the final event; as in the official API, agent.thinking previews are start-only.
  • List Environments:Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.
  • Create Environment:Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.
  • Get Environment:Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.
  • Update Environment:Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.
  • Archive Environment:Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.
  • Update Session:Supports title and metadata with the official patch semantics: a string value upserts the key, null deletes it, a whole-null object clears the bag, and untouched keys are preserved. The official agent override (tools/mcp_servers), budget and vault_ids are not supported and return 400 naming the field. Updating an archived session returns 409.
  • Archive Session:Archived sessions refuse new messages with 400 invalid_request_error naming the archived session; retrieval and event history stay readable. Re-archiving is idempotent and archived_at keeps the first archive time.
  • List Session Resources:Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.
  • Add Session Resource:Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.
  • Delete Session Resource:Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.
  • Get Session Resource:Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.
  • List Threads:Returns the primary thread and every child thread in created_at order. Thread ids use sthr_ plus the owning session suffix; children reference the primary parent_thread_id and retain the parent session_id. agent describes the actual running definition; built-in types use their type name and null for unregistered id/version. Archived children have status terminated and archived_at. stats/usage remain null without thread-level tracking.
  • Get Thread:Returns a primary or child thread belonging to this session, field-for-field identical to its list item. Foreign, unknown and malformed thread ids uniformly return 404 without revealing existence.
  • Archive Thread:Archiving the primary thread uses session archival. Archiving a child archives only that child session, leaving the parent and siblings intact. Archived children have status terminated and archived_at; their history remains readable.
  • List Thread Events:Reads the selected thread ledger: the primary session for the primary thread, or the child session for a child thread. Uses the session event query parameters, public event types and data + next_page envelope. Web tools return search_result blocks on both APIs; answer citations are an /agent/v1 extension, rendered as [n] on /anthropic.
  • Stream Thread Events:Subscribes to the selected thread live ledger using the session SSE implementation; the /agent API also supports a read-only WebSocket. The parent stream includes child creation, status and message events. Child approvals carry session_thread_id; confirmations and interrupts targeting that id are routed to the owned child.
  • List Vaults:Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.
  • Create Vault:Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.
  • Delete Vault:Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.
  • Get Vault:Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.
  • Update Vault:Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.
  • Archive Vault:Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.
  • List Credentials:Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.
  • Create Credential:Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.
  • Delete Credential:Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.
  • Get Credential:Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.
  • Update Credential:Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.
  • Archive Credential:Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.
  • Validate Credential MCP OAuth:Applies to OAuth credentials only; other types return 400. The result is always HTTP 200 with status valid, invalid or unknown; mcp_probe describes the failing step only when the check does not pass, and refresh appears only when a refresh was attempted.

For authoritative parameter definitions, see the official Claude Managed Agents documentation.

Errors follow the Claude Managed Agents format, see errors; quotas and response headers are covered in rate limits.

POST /anthropic/v1/agents◐ Partial

Official Claude documentation ↗

Request body

  • namestring必填

    Human-readable agent name, 1-255 characters, unique within the workspace.

  • modelstring | object必填

    The model powering the agent: a model name string (e.g. claude-opus-5) or an object for extra configuration (see subfields).

    ▸ 展开子字段(4)
    • idstring必填

      The model name string, e.g. claude-opus-5.

    • effortstring | object可选

      How hard the model works per inference: a bare level string (e.g. high) or a {type: high} object. On create, omitted resolves the per-model default; on update, omitting preserves it.

    • inference_geostring可选

      Geographic region for inference; unset falls through to the workspace default. model is replaced wholesale — omitting the subfield on update clears it.

    • speedstring可选

      Inference speed mode: fast generates output notably quicker at premium pricing. Not all models support it; invalid combinations are rejected at create time.

  • systemstring可选

    The agent's system prompt.

  • descriptionstring可选

    What the agent does.

  • mcp_serversarray可选○ 未支持

    MCP servers the agent connects to; up to 20 with unique names. Every server must be referenced by an mcp_toolset in tools, or the request is rejected.

    ▸ 展开子字段(3)
    • namestring必填

      Name unique within this list, 1-255 characters, referenced by mcp_toolset configurations.

    • typestring必填

      Server type; only url is supported today.

      取值 url
    • urlstring必填

      The MCP server's endpoint URL.

  • metadataobject可选

    Custom metadata key-value pairs; up to 16 keys of at most 512 characters each.

  • multiagentobject可选

    Multiagent topology: the session's primary thread orchestrates work by spawning session threads drawn from the agents roster.

    ▸ 展开子字段(2)
    • agentsarray必填

      A roster of 1-20 agent IDs, {type: agent, id, version?} references or at most one {type: self}. Versions are pinned on create/update. Members must be distinct, exist, be unarchived and have no multiagent topology. Each coordinator permits at most one advisor whose model must be available and differ from the agent model; only the primary session can consult it, each consultation uses a separate advisor thread, and advice returns via agent.thread_message_received.

    • typestring必填

      Topology type; only coordinator today.

      取值 coordinator
  • skillsarray可选○ 未支持

    Skills available to the agent.

  • toolsarray可选

    Tool configurations for the agent; up to 128 tools across all toolsets.

Returns

200

Supports text prompts, models, metadata and built-in tools. MCP, skills and additional model controls are not supported and return 400. multiagent accepts null or a coordinator roster of 1–20 agent IDs, {type:"agent",id,version?} references or at most one {type:"self"}. Versions are pinned on create/update. Members must be distinct, exist, be unarchived and have no multiagent topology. The compatibility API provides only the eight official tools: bash, edit, glob, grep, read, write, web_search and web_fetch. configs rejects other tool names. Sessions created here do not provide background tasks, Monitor or subagents. Use /agent/v1 for all native tools. Each coordinator permits at most one advisor whose model must be available and differ from the agent model; only the primary session can consult it, each consultation uses a separate advisor thread, and advice returns via agent.thread_message_received.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | string
mcp_serversarray<object>
mcp_servers[].namestring
mcp_servers[].typestring
mcp_servers[].urlstring
metadataobject
modelobjectModel identifier and configuration.
model.idstringThe model that will power your agent. See models for additional details and options.
model.effortobjectHow hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.
model.inference_geostringGeographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.
model.speedstringInference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.
multiagentnull | objectResolved coordinator topology with a concrete agent roster.
multiagent.agentsarray<object>Agents the coordinator may spawn as session threads, each resolved to a specific version.
multiagent.typestring
namestring
skillsarray<object>
skills[].skill_idstring
skills[].typestring
skills[].versionstring
systemnull | string
toolsarray<object>
tools[].configsarray<object>
tools[].default_configobjectResolved default configuration for agent tools. / Resolved default configuration for all tools from an MCP server.
tools[].typestring
tools[].mcp_server_namestring
tools[].descriptionstring
tools[].input_schemaobjectJSON Schema for custom tool input parameters.
tools[].namestring
typestring
updated_atstringA timestamp in RFC 3339 format
versionnumberThe agent's current version. Starts at 1 and increments when the agent is modified.

List Agents

GET /anthropic/v1/agents● Supported

Official Claude documentation ↗

Request parameters

  • created_at[gte]string可选

    query: Return records created at or after this time.

  • created_at[lte]string可选

    query: Return records created at or before this time.

  • include_archivedboolean可选

    query: Whether to include archived records.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

200

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstring
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].created_atstringA timestamp in RFC 3339 format
data[].descriptionnull | string
data[].mcp_serversarray<object>
data[].metadataobject
data[].modelobjectModel identifier and configuration.
data[].multiagentnull | objectResolved coordinator topology with a concrete agent roster.
data[].namestring
data[].skillsarray<object>
data[].systemnull | string
data[].toolsarray<object>
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
data[].versionnumberThe agent's current version. Starts at 1 and increments when the agent is modified.
next_pagestring | null

Get Agent

Call Create agent first and replace the example agent ID with its returned ID.

GET /anthropic/v1/agents/{agent_id}● Supported

Official Claude documentation ↗

Request parameters

  • agent_idstring必填

    path: Filter results by agent ID.

  • versionnumber可选

    query: Path parameter: the version.

Returns

200

Replace example resource IDs with IDs from resources you created.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | string
mcp_serversarray<object>
mcp_servers[].namestring
mcp_servers[].typestring
mcp_servers[].urlstring
metadataobject
modelobjectModel identifier and configuration.
model.idstringThe model that will power your agent. See models for additional details and options.
model.effortobjectHow hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.
model.inference_geostringGeographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.
model.speedstringInference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.
multiagentnull | objectResolved coordinator topology with a concrete agent roster.
multiagent.agentsarray<object>Agents the coordinator may spawn as session threads, each resolved to a specific version.
multiagent.typestring
namestring
skillsarray<object>
skills[].skill_idstring
skills[].typestring
skills[].versionstring
systemnull | string
toolsarray<object>
tools[].configsarray<object>
tools[].default_configobjectResolved default configuration for agent tools. / Resolved default configuration for all tools from an MCP server.
tools[].typestring
tools[].mcp_server_namestring
tools[].descriptionstring
tools[].input_schemaobjectJSON Schema for custom tool input parameters.
tools[].namestring
typestring
updated_atstringA timestamp in RFC 3339 format
versionnumberThe agent's current version. Starts at 1 and increments when the agent is modified.

Call Create agent first and replace the example agent ID with its returned ID.

POST /anthropic/v1/agents/{agent_id}◐ Partial

Official Claude documentation ↗

Request parameters

  • agent_idstring必填

    path: Filter results by agent ID.

  • namestring可选

    Agent name; omit to preserve. Cannot be cleared.

  • modelstring | object可选

    The model powering the agent: a model name string (e.g. claude-opus-5) or an object for extra configuration (see subfields).

    ▸ 展开子字段(4)
    • idstring必填

      The model name string, e.g. claude-opus-5.

    • effortstring | object可选

      How hard the model works per inference: a bare level string (e.g. high) or a {type: high} object. On create, omitted resolves the per-model default; on update, omitting preserves it.

    • inference_geostring可选

      Geographic region for inference; unset falls through to the workspace default. model is replaced wholesale — omitting the subfield on update clears it.

    • speedstring可选

      Inference speed mode: fast generates output notably quicker at premium pricing. Not all models support it; invalid combinations are rejected at create time.

  • systemstring可选

    System prompt; omit to preserve, send an empty string or null to clear.

  • descriptionstring可选

    Description; omit to preserve, send an empty string or null to clear.

  • mcp_serversarray可选○ 未支持

    Full-replacement MCP server list; omit to preserve, send an empty array or null to clear.

  • metadataobject可选

    Metadata patch: set a key to a string to upsert it, or to null to delete it; omit the field to preserve. Up to 16 keys of at most 512 characters.

  • multiagentobject可选

    Multiagent topology: the session's primary thread orchestrates work by spawning session threads drawn from the agents roster.

    ▸ 展开子字段(2)
    • agentsarray必填

      A roster of 1-20 agent IDs, {type: agent, id, version?} references or at most one {type: self}. Versions are pinned on create/update. Members must be distinct, exist, be unarchived and have no multiagent topology. Each coordinator permits at most one advisor whose model must be available and differ from the agent model; only the primary session can consult it, each consultation uses a separate advisor thread, and advice returns via agent.thread_message_received.

    • typestring必填

      Topology type; only coordinator today.

      取值 coordinator
  • skillsarray可选○ 未支持

    Full-replacement skill list; omit to preserve, send an empty array or null to clear.

  • toolsarray可选

    Full-replacement tool configuration; omit to preserve, send an empty array or null to clear.

  • ▸ 更多参数(1)
    • versionnumber可选

      The agent's current version for concurrency control: must match the version returned by the latest create or retrieve, or the call answers a conflict.

Returns

200

Use version for optimistic concurrency; conflicts return 409 and unchanged updates preserve the version. MCP and skills are not supported. multiagent accepts null or a coordinator roster of 1–20 agent IDs, {type:"agent",id,version?} references or at most one {type:"self"}. Versions are pinned on create/update. Members must be distinct, exist, be unarchived and have no multiagent topology. The compatibility API provides only the eight official tools: bash, edit, glob, grep, read, write, web_search and web_fetch. configs rejects other tool names. Sessions created here do not provide background tasks, Monitor or subagents. Use /agent/v1 for all native tools. Each coordinator permits at most one advisor whose model must be available and differ from the agent model; only the primary session can consult it, each consultation uses a separate advisor thread, and advice returns via agent.thread_message_received.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | string
mcp_serversarray<object>
mcp_servers[].namestring
mcp_servers[].typestring
mcp_servers[].urlstring
metadataobject
modelobjectModel identifier and configuration.
model.idstringThe model that will power your agent. See models for additional details and options.
model.effortobjectHow hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.
model.inference_geostringGeographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.
model.speedstringInference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.
multiagentnull | objectResolved coordinator topology with a concrete agent roster.
multiagent.agentsarray<object>Agents the coordinator may spawn as session threads, each resolved to a specific version.
multiagent.typestring
namestring
skillsarray<object>
skills[].skill_idstring
skills[].typestring
skills[].versionstring
systemnull | string
toolsarray<object>
tools[].configsarray<object>
tools[].default_configobjectResolved default configuration for agent tools. / Resolved default configuration for all tools from an MCP server.
tools[].typestring
tools[].mcp_server_namestring
tools[].descriptionstring
tools[].input_schemaobjectJSON Schema for custom tool input parameters.
tools[].namestring
typestring
updated_atstringA timestamp in RFC 3339 format
versionnumberThe agent's current version. Starts at 1 and increments when the agent is modified.

List Agent Versions

Call Create agent first and replace the example agent ID with its returned ID.

GET /anthropic/v1/agents/{agent_id}/versions● Supported

Official Claude documentation ↗

Request parameters

  • agent_idstring必填

    path: Filter results by agent ID.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

200

Replace example resource IDs with IDs from resources you created.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstring
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].created_atstringA timestamp in RFC 3339 format
data[].descriptionnull | string
data[].mcp_serversarray<object>
data[].metadataobject
data[].modelobjectModel identifier and configuration.
data[].multiagentnull | objectResolved coordinator topology with a concrete agent roster.
data[].namestring
data[].skillsarray<object>
data[].systemnull | string
data[].toolsarray<object>
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
data[].versionnumberThe agent's current version. Starts at 1 and increments when the agent is modified.
next_pagestring | null

Archive Agent

Call Create agent first and replace the example agent ID with its returned ID.

POST /anthropic/v1/agents/{agent_id}/archive● Supported

Official Claude documentation ↗

Request parameters

  • agent_idstring必填

    path: Filter results by agent ID.

Returns

200

Archived agents remain readable, including versions, but cannot be updated. Only archive your own test agent.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | string
mcp_serversarray<object>
mcp_servers[].namestring
mcp_servers[].typestring
mcp_servers[].urlstring
metadataobject
modelobjectModel identifier and configuration.
model.idstringThe model that will power your agent. See models for additional details and options.
model.effortobjectHow hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes.
model.inference_geostringGeographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo.
model.speedstringInference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time.
multiagentnull | objectResolved coordinator topology with a concrete agent roster.
multiagent.agentsarray<object>Agents the coordinator may spawn as session threads, each resolved to a specific version.
multiagent.typestring
namestring
skillsarray<object>
skills[].skill_idstring
skills[].typestring
skills[].versionstring
systemnull | string
toolsarray<object>
tools[].configsarray<object>
tools[].default_configobjectResolved default configuration for agent tools. / Resolved default configuration for all tools from an MCP server.
tools[].typestring
tools[].mcp_server_namestring
tools[].descriptionstring
tools[].input_schemaobjectJSON Schema for custom tool input parameters.
tools[].namestring
typestring
updated_atstringA timestamp in RFC 3339 format
versionnumberThe agent's current version. Starts at 1 and increments when the agent is modified.

Call Create agent first and replace the example agent ID with its returned ID.

POST /anthropic/v1/sessions◐ Partial

Official Claude documentation ↗

Request body

  • agentstring | object必填

    The agent the session runs: an agent ID string (pins the latest version) or an object with id and version (see subfields).

    ▸ 展开子字段(8)
    • idstring必填

      The ID of the agent the session runs.

    • typestring必填

      Reference type; only agent today.

      取值 agent_with_overrides
    • versionnumber可选

      The specific agent version to pin; omit for the latest.

    • mcp_serversarray可选

      Replacement MCP server list for this session: the provided array applies wholesale; an empty array clears, omitting keeps the agent's configuration.

    • modelstring | object可选

      Replacement model for this session: a model name string (e.g. claude-opus-5) or a config object; omit to keep the agent's model.

    • skillsarray可选

      Replacement skill list for this session; an empty array clears, omitting keeps the agent's skills.

    • systemstring可选

      Replacement system prompt for this session, up to 100,000 characters; null clears it, omitting keeps the agent's.

    • toolsarray可选

      Replacement tool configuration for this session; an empty array clears, omitting keeps the agent's.

  • environment_idstring必填

    ID of the environment the session runs in; it determines the container's base environment.

  • budgetobject可选○ 未支持

    Spending cap for the session.

    ▸ 展开子字段(2)
    • max_list_costobject必填

      Cap on list-call spending within the budget.

    • typestring必填

      Budget type; only max_list_cost today.

      取值 limit
  • initial_eventsarray可选

    Initial events sent to the session in order at creation; user.message and user.define_outcome are supported, up to 50.

  • metadataobject可选

    Custom metadata key-value pairs for the session.

  • resourcesarray可选◐ 部分支持

    Resources (e.g. repositories, files) to mount into the session's container.

  • titlestring可选

    Human-readable session title.

  • vault_idsarray可选○ 未支持

    Vault IDs for stored credentials the agent can use during the session.

Returns

200

Create an agent first and replace agent_123 with its returned id. environment_id is required on this compatibility surface: use node22 or a tenant-owned cloud environment. The native /agent/v1 surface allows omission to select a light machine. Inline agent overrides, budgets and vaults are not supported. Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
agentobjectResolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.
agent.idstring
agent.descriptionnull | string
agent.mcp_serversarray<object>
agent.modelobjectModel identifier and configuration.
agent.multiagentnull | objectResolved coordinator topology with full agent definitions for each roster member.
agent.namestring
agent.skillsarray<object>
agent.systemnull | string
agent.toolsarray<object>
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring
created_atstringA timestamp in RFC 3339 format
environment_idstring
metadataobject
outcome_evaluationsarray<object>Per-outcome evaluation state. One entry per `define_outcome` event sent to the session.
outcome_evaluations[].completed_atnull | stringA timestamp in RFC 3339 format
outcome_evaluations[].descriptionstringWhat the agent should produce.
outcome_evaluations[].explanationnull | stringGrader's verdict text from the most recent evaluation. For `satisfied`, explains why criteria are met; for `needs_revision` (intermediate), what's missing; for `failed`, why unrecoverable.
outcome_evaluations[].iterationnumber0-indexed revision cycle the outcome is currently on.
outcome_evaluations[].outcome_idstringServer-generated outc_ ID for this outcome.
outcome_evaluations[].resultstringCurrent evaluation state. `pending` before the agent begins work; `running` while producing or revising; `evaluating` while the grader scores; `satisfied`/`max_iterations_reached`/`failed`/`interrupted` are terminal.
outcome_evaluations[].typestring
resourcesarray<object>
resources[].idstring
resources[].created_atstringA timestamp in RFC 3339 format
resources[].mount_pathstring | null | stringFilesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
resources[].typestring
resources[].updated_atstringA timestamp in RFC 3339 format
resources[].urlstring
resources[].checkoutnull | object
resources[].file_idstring
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].descriptionstringDescription of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
resources[].namenull | stringDisplay name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.
statsobjectTiming statistics for a session.
stats.active_secondsnumberCumulative time in seconds the session spent in `running` status. Excludes idle time.
stats.duration_secondsnumberElapsed time since session creation in seconds. For terminated sessions, frozen at the final update.
statusstringSessionStatus enum - `rescheduling` - Transient error occurred, retrying automatically. - `running` - Agent is actively executing. - `idle` - Agent is waiting for input, including user messages or tool confirmations. Sessions start in idle. - `terminated` - Session has ended, either due to an error or completion.
titlenull | string
typestring
updated_atstringA timestamp in RFC 3339 format
usageobjectCumulative token usage for a session across all turns.
usage.active_secondsnumberCumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once, unlike `stats.active_seconds`, which sums each thread's own active time. This is the duration the session's runtime cost is priced on.
usage.cache_creationobjectPrompt-cache creation token usage broken down by cache lifetime.
usage.cache_read_input_tokensnumberTotal tokens read from prompt cache.
usage.input_tokensnumberTotal input tokens consumed across all turns.
usage.list_costnull | objectA monetary amount in a specific currency.
usage.output_tokensnumberTotal output tokens generated across all turns.
usage.server_tool_usenull | objectCumulative count of server-executed tool invocations, broken down by tool.
vault_idsarray<string>Vault IDs attached to the session at creation. Empty when no vaults were supplied.
deployment_idnull | stringDeployment ID when the session was created from a deployment reference. Null otherwise.

GET /anthropic/v1/sessions◐ Partial

Official Claude documentation ↗

Request parameters

  • agent_idstring可选

    query: Filter results by agent ID.

  • agent_versionnumber可选

    query: Filter by agent version; only applies when agent_id is also set.

  • created_at[gt]string可选

    query: Return records created strictly after this time.

  • created_at[gte]string可选

    query: Return records created at or after this time.

  • created_at[lt]string可选

    query: Return records created strictly before this time.

  • created_at[lte]string可选

    query: Return records created at or before this time.

  • deployment_idstring可选

    query: Deployment ID (path or query parameter).

  • include_archivedboolean可选

    query: Whether to include archived records.

  • memory_store_idstring可选

    query: Memory store ID (path or query parameter).

  • orderstring可选

    query: Order by creation time: asc oldest first, desc newest first (default).

  • ▸ 更多参数(3)
    • statusesarray可选

      query: Filter by session status; repeat the parameter to match several.

    • limitnumber可选

      query: Maximum number of items per page.

    • pagestring可选

      query: Pagination cursor taken from the previous response's next_page.

Returns

200

Supports limit, page and agent_id. agent_version, time ranges, deployment_id, memory_store_id, include_archived, order and statuses are not supported and return 400.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstring
data[].agentobjectResolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
data[].created_atstringA timestamp in RFC 3339 format
data[].environment_idstring
data[].metadataobject
data[].outcome_evaluationsarray<object>Per-outcome evaluation state. One entry per `define_outcome` event sent to the session.
data[].resourcesarray<object>
data[].statsobjectTiming statistics for a session.
data[].statusstringSessionStatus enum - `rescheduling` - Transient error occurred, retrying automatically. - `running` - Agent is actively executing. - `idle` - Agent is waiting for input, including user messages or tool confirmations. Sessions start in idle. - `terminated` - Session has ended, either due to an error or completion.
data[].titlenull | string
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
data[].usageobjectCumulative token usage for a session across all turns.
data[].vault_idsarray<string>Vault IDs attached to the session at creation. Empty when no vaults were supplied.
data[].deployment_idnull | stringDeployment ID when the session was created from a deployment reference. Null otherwise.
next_pagestring | null

Get Session

Call Create session first and replace the example session ID with its returned ID.

GET /anthropic/v1/sessions/{session_id}● Supported

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

Returns

200

Replace example resource IDs with IDs from resources you created.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
agentobjectResolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.
agent.idstring
agent.descriptionnull | string
agent.mcp_serversarray<object>
agent.modelobjectModel identifier and configuration.
agent.multiagentnull | objectResolved coordinator topology with full agent definitions for each roster member.
agent.namestring
agent.skillsarray<object>
agent.systemnull | string
agent.toolsarray<object>
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring
created_atstringA timestamp in RFC 3339 format
environment_idstring
metadataobject
outcome_evaluationsarray<object>Per-outcome evaluation state. One entry per `define_outcome` event sent to the session.
outcome_evaluations[].completed_atnull | stringA timestamp in RFC 3339 format
outcome_evaluations[].descriptionstringWhat the agent should produce.
outcome_evaluations[].explanationnull | stringGrader's verdict text from the most recent evaluation. For `satisfied`, explains why criteria are met; for `needs_revision` (intermediate), what's missing; for `failed`, why unrecoverable.
outcome_evaluations[].iterationnumber0-indexed revision cycle the outcome is currently on.
outcome_evaluations[].outcome_idstringServer-generated outc_ ID for this outcome.
outcome_evaluations[].resultstringCurrent evaluation state. `pending` before the agent begins work; `running` while producing or revising; `evaluating` while the grader scores; `satisfied`/`max_iterations_reached`/`failed`/`interrupted` are terminal.
outcome_evaluations[].typestring
resourcesarray<object>
resources[].idstring
resources[].created_atstringA timestamp in RFC 3339 format
resources[].mount_pathstring | null | stringFilesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
resources[].typestring
resources[].updated_atstringA timestamp in RFC 3339 format
resources[].urlstring
resources[].checkoutnull | object
resources[].file_idstring
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].descriptionstringDescription of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
resources[].namenull | stringDisplay name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.
statsobjectTiming statistics for a session.
stats.active_secondsnumberCumulative time in seconds the session spent in `running` status. Excludes idle time.
stats.duration_secondsnumberElapsed time since session creation in seconds. For terminated sessions, frozen at the final update.
statusstringSessionStatus enum - `rescheduling` - Transient error occurred, retrying automatically. - `running` - Agent is actively executing. - `idle` - Agent is waiting for input, including user messages or tool confirmations. Sessions start in idle. - `terminated` - Session has ended, either due to an error or completion.
titlenull | string
typestring
updated_atstringA timestamp in RFC 3339 format
usageobjectCumulative token usage for a session across all turns.
usage.active_secondsnumberCumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once, unlike `stats.active_seconds`, which sums each thread's own active time. This is the duration the session's runtime cost is priced on.
usage.cache_creationobjectPrompt-cache creation token usage broken down by cache lifetime.
usage.cache_read_input_tokensnumberTotal tokens read from prompt cache.
usage.input_tokensnumberTotal input tokens consumed across all turns.
usage.list_costnull | objectA monetary amount in a specific currency.
usage.output_tokensnumberTotal output tokens generated across all turns.
usage.server_tool_usenull | objectCumulative count of server-executed tool invocations, broken down by tool.
vault_idsarray<string>Vault IDs attached to the session at creation. Empty when no vaults were supplied.
deployment_idnull | stringDeployment ID when the session was created from a deployment reference. Null otherwise.

Call Create session first and replace the example session ID with its returned ID.

POST /anthropic/v1/sessions/{session_id}/events◐ Partial

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • eventsarray必填

    Events to send to the session.

Returns

200

Each user.message accepts exactly one nonempty text block. Replace sesn_123 with your session id. Text user.message, user.interrupt and tool confirmation are supported; other input variants are not. The response acknowledges inputs; read replies from event history or the stream. A user.message sent while the session waits for tool approval is queued: the returned event has processed_at null and runs in order once the approval is resolved.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>Sent events
data[].idstringUnique identifier for this event.
data[].contentarray<object>Array of content blocks comprising the user message. / The result content returned by the tool. / The result content returned by the tool. / System content blocks. Text-only.
data[].typestring
data[].processed_atnull | string | string | null | string | null | stringA timestamp in RFC 3339 format
data[].session_thread_idnull | stringIf absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread. / Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread. / Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread. / Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread.
data[].resultstringUserToolConfirmationResult enum
data[].tool_use_idstringThe id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` event's `stop_reason.event_ids` field. / The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` event's `stop_reason.event_ids` field.
data[].deny_messagenull | stringOptional message providing context for a 'deny' decision. Only allowed when result is 'deny'.
data[].custom_tool_use_idstringThe id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` event's `stop_reason.event_ids` field.
data[].is_errornull | booleanWhether the tool execution resulted in an error.
data[].descriptionstringWhat the agent should produce. Copied from the input event.
data[].max_iterationsnull | numberEvaluate-then-revise cycles before giving up. Default 3, max 20.
data[].outcome_idstringServer-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.
data[].rubricobjectRubric for grading the quality of an outcome.

List Events

Call Create session first and replace the example session ID with its returned ID.

GET /anthropic/v1/sessions/{session_id}/events● Supported

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • created_at[gt]string可选

    query: Return records created strictly after this time.

  • created_at[gte]string可选

    query: Return records created at or after this time.

  • created_at[lt]string可选

    query: Return records created strictly before this time.

  • created_at[lte]string可选

    query: Return records created at or before this time.

  • orderstring可选

    query: Order by processed time: asc chronological (default), desc the reverse.

  • typesarray可选

    query: Filter by event type; values match the returned events' type field (e.g. user.message, agent.tool_use). Omit for all types.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

200

Send a message before reading history. Until processing finishes, only admitted input may be visible. Pagination, event type and time filters are supported. A session waiting for tool approval pauses on session.status_idle with stop_reason requires_action, whose event_ids list the agent.tool_use events to confirm. A failed run emits session.error before session.status_terminated. As in the official API, agent.thinking is a progress signal without content.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for this event.
data[].contentarray<object>Array of content blocks comprising the user message. / The result content returned by the tool. / Array of text blocks comprising the agent response. / The result content returned by the tool. / The result content returned by the tool. / Message content blocks. / Message content blocks. / The result content returned by the tool. / System content blocks. Text-only.
data[].typestring
data[].processed_atnull | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | null | string | string | string | null | string | stringA timestamp in RFC 3339 format
data[].session_thread_idnull | string | string | string | string | string | null | string | stringIf absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread. / Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread. / Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread. / When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it back. / When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` by `tool_use_id`, so clients do not send it back. / When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` or `user.tool_result` by `tool_use_id`, so clients do not send it back. / Public `sthr_` ID of the newly created thread. / Public sthr_ ID of the thread that started running. / Public sthr_ ID of the thread that went idle. / Public sthr_ ID of the thread that terminated. / Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread. / Public sthr_ ID of the thread that is retrying.
data[].resultstringUserToolConfirmationResult enum / Evaluation verdict. 'satisfied': criteria met, session goes idle. 'needs_revision': criteria not met, another revision cycle follows. 'max_iterations_reached': evaluation budget exhausted with criteria still unmet — one final acknowledgment turn follows before the session goes idle, but no further evaluation runs. 'failed': grader determined the rubric does not apply to the deliverables. 'interrupted': user sent an interrupt while evaluation was in progress.
data[].tool_use_idstringThe id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` event's `stop_reason.event_ids` field. / The id of the `agent.tool_use` event this result corresponds to. / The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` event's `stop_reason.event_ids` field.
data[].deny_messagenull | stringOptional message providing context for a 'deny' decision. Only allowed when result is 'deny'.
data[].custom_tool_use_idstringThe id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` event's `stop_reason.event_ids` field.
data[].is_errornull | booleanWhether the tool execution resulted in an error. / Whether the model request resulted in an error. / Whether the tool execution resulted in an error.
data[].inputobjectInput parameters for the tool call.
data[].namestringName of the custom tool being called. / Name of the MCP tool being used. / Name of the agent tool being used.
data[].mcp_server_namestringName of the MCP server providing the tool.
data[].evaluated_permissionstringAgentEvaluatedPermission enum
data[].evaluationobjectNames the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.
data[].mcp_tool_use_idstringThe id of the `agent.mcp_tool_use` event this result corresponds to.
data[].from_session_thread_idstringPublic `sthr_` ID of the thread that sent the message.
data[].from_agent_namenull | stringName of the callable agent this message came from. Absent when received from the primary agent.
data[].to_session_thread_idstringPublic `sthr_` ID of the thread the message was sent to.
data[].to_agent_namenull | stringName of the callable agent this message was sent to. Absent when sent to the primary agent.
data[].errorobject
data[].stop_reasonobject
data[].agent_namestringName of the callable agent the thread runs. / Name of the agent the thread runs. / Name of the agent the thread runs. / Name of the agent the thread runs. / Name of the agent the thread runs.
data[].iterationnumber0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation after the first revision; etc. / 0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`. / 0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.
data[].outcome_idstringThe `outc_` ID of the outcome being evaluated. / Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.
data[].explanationstringHuman-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why.
data[].outcome_evaluation_start_idstringThe id of the corresponding `span.outcome_evaluation_start` event.
data[].usageobjectToken usage for a single model request. / Point-in-time snapshot of a session's cumulative usage.
data[].model_request_start_idstringThe id of the corresponding `span.model_request_start` event.
data[].model_usageobjectToken usage for a single model request.
data[].descriptionstringWhat the agent should produce. Copied from the input event.
data[].max_iterationsnull | numberEvaluate-then-revise cycles before giving up. Default 3, max 20.
data[].rubricobjectRubric for grading the quality of an outcome.
data[].agentnull | objectResolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.
data[].budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
data[].metadataobjectThe session's full metadata bag after the update. Present when the update set non-empty metadata; absent when metadata was unchanged or cleared to empty.
data[].titlenull | stringThe session's new title. Present only when the update changed it.
next_pagestring | null

Call Create session first and replace the example session ID with its returned ID.

GET /anthropic/v1/sessions/{session_id}/events/stream◐ Partial

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • event_deltasarray可选

    query: When set, the connection also receives streaming delta events.

Returns

200

Keep the SSE connection open and send a message in another request after replacing sesn_123. Stopping the stream disconnects the subscription, not the agent. SDK 0.124.0 filters session.usage; read history for full usage. Pass event_deltas[]=agent.message to receive incremental text previews before the final event; as in the official API, agent.thinking previews are start-only.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Server-sent events

text/event-stream — chunk / event object

No field schema is declared.

GET /anthropic/v1/deployment_runs○ Unsupported

Request parameters

  • created_at[gt]string可选

    query: Return records created strictly after this time.

  • created_at[gte]string可选

    query: Return records created at or after this time.

  • created_at[lt]string可选

    query: Return records created strictly before this time.

  • created_at[lte]string可选

    query: Return records created at or before this time.

  • deployment_idstring可选

    query: Deployment ID (path or query parameter).

  • has_errorboolean可选

    query: Filter deployment runs by whether they errored.

  • trigger_typestring可选

    query: Filter deployment runs by trigger type.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot run agents automatically on a schedule or by trigger yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for this run (`drun_...`).
data[].agentobjectA resolved agent reference with a concrete version.
data[].created_atstringA timestamp in RFC 3339 format
data[].deployment_idstringID of the deployment that produced this run.
data[].errornull | objectWhy the run failed to create a session. The type identifies the failure; message is human-readable detail.
data[].session_idnull | stringPopulated on success. Null on creation failure. Exactly one of `session_id` or `error` is non-null.
data[].trigger_contextobjectDescribes what triggered a deployment run, with trigger-specific metadata.
data[].typestring
next_pagestring | null

GET /anthropic/v1/deployment_runs/{deployment_run_id}○ Unsupported

Request parameters

  • deployment_run_idstring必填

    path: Path parameter: the deployment run ID.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot run agents automatically on a schedule or by trigger yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this run (`drun_...`).
agentobjectA resolved agent reference with a concrete version.
agent.idstring
agent.typestring
agent.versionnumber
created_atstringA timestamp in RFC 3339 format
deployment_idstringID of the deployment that produced this run.
errornull | objectWhy the run failed to create a session. The type identifies the failure; message is human-readable detail.
error.messagestringHuman-readable error description.
error.typestring
session_idnull | stringPopulated on success. Null on creation failure. Exactly one of `session_id` or `error` is non-null.
trigger_contextobjectDescribes what triggered a deployment run, with trigger-specific metadata.
trigger_context.scheduled_atstringA timestamp in RFC 3339 format
trigger_context.typestring
typestring

GET /anthropic/v1/deployments○ Unsupported

Request parameters

  • agent_idstring可选

    query: Filter results by agent ID.

  • created_at[gte]string可选

    query: Return records created at or after this time.

  • created_at[lte]string可选

    query: Return records created at or before this time.

  • include_archivedboolean可选

    query: Whether to include archived records.

  • statusstring可选

    query: Filter by status: active or paused.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot run agents automatically on a schedule or by trigger yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for this deployment.
data[].agentobjectA resolved agent reference with a concrete version.
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].created_atstringA timestamp in RFC 3339 format
data[].descriptionnull | stringDescription of what the deployment does.
data[].environment_idstringID of the `environment` where sessions run.
data[].initial_eventsarray<object>Events sent to each session immediately after creation.
data[].metadataobjectArbitrary key-value metadata. Maximum 16 pairs.
data[].namestringHuman-readable name.
data[].paused_reasonnull | objectWhy a deployment is paused. Non-null exactly when `status` is `paused`.
data[].resourcesarray<object>Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
data[].schedulenull | object5-field POSIX cron schedule with computed runtime timestamps.
data[].statusstringLifecycle status of a deployment.
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
data[].vault_idsarray<string>Vault IDs supplying stored credentials for sessions created from this deployment.
data[].budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
next_pagestring | null

POST /anthropic/v1/deployments○ Unsupported

Request body

  • namestring必填

    Human-readable name for the deployment.

  • agentstring | object必填

    Agent to deploy. Accepts the `agent` ID string, which pins the latest version, or an `agent` object with both id and version specified. The agent must exist and not be archived.

    ▸ 展开子字段(3)
    • idstring必填

      The `agent` ID.

    • typestring必填
      取值 agent
    • versionnumber可选

      The specific `agent` version to use. Omit to use the latest version. Must be at least 1 if specified.

  • environment_idstring必填

    ID of the `environment` defining the container configuration for sessions created from this deployment.

  • initial_eventsarray必填

    Events to send to each session immediately after creation. At least 1, maximum 50.

  • budgetobject可选

    A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.

    ▸ 展开子字段(2)
    • max_list_costobject必填

      A monetary amount in a specific currency.

    • typestring必填
      取值 limit
  • descriptionstring可选

    Description of what the deployment does.

  • metadataobject可选

    Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

  • resourcesarray可选

    Resources (e.g. repositories, files) to mount into each session's container. Maximum 500.

  • scheduleobject可选

    5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.

    ▸ 展开子字段(3)
    • expressionstring必填

      5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 \* \* 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

    • timezonestring必填

      Required. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.

    • typestring必填
      取值 cron
  • vault_idsarray可选

    Vault IDs for stored credentials the agent can use during sessions created from this deployment. Maximum 50.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot run agents automatically on a schedule or by trigger yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this deployment.
agentobjectA resolved agent reference with a concrete version.
agent.idstring
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | stringDescription of what the deployment does.
environment_idstringID of the `environment` where sessions run.
initial_eventsarray<object>Events sent to each session immediately after creation.
initial_events[].contentarray<object>Array of content blocks for the user message. / System content blocks to append. Text-only.
initial_events[].typestring
initial_events[].descriptionstringWhat the agent should produce. This is the task specification.
initial_events[].rubricobjectRubric for grading the quality of an outcome.
initial_events[].max_iterationsnull | numberEval→revision cycles before giving up. Default 3, max 20.
metadataobjectArbitrary key-value metadata. Maximum 16 pairs.
namestringHuman-readable name.
paused_reasonnull | objectWhy a deployment is paused. Non-null exactly when `status` is `paused`.
paused_reason.typestring
paused_reason.errorobjectThe error that triggered an auto-pause. Matches the failed run's `error.type`.
resourcesarray<object>Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
resources[].typestring
resources[].urlstringGithub URL of the repository
resources[].checkoutnull | objectBranch or commit to check out. Defaults to the repository's default branch.
resources[].mount_pathnull | stringMount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
resources[].file_idstringID of a previously uploaded file.
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
schedulenull | object5-field POSIX cron schedule with computed runtime timestamps.
schedule.expressionstring5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
schedule.timezonestringIANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
schedule.typestring
schedule.last_run_atnull | stringA timestamp in RFC 3339 format
schedule.upcoming_runs_atarray<string>Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (`archived_at` set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.
statusstringLifecycle status of a deployment.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idsarray<string>Vault IDs supplying stored credentials for sessions created from this deployment.
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring

GET /anthropic/v1/deployments/{deployment_id}○ Unsupported

Request parameters

  • deployment_idstring必填

    path: Deployment ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot run agents automatically on a schedule or by trigger yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this deployment.
agentobjectA resolved agent reference with a concrete version.
agent.idstring
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | stringDescription of what the deployment does.
environment_idstringID of the `environment` where sessions run.
initial_eventsarray<object>Events sent to each session immediately after creation.
initial_events[].contentarray<object>Array of content blocks for the user message. / System content blocks to append. Text-only.
initial_events[].typestring
initial_events[].descriptionstringWhat the agent should produce. This is the task specification.
initial_events[].rubricobjectRubric for grading the quality of an outcome.
initial_events[].max_iterationsnull | numberEval→revision cycles before giving up. Default 3, max 20.
metadataobjectArbitrary key-value metadata. Maximum 16 pairs.
namestringHuman-readable name.
paused_reasonnull | objectWhy a deployment is paused. Non-null exactly when `status` is `paused`.
paused_reason.typestring
paused_reason.errorobjectThe error that triggered an auto-pause. Matches the failed run's `error.type`.
resourcesarray<object>Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
resources[].typestring
resources[].urlstringGithub URL of the repository
resources[].checkoutnull | objectBranch or commit to check out. Defaults to the repository's default branch.
resources[].mount_pathnull | stringMount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
resources[].file_idstringID of a previously uploaded file.
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
schedulenull | object5-field POSIX cron schedule with computed runtime timestamps.
schedule.expressionstring5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
schedule.timezonestringIANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
schedule.typestring
schedule.last_run_atnull | stringA timestamp in RFC 3339 format
schedule.upcoming_runs_atarray<string>Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (`archived_at` set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.
statusstringLifecycle status of a deployment.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idsarray<string>Vault IDs supplying stored credentials for sessions created from this deployment.
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring

POST /anthropic/v1/deployments/{deployment_id}○ Unsupported

Request parameters

  • deployment_idstring必填

    path: Deployment ID (path or query parameter).

  • namestring可选

    Human-readable name. Must be non-empty. Omit to preserve. Cannot be cleared.

  • agentstring | object可选

    Agent to deploy. Accepts the `agent` ID string, which re-pins to the latest version, or an `agent` object with both id and version specified. Omit to preserve. Cannot be cleared.

    ▸ 展开子字段(3)
    • idstring必填

      The `agent` ID.

    • typestring必填
      取值 agent
    • versionnumber可选

      The specific `agent` version to use. Omit to use the latest version. Must be at least 1 if specified.

  • environment_idstring可选

    ID of the `environment` where sessions run. Omit to preserve. Cannot be cleared.

  • budgetobject可选

    A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.

    ▸ 展开子字段(2)
    • max_list_costobject必填

      A monetary amount in a specific currency.

    • typestring必填
      取值 limit
  • descriptionstring可选

    Description. Omit to preserve; send empty string or null to clear.

  • initial_eventsarray可选

    Initial events. Full replacement. Omit to preserve. Cannot be cleared. At least 1, maximum 50.

  • metadataobject可选

    Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars.

  • resourcesarray可选

    Session resources. Full replacement. Omit to preserve; send empty array or null to clear. Maximum 500.

  • scheduleobject可选

    5-field POSIX cron schedule. Literal wall-clock matching in the configured timezone.

    ▸ 展开子字段(3)
    • expressionstring必填

      5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 \* \* 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).

    • timezonestring必填

      Required. IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Validated against the IANA timezone database.

    • typestring必填
      取值 cron
  • ▸ 更多参数(1)
    • vault_idsarray可选

      Vault IDs. Full replacement. Omit to preserve; send empty array or null to clear. Maximum 50.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot run agents automatically on a schedule or by trigger yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this deployment.
agentobjectA resolved agent reference with a concrete version.
agent.idstring
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | stringDescription of what the deployment does.
environment_idstringID of the `environment` where sessions run.
initial_eventsarray<object>Events sent to each session immediately after creation.
initial_events[].contentarray<object>Array of content blocks for the user message. / System content blocks to append. Text-only.
initial_events[].typestring
initial_events[].descriptionstringWhat the agent should produce. This is the task specification.
initial_events[].rubricobjectRubric for grading the quality of an outcome.
initial_events[].max_iterationsnull | numberEval→revision cycles before giving up. Default 3, max 20.
metadataobjectArbitrary key-value metadata. Maximum 16 pairs.
namestringHuman-readable name.
paused_reasonnull | objectWhy a deployment is paused. Non-null exactly when `status` is `paused`.
paused_reason.typestring
paused_reason.errorobjectThe error that triggered an auto-pause. Matches the failed run's `error.type`.
resourcesarray<object>Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
resources[].typestring
resources[].urlstringGithub URL of the repository
resources[].checkoutnull | objectBranch or commit to check out. Defaults to the repository's default branch.
resources[].mount_pathnull | stringMount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
resources[].file_idstringID of a previously uploaded file.
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
schedulenull | object5-field POSIX cron schedule with computed runtime timestamps.
schedule.expressionstring5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
schedule.timezonestringIANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
schedule.typestring
schedule.last_run_atnull | stringA timestamp in RFC 3339 format
schedule.upcoming_runs_atarray<string>Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (`archived_at` set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.
statusstringLifecycle status of a deployment.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idsarray<string>Vault IDs supplying stored credentials for sessions created from this deployment.
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring

POST /anthropic/v1/deployments/{deployment_id}/archive○ Unsupported

Request parameters

  • deployment_idstring必填

    path: Deployment ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot run agents automatically on a schedule or by trigger yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this deployment.
agentobjectA resolved agent reference with a concrete version.
agent.idstring
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | stringDescription of what the deployment does.
environment_idstringID of the `environment` where sessions run.
initial_eventsarray<object>Events sent to each session immediately after creation.
initial_events[].contentarray<object>Array of content blocks for the user message. / System content blocks to append. Text-only.
initial_events[].typestring
initial_events[].descriptionstringWhat the agent should produce. This is the task specification.
initial_events[].rubricobjectRubric for grading the quality of an outcome.
initial_events[].max_iterationsnull | numberEval→revision cycles before giving up. Default 3, max 20.
metadataobjectArbitrary key-value metadata. Maximum 16 pairs.
namestringHuman-readable name.
paused_reasonnull | objectWhy a deployment is paused. Non-null exactly when `status` is `paused`.
paused_reason.typestring
paused_reason.errorobjectThe error that triggered an auto-pause. Matches the failed run's `error.type`.
resourcesarray<object>Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
resources[].typestring
resources[].urlstringGithub URL of the repository
resources[].checkoutnull | objectBranch or commit to check out. Defaults to the repository's default branch.
resources[].mount_pathnull | stringMount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
resources[].file_idstringID of a previously uploaded file.
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
schedulenull | object5-field POSIX cron schedule with computed runtime timestamps.
schedule.expressionstring5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
schedule.timezonestringIANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
schedule.typestring
schedule.last_run_atnull | stringA timestamp in RFC 3339 format
schedule.upcoming_runs_atarray<string>Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (`archived_at` set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.
statusstringLifecycle status of a deployment.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idsarray<string>Vault IDs supplying stored credentials for sessions created from this deployment.
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring

POST /anthropic/v1/deployments/{deployment_id}/pause○ Unsupported

Request parameters

  • deployment_idstring必填

    path: Deployment ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot run agents automatically on a schedule or by trigger yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this deployment.
agentobjectA resolved agent reference with a concrete version.
agent.idstring
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | stringDescription of what the deployment does.
environment_idstringID of the `environment` where sessions run.
initial_eventsarray<object>Events sent to each session immediately after creation.
initial_events[].contentarray<object>Array of content blocks for the user message. / System content blocks to append. Text-only.
initial_events[].typestring
initial_events[].descriptionstringWhat the agent should produce. This is the task specification.
initial_events[].rubricobjectRubric for grading the quality of an outcome.
initial_events[].max_iterationsnull | numberEval→revision cycles before giving up. Default 3, max 20.
metadataobjectArbitrary key-value metadata. Maximum 16 pairs.
namestringHuman-readable name.
paused_reasonnull | objectWhy a deployment is paused. Non-null exactly when `status` is `paused`.
paused_reason.typestring
paused_reason.errorobjectThe error that triggered an auto-pause. Matches the failed run's `error.type`.
resourcesarray<object>Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
resources[].typestring
resources[].urlstringGithub URL of the repository
resources[].checkoutnull | objectBranch or commit to check out. Defaults to the repository's default branch.
resources[].mount_pathnull | stringMount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
resources[].file_idstringID of a previously uploaded file.
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
schedulenull | object5-field POSIX cron schedule with computed runtime timestamps.
schedule.expressionstring5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
schedule.timezonestringIANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
schedule.typestring
schedule.last_run_atnull | stringA timestamp in RFC 3339 format
schedule.upcoming_runs_atarray<string>Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (`archived_at` set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.
statusstringLifecycle status of a deployment.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idsarray<string>Vault IDs supplying stored credentials for sessions created from this deployment.
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring

POST /anthropic/v1/deployments/{deployment_id}/run○ Unsupported

Request parameters

  • deployment_idstring必填

    path: Deployment ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot run agents automatically on a schedule or by trigger yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this run (`drun_...`).
agentobjectA resolved agent reference with a concrete version.
agent.idstring
agent.typestring
agent.versionnumber
created_atstringA timestamp in RFC 3339 format
deployment_idstringID of the deployment that produced this run.
errornull | objectWhy the run failed to create a session. The type identifies the failure; message is human-readable detail.
error.messagestringHuman-readable error description.
error.typestring
session_idnull | stringPopulated on success. Null on creation failure. Exactly one of `session_id` or `error` is non-null.
trigger_contextobjectDescribes what triggered a deployment run, with trigger-specific metadata.
trigger_context.scheduled_atstringA timestamp in RFC 3339 format
trigger_context.typestring
typestring

POST /anthropic/v1/deployments/{deployment_id}/unpause○ Unsupported

Request parameters

  • deployment_idstring必填

    path: Deployment ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot run agents automatically on a schedule or by trigger yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this deployment.
agentobjectA resolved agent reference with a concrete version.
agent.idstring
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
descriptionnull | stringDescription of what the deployment does.
environment_idstringID of the `environment` where sessions run.
initial_eventsarray<object>Events sent to each session immediately after creation.
initial_events[].contentarray<object>Array of content blocks for the user message. / System content blocks to append. Text-only.
initial_events[].typestring
initial_events[].descriptionstringWhat the agent should produce. This is the task specification.
initial_events[].rubricobjectRubric for grading the quality of an outcome.
initial_events[].max_iterationsnull | numberEval→revision cycles before giving up. Default 3, max 20.
metadataobjectArbitrary key-value metadata. Maximum 16 pairs.
namestringHuman-readable name.
paused_reasonnull | objectWhy a deployment is paused. Non-null exactly when `status` is `paused`.
paused_reason.typestring
paused_reason.errorobjectThe error that triggered an auto-pause. Matches the failed run's `error.type`.
resourcesarray<object>Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.
resources[].typestring
resources[].urlstringGithub URL of the repository
resources[].checkoutnull | objectBranch or commit to check out. Defaults to the repository's default branch.
resources[].mount_pathnull | stringMount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
resources[].file_idstringID of a previously uploaded file.
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
schedulenull | object5-field POSIX cron schedule with computed runtime timestamps.
schedule.expressionstring5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., "0 9 * * 1-5" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).
schedule.timezonestringIANA timezone identifier (e.g., "America/Los_Angeles", "UTC").
schedule.typestring
schedule.last_run_atnull | stringA timestamp in RFC 3339 format
schedule.upcoming_runs_atarray<string>Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (`archived_at` set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.
statusstringLifecycle status of a deployment.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idsarray<string>Vault IDs supplying stored credentials for sessions created from this deployment.
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring

GET /anthropic/v1/environments◐ Partial

Official Claude documentation ↗

Request parameters

  • include_archivedboolean可选

    query: Whether to include archived records.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

200

Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringEnvironment identifier (e.g., 'env_...')
data[].archived_atnull | stringRFC 3339 timestamp when environment was archived, or null if not archived
data[].configobjectEnvironment configuration (either Anthropic Cloud or self-hosted)
data[].created_atstringRFC 3339 timestamp when environment was created
data[].descriptionnull | stringUser-provided description for the environment; null when unset
data[].metadataobjectUser-provided metadata key-value pairs
data[].namestringHuman-readable name for the environment
data[].typestringThe type of object (always 'environment')
data[].updated_atstringRFC 3339 timestamp when environment was last updated
data[].scopestringThe visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account.
next_pagestring | null

POST /anthropic/v1/environments◐ Partial

Request body

  • namestring必填

    Human-readable name for the environment

  • configobject可选

    Environment configuration

    ▸ 展开子字段(3)
    • typestring必填

      Environment type

      取值 self_hosted
    • networkingobject可选

      Network configuration policy. Omit on update to preserve the existing value.

    • packagesobject可选

      Specify packages (and optionally their versions) available in this environment. When versioning, use the version semantics relevant for the package manager, e.g. for `pip` use `package==1.0.0`. You are responsible for validating the package and version exist. Unversioned installs the latest. Under `limited` networking, requires `networking.allow_package_managers` to be `true`.

  • descriptionstring可选

    Optional description of the environment

  • metadataobject可选

    User-provided metadata key-value pairs

  • scopestring可选

    The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. API organizations support only 'organization'; 'account' is rejected. If not specified, defaults based on organization type.

Returns

501

Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringEnvironment identifier (e.g., 'env_...')
archived_atnull | stringRFC 3339 timestamp when environment was archived, or null if not archived
configobjectEnvironment configuration (either Anthropic Cloud or self-hosted)
config.networkingobjectNetwork configuration policy.
config.packagesobjectPackage manager configuration.
config.typestringEnvironment type
created_atstringRFC 3339 timestamp when environment was created
descriptionnull | stringUser-provided description for the environment; null when unset
metadataobjectUser-provided metadata key-value pairs
namestringHuman-readable name for the environment
typestringThe type of object (always 'environment')
updated_atstringRFC 3339 timestamp when environment was last updated
scopestringThe visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account.

DELETE /anthropic/v1/environments/{environment_id}○ Unsupported

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Sessions all use the platform's built-in environment for now; creating or managing custom environments is not available yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringEnvironment identifier
typestringThe type of response

GET /anthropic/v1/environments/{environment_id}◐ Partial

Official Claude documentation ↗

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

Returns

200

Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringEnvironment identifier (e.g., 'env_...')
archived_atnull | stringRFC 3339 timestamp when environment was archived, or null if not archived
configobjectEnvironment configuration (either Anthropic Cloud or self-hosted)
config.networkingobjectNetwork configuration policy.
config.packagesobjectPackage manager configuration.
config.typestringEnvironment type
created_atstringRFC 3339 timestamp when environment was created
descriptionnull | stringUser-provided description for the environment; null when unset
metadataobjectUser-provided metadata key-value pairs
namestringHuman-readable name for the environment
typestringThe type of object (always 'environment')
updated_atstringRFC 3339 timestamp when environment was last updated
scopestringThe visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account.

POST /anthropic/v1/environments/{environment_id}◐ Partial

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

  • namestring可选

    Updated name for the environment

  • configobject可选

    Updated environment configuration

    ▸ 展开子字段(3)
    • typestring必填

      Environment type

      取值 self_hosted
    • networkingobject可选

      Network configuration policy. Omit on update to preserve the existing value.

    • packagesobject可选

      Specify packages (and optionally their versions) available in this environment. When versioning, use the version semantics relevant for the package manager, e.g. for `pip` use `package==1.0.0`. You are responsible for validating the package and version exist. Unversioned installs the latest. Under `limited` networking, requires `networking.allow_package_managers` to be `true`.

  • descriptionstring可选

    Updated description of the environment. Omit to preserve; null clears to null; an empty string is stored as an empty string.

  • metadataobject可选

    User-provided metadata key-value pairs. Set a value to null or empty string to delete the key.

  • scopestring可选

    The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only.

Returns

501

Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringEnvironment identifier (e.g., 'env_...')
archived_atnull | stringRFC 3339 timestamp when environment was archived, or null if not archived
configobjectEnvironment configuration (either Anthropic Cloud or self-hosted)
config.networkingobjectNetwork configuration policy.
config.packagesobjectPackage manager configuration.
config.typestringEnvironment type
created_atstringRFC 3339 timestamp when environment was created
descriptionnull | stringUser-provided description for the environment; null when unset
metadataobjectUser-provided metadata key-value pairs
namestringHuman-readable name for the environment
typestringThe type of object (always 'environment')
updated_atstringRFC 3339 timestamp when environment was last updated
scopestringThe visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account.

POST /anthropic/v1/environments/{environment_id}/archive◐ Partial

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

Returns

501

Supports tenant-owned cloud environments, configuration updates and soft archival; built-ins are read-only. Lists accept limit, page and include_archived. Limited networking applies at sandbox creation; package installation failure terminates the session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. self_hosted, scope and cross-session package caching are not supported.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringEnvironment identifier (e.g., 'env_...')
archived_atnull | stringRFC 3339 timestamp when environment was archived, or null if not archived
configobjectEnvironment configuration (either Anthropic Cloud or self-hosted)
config.networkingobjectNetwork configuration policy.
config.packagesobjectPackage manager configuration.
config.typestringEnvironment type
created_atstringRFC 3339 timestamp when environment was created
descriptionnull | stringUser-provided description for the environment; null when unset
metadataobjectUser-provided metadata key-value pairs
namestringHuman-readable name for the environment
typestringThe type of object (always 'environment')
updated_atstringRFC 3339 timestamp when environment was last updated
scopestringThe visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account.

GET /anthropic/v1/environments/{environment_id}/work○ Unsupported

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

This is the task-claiming protocol for self-hosted executors; platform agents always execute on the platform, and self-hosted executors are not supported. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringWork identifier (e.g., 'work_...')
data[].acknowledged_atnull | stringRFC 3339 timestamp when work was acknowledged by Environment Manager
data[].created_atstringRFC 3339 timestamp when work was created
data[].dataobjectThe actual work to be performed (session or health check)
data[].environment_idstringEnvironment identifier this work belongs to (e.g., `env_...`)
data[].latest_heartbeat_atnull | stringRFC 3339 timestamp of the most recent heartbeat
data[].metadataobjectUser-provided metadata key-value pairs associated with this work item
data[].secretnull | stringCredential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths.
data[].started_atnull | stringRFC 3339 timestamp when work execution started
data[].statestringCurrent state of the work item
data[].stop_requested_atnull | stringRFC 3339 timestamp when stop was requested
data[].stopped_atnull | stringRFC 3339 timestamp when work execution stopped
data[].typestringThe type of object (always 'work')
next_pagestring | null

GET /anthropic/v1/environments/{environment_id}/work/{work_id}○ Unsupported

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

  • work_idstring必填

    path: Path parameter: the work item ID.

  • environment_idstring必填

    query: Environment ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

This is the task-claiming protocol for self-hosted executors; platform agents always execute on the platform, and self-hosted executors are not supported. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringWork identifier (e.g., 'work_...')
acknowledged_atnull | stringRFC 3339 timestamp when work was acknowledged by Environment Manager
created_atstringRFC 3339 timestamp when work was created
dataobjectThe actual work to be performed (session or health check)
data.idstringSession identifier (e.g., 'session_...') / Health check identifier
data.typestringType of work data
environment_idstringEnvironment identifier this work belongs to (e.g., `env_...`)
latest_heartbeat_atnull | stringRFC 3339 timestamp of the most recent heartbeat
metadataobjectUser-provided metadata key-value pairs associated with this work item
secretnull | stringCredential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths.
started_atnull | stringRFC 3339 timestamp when work execution started
statestringCurrent state of the work item
stop_requested_atnull | stringRFC 3339 timestamp when stop was requested
stopped_atnull | stringRFC 3339 timestamp when work execution stopped
typestringThe type of object (always 'work')

POST /anthropic/v1/environments/{environment_id}/work/{work_id}○ Unsupported

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

  • work_idstring必填

    path: Path parameter: the work item ID.

  • environment_idstring必填

    query: Environment ID (path or query parameter).

  • metadataobject必填

    Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve existing metadata.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

This is the task-claiming protocol for self-hosted executors; platform agents always execute on the platform, and self-hosted executors are not supported. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringWork identifier (e.g., 'work_...')
acknowledged_atnull | stringRFC 3339 timestamp when work was acknowledged by Environment Manager
created_atstringRFC 3339 timestamp when work was created
dataobjectThe actual work to be performed (session or health check)
data.idstringSession identifier (e.g., 'session_...') / Health check identifier
data.typestringType of work data
environment_idstringEnvironment identifier this work belongs to (e.g., `env_...`)
latest_heartbeat_atnull | stringRFC 3339 timestamp of the most recent heartbeat
metadataobjectUser-provided metadata key-value pairs associated with this work item
secretnull | stringCredential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths.
started_atnull | stringRFC 3339 timestamp when work execution started
statestringCurrent state of the work item
stop_requested_atnull | stringRFC 3339 timestamp when stop was requested
stopped_atnull | stringRFC 3339 timestamp when work execution stopped
typestringThe type of object (always 'work')

POST /anthropic/v1/environments/{environment_id}/work/{work_id}/ack○ Unsupported

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

  • work_idstring必填

    path: Path parameter: the work item ID.

  • environment_idstring必填

    query: Environment ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

This is the task-claiming protocol for self-hosted executors; platform agents always execute on the platform, and self-hosted executors are not supported. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringWork identifier (e.g., 'work_...')
acknowledged_atnull | stringRFC 3339 timestamp when work was acknowledged by Environment Manager
created_atstringRFC 3339 timestamp when work was created
dataobjectThe actual work to be performed (session or health check)
data.idstringSession identifier (e.g., 'session_...') / Health check identifier
data.typestringType of work data
environment_idstringEnvironment identifier this work belongs to (e.g., `env_...`)
latest_heartbeat_atnull | stringRFC 3339 timestamp of the most recent heartbeat
metadataobjectUser-provided metadata key-value pairs associated with this work item
secretnull | stringCredential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths.
started_atnull | stringRFC 3339 timestamp when work execution started
statestringCurrent state of the work item
stop_requested_atnull | stringRFC 3339 timestamp when stop was requested
stopped_atnull | stringRFC 3339 timestamp when work execution stopped
typestringThe type of object (always 'work')

POST /anthropic/v1/environments/{environment_id}/work/{work_id}/heartbeat○ Unsupported

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

  • work_idstring必填

    path: Path parameter: the work item ID.

  • environment_idstring必填

    query: Environment ID (path or query parameter).

  • desired_ttl_secondsnumber可选

    query: Desired lease lifetime in seconds.

  • expected_last_heartbeatstring可选

    query: Expected last heartbeat, guarding against concurrent updates.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

This is the task-claiming protocol for self-hosted executors; platform agents always execute on the platform, and self-hosted executors are not supported. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
last_heartbeatstringRFC 3339 timestamp of the actual heartbeat from DB
lease_extendedbooleanWhether the heartbeat succeeded in extending the lease
statestringCurrent state of the work item (active/stopping/stopped)
ttl_secondsnumberEffective TTL applied to the lease
typestringThe type of response

POST /anthropic/v1/environments/{environment_id}/work/{work_id}/stop○ Unsupported

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

  • work_idstring必填

    path: Path parameter: the work item ID.

  • environment_idstring必填

    query: Environment ID (path or query parameter).

  • forceboolean可选

    If true, immediately stop work without graceful shutdown

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

This is the task-claiming protocol for self-hosted executors; platform agents always execute on the platform, and self-hosted executors are not supported. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringWork identifier (e.g., 'work_...')
acknowledged_atnull | stringRFC 3339 timestamp when work was acknowledged by Environment Manager
created_atstringRFC 3339 timestamp when work was created
dataobjectThe actual work to be performed (session or health check)
data.idstringSession identifier (e.g., 'session_...') / Health check identifier
data.typestringType of work data
environment_idstringEnvironment identifier this work belongs to (e.g., `env_...`)
latest_heartbeat_atnull | stringRFC 3339 timestamp of the most recent heartbeat
metadataobjectUser-provided metadata key-value pairs associated with this work item
secretnull | stringCredential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths.
started_atnull | stringRFC 3339 timestamp when work execution started
statestringCurrent state of the work item
stop_requested_atnull | stringRFC 3339 timestamp when stop was requested
stopped_atnull | stringRFC 3339 timestamp when work execution stopped
typestringThe type of object (always 'work')

GET /anthropic/v1/environments/{environment_id}/work/poll○ Unsupported

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

  • block_msnumber可选

    query: How long to wait for work to arrive, in milliseconds (1–999).

  • reclaim_older_than_msnumber可选

    query: Reclaim work whose lease is older than this many milliseconds.

  • Anthropic-Worker-IDstring可选

    query: ID of the self-hosted worker instance polling, used to aggregate environment-level work metrics in Console.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

This is the task-claiming protocol for self-hosted executors; platform agents always execute on the platform, and self-hosted executors are not supported. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringWork identifier (e.g., 'work_...')
acknowledged_atnull | stringRFC 3339 timestamp when work was acknowledged by Environment Manager
created_atstringRFC 3339 timestamp when work was created
dataobjectThe actual work to be performed (session or health check)
data.idstringSession identifier (e.g., 'session_...') / Health check identifier
data.typestringType of work data
environment_idstringEnvironment identifier this work belongs to (e.g., `env_...`)
latest_heartbeat_atnull | stringRFC 3339 timestamp of the most recent heartbeat
metadataobjectUser-provided metadata key-value pairs associated with this work item
secretnull | stringCredential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths.
started_atnull | stringRFC 3339 timestamp when work execution started
statestringCurrent state of the work item
stop_requested_atnull | stringRFC 3339 timestamp when stop was requested
stopped_atnull | stringRFC 3339 timestamp when work execution stopped
typestringThe type of object (always 'work')

GET /anthropic/v1/environments/{environment_id}/work/stats○ Unsupported

Request parameters

  • environment_idstring必填

    path: Environment ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

This is the task-claiming protocol for self-hosted executors; platform agents always execute on the platform, and self-hosted executors are not supported. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
depthnumberNumber of work items waiting to be picked up (lag from consumer group)
oldest_queued_atnull | stringRFC 3339 timestamp of oldest item in the work stream (includes both queued and pending items), null if stream empty
pendingnumberNumber of work items being processed (polled but not acknowledged)
typestringThe type of object
workers_pollingnull | numberNumber of workers that have polled for work in the last 30 seconds. Requires worker_id to be sent with poll requests.

GET /anthropic/v1/memory_stores○ Unsupported

Request parameters

  • created_at[gte]string可选

    query: Return records created at or after this time.

  • created_at[lte]string可选

    query: Return records created at or before this time.

  • include_archivedboolean可选

    query: Whether to include archived records.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for the memory store (a `memstore_...` tagged ID). Use this when attaching the store to a session, or in the `{memory_store_id}` path parameter of subsequent calls.
data[].created_atstringA timestamp in RFC 3339 format
data[].namestringHuman-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name.
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].descriptionstringFree-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset.
data[].metadataobjectArbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable.
next_pagestring | null

POST /anthropic/v1/memory_stores○ Unsupported

Request body

  • namestring必填

    Human-readable name for the store. Required; 1–255 characters; no control characters. The mount-path slug under `/mnt/memory/` is derived from this name (lowercased, non-alphanumeric runs collapsed to a hyphen). Names need not be unique within a workspace.

  • descriptionstring可选

    Free-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent.

  • metadataobject可选

    Arbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Not visible to the agent.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the memory store (a `memstore_...` tagged ID). Use this when attaching the store to a session, or in the `{memory_store_id}` path parameter of subsequent calls.
created_atstringA timestamp in RFC 3339 format
namestringHuman-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name.
typestring
updated_atstringA timestamp in RFC 3339 format
archived_atnull | stringA timestamp in RFC 3339 format
descriptionstringFree-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset.
metadataobjectArbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable.

DELETE /anthropic/v1/memory_stores/{memory_store_id}○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringID of the deleted memory store (a `memstore_...` identifier). The store and all its memories and versions are no longer retrievable.
typestring

GET /anthropic/v1/memory_stores/{memory_store_id}○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the memory store (a `memstore_...` tagged ID). Use this when attaching the store to a session, or in the `{memory_store_id}` path parameter of subsequent calls.
created_atstringA timestamp in RFC 3339 format
namestringHuman-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name.
typestring
updated_atstringA timestamp in RFC 3339 format
archived_atnull | stringA timestamp in RFC 3339 format
descriptionstringFree-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset.
metadataobjectArbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable.

POST /anthropic/v1/memory_stores/{memory_store_id}○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

  • namestring可选

    New human-readable name for the store. 1–255 characters; no control characters. Renaming changes the slug used for the store's `mount_path` in sessions created after the update.

  • descriptionstring可选

    New description for the store, up to 1024 characters. Pass an empty string to clear it.

  • metadataobject可选

    Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the memory store (a `memstore_...` tagged ID). Use this when attaching the store to a session, or in the `{memory_store_id}` path parameter of subsequent calls.
created_atstringA timestamp in RFC 3339 format
namestringHuman-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name.
typestring
updated_atstringA timestamp in RFC 3339 format
archived_atnull | stringA timestamp in RFC 3339 format
descriptionstringFree-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset.
metadataobjectArbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable.

POST /anthropic/v1/memory_stores/{memory_store_id}/archive○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the memory store (a `memstore_...` tagged ID). Use this when attaching the store to a session, or in the `{memory_store_id}` path parameter of subsequent calls.
created_atstringA timestamp in RFC 3339 format
namestringHuman-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name.
typestring
updated_atstringA timestamp in RFC 3339 format
archived_atnull | stringA timestamp in RFC 3339 format
descriptionstringFree-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset.
metadataobjectArbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable.

GET /anthropic/v1/memory_stores/{memory_store_id}/memories○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

  • depthnumber可选

    query: How deep to descend: 0 (default) returns all descendants, 1 returns immediate children only.

  • path_prefixstring可选

    query: Filter by path prefix (must end with / and be segment-aligned).

  • viewstring可选

    query: Which projection to return: basic omits content, full includes it.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
data[].content_sha256stringLowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.
data[].content_size_bytesnumberSize of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
data[].created_atstringA timestamp in RFC 3339 format
data[].memory_store_idstringID of the memory store this memory belongs to (a `memstore_...` value).
data[].memory_version_idstringID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via List memory versions.
data[].pathstringHierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes. / The rolled-up path prefix, including a trailing `/` (e.g. `/projects/foo/`). Pass this value as `path_prefix` on a subsequent list call to drill into the directory.
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
data[].contentnull | stringThe memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
next_pagestring | null

POST /anthropic/v1/memory_stores/{memory_store_id}/memories○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

  • viewstring可选

    query: Which projection to return: basic omits content, full includes it.

  • contentstring必填

    UTF-8 text content for the new memory. Maximum 100 kB (102,400 bytes). Required; pass `""` explicitly to create an empty memory.

  • pathstring必填

    Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`. Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, or the Unicode line and paragraph separators (U+2028, U+2029), and must be NFC-normalized. Paths are case-sensitive.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
content_sha256stringLowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.
content_size_bytesnumberSize of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
created_atstringA timestamp in RFC 3339 format
memory_store_idstringID of the memory store this memory belongs to (a `memstore_...` value).
memory_version_idstringID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via List memory versions.
pathstringHierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.
typestring
updated_atstringA timestamp in RFC 3339 format
contentnull | stringThe memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).

DELETE /anthropic/v1/memory_stores/{memory_store_id}/memories/{memory_id}○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

  • memory_idstring必填

    path: Memory ID (path or query parameter).

  • memory_store_idstring必填

    query: Memory store ID (path or query parameter).

  • expected_content_sha256string可选

    query: Expected content SHA-256, guarding against concurrent modification.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringID of the deleted memory (a `mem_...` value).
typestring

GET /anthropic/v1/memory_stores/{memory_store_id}/memories/{memory_id}○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

  • memory_idstring必填

    path: Memory ID (path or query parameter).

  • memory_store_idstring必填

    query: Memory store ID (path or query parameter).

  • viewstring可选

    query: Which projection to return: basic omits content, full includes it.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
content_sha256stringLowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.
content_size_bytesnumberSize of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
created_atstringA timestamp in RFC 3339 format
memory_store_idstringID of the memory store this memory belongs to (a `memstore_...` value).
memory_version_idstringID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via List memory versions.
pathstringHierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.
typestring
updated_atstringA timestamp in RFC 3339 format
contentnull | stringThe memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).

POST /anthropic/v1/memory_stores/{memory_store_id}/memories/{memory_id}○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

  • memory_idstring必填

    path: Memory ID (path or query parameter).

  • memory_store_idstring必填

    query: Memory store ID (path or query parameter).

  • viewstring可选

    query: Which projection to return: basic omits content, full includes it.

  • contentstring可选

    New UTF-8 text content for the memory. Maximum 100 kB (102,400 bytes). Omit to leave the content unchanged (e.g., for a rename-only update).

  • pathstring可选

    New path for the memory (a rename). Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, or the Unicode line and paragraph separators (U+2028, U+2029), and must be NFC-normalized. Paths are case-sensitive. The memory's `id` is preserved across renames. Omit to leave the path unchanged.

  • preconditionobject可选

    Optimistic-concurrency precondition: the update applies only if the memory's stored `content_sha256` equals the supplied value. On mismatch, the request returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and retry against the fresh state. If the precondition fails but the stored state already exactly matches the requested `content` and `path`, the server returns 200 instead of 409.

    ▸ 展开子字段(2)
    • typestring必填
      取值 content_sha256
    • content_sha256string可选

      Expected `content_sha256` of the stored memory (64 lowercase hexadecimal characters). Typically the `content_sha256` returned by a prior read or list call. Because the server applies no content normalization, clients can also compute this locally as the SHA-256 of the UTF-8 content bytes.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
content_sha256stringLowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.
content_size_bytesnumberSize of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
created_atstringA timestamp in RFC 3339 format
memory_store_idstringID of the memory store this memory belongs to (a `memstore_...` value).
memory_version_idstringID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via List memory versions.
pathstringHierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.
typestring
updated_atstringA timestamp in RFC 3339 format
contentnull | stringThe memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).

GET /anthropic/v1/memory_stores/{memory_store_id}/memory_versions○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

  • api_key_idstring可选

    query: Return only versions written with this API key.

  • created_at[gte]string可选

    query: Return records created at or after this time.

  • created_at[lte]string可选

    query: Return records created at or before this time.

  • memory_idstring可选

    query: Memory ID (path or query parameter).

  • operationstring可选

    query: Return only versions that record this kind of change.

  • service_account_idstring可选

    query: Return only versions written by this service account.

  • session_idstring可选

    query: Session ID (path or query parameter).

  • viewstring可选

    query: Which projection to return: basic omits content, full includes it.

  • limitnumber可选

    query: Maximum number of items per page.

  • ▸ 更多参数(1)
    • pagestring可选

      query: Pagination cursor taken from the previous response's next_page.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for this version (a `memver_...` value).
data[].created_atstringA timestamp in RFC 3339 format
data[].memory_idstringID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to List memory versions to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
data[].memory_store_idstringID of the memory store this version belongs to (a `memstore_...` value).
data[].operationstringThe kind of mutation a `memory_version` records. Every non-no-op mutation to a memory appends exactly one version row with one of these values.
data[].typestring
data[].contentnull | stringThe memory's UTF-8 text content as of this version. `null` when `view=basic`, when `operation` is `deleted`, or when `redacted_at` is set.
data[].content_sha256null | stringLowercase hex SHA-256 digest of `content` as of this version (64 characters). `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.
data[].content_size_bytesnull | numberSize of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.
data[].created_byobjectIdentifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the Sessions API.
data[].pathnull | stringThe memory's path at the time of this write. `null` if and only if `redacted_at` is set.
data[].redacted_atnull | stringA timestamp in RFC 3339 format
data[].redacted_byobjectIdentifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the Sessions API.
next_pagestring | null

GET /anthropic/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

  • memory_version_idstring必填

    path: Path parameter: the memory version ID.

  • memory_store_idstring必填

    query: Memory store ID (path or query parameter).

  • viewstring可选

    query: Which projection to return: basic omits content, full includes it.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this version (a `memver_...` value).
created_atstringA timestamp in RFC 3339 format
memory_idstringID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to List memory versions to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
memory_store_idstringID of the memory store this version belongs to (a `memstore_...` value).
operationstringThe kind of mutation a `memory_version` records. Every non-no-op mutation to a memory appends exactly one version row with one of these values.
typestring
contentnull | stringThe memory's UTF-8 text content as of this version. `null` when `view=basic`, when `operation` is `deleted`, or when `redacted_at` is set.
content_sha256null | stringLowercase hex SHA-256 digest of `content` as of this version (64 characters). `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.
content_size_bytesnull | numberSize of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.
created_byobjectIdentifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the Sessions API.
created_by.session_idstringID of the session that performed the write (a `sesn_...` value). Look up the session via Retrieve a session for further provenance.
created_by.typestring
created_by.api_key_idstringID of the API key that performed the write. This identifies the key, not the secret.
created_by.user_idstringID of the user who performed the write (a `user_...` value).
created_by.service_account_idstringID of the service account that performed the write (a `svac_...` value).
pathnull | stringThe memory's path at the time of this write. `null` if and only if `redacted_at` is set.
redacted_atnull | stringA timestamp in RFC 3339 format
redacted_byobjectIdentifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the Sessions API.
redacted_by.session_idstringID of the session that performed the write (a `sesn_...` value). Look up the session via Retrieve a session for further provenance.
redacted_by.typestring
redacted_by.api_key_idstringID of the API key that performed the write. This identifies the key, not the secret.
redacted_by.user_idstringID of the user who performed the write (a `user_...` value).
redacted_by.service_account_idstringID of the service account that performed the write (a `svac_...` value).

POST /anthropic/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact○ Unsupported

Request parameters

  • memory_store_idstring必填

    path: Memory store ID (path or query parameter).

  • memory_version_idstring必填

    path: Path parameter: the memory version ID.

  • memory_store_idstring必填

    query: Memory store ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not provide a persistent memory store that agents can read and write yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this version (a `memver_...` value).
created_atstringA timestamp in RFC 3339 format
memory_idstringID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to List memory versions to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
memory_store_idstringID of the memory store this version belongs to (a `memstore_...` value).
operationstringThe kind of mutation a `memory_version` records. Every non-no-op mutation to a memory appends exactly one version row with one of these values.
typestring
contentnull | stringThe memory's UTF-8 text content as of this version. `null` when `view=basic`, when `operation` is `deleted`, or when `redacted_at` is set.
content_sha256null | stringLowercase hex SHA-256 digest of `content` as of this version (64 characters). `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.
content_size_bytesnull | numberSize of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise.
created_byobjectIdentifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the Sessions API.
created_by.session_idstringID of the session that performed the write (a `sesn_...` value). Look up the session via Retrieve a session for further provenance.
created_by.typestring
created_by.api_key_idstringID of the API key that performed the write. This identifies the key, not the secret.
created_by.user_idstringID of the user who performed the write (a `user_...` value).
created_by.service_account_idstringID of the service account that performed the write (a `svac_...` value).
pathnull | stringThe memory's path at the time of this write. `null` if and only if `redacted_at` is set.
redacted_atnull | stringA timestamp in RFC 3339 format
redacted_byobjectIdentifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the Sessions API.
redacted_by.session_idstringID of the session that performed the write (a `sesn_...` value). Look up the session via Retrieve a session for further provenance.
redacted_by.typestring
redacted_by.api_key_idstringID of the API key that performed the write. This identifies the key, not the secret.
redacted_by.user_idstringID of the user who performed the write (a `user_...` value).
redacted_by.service_account_idstringID of the service account that performed the write (a `svac_...` value).

DELETE /anthropic/v1/sessions/{session_id}○ Unsupported

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Sessions currently support create, read, list, update and archive; deleting is not implemented yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
typestring

Call Create session first and replace the example session ID with its returned ID.

POST /anthropic/v1/sessions/{session_id}◐ Partial

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • agentobject可选

    The agent the session runs: an agent ID string (pins the latest version) or an object with id and version (see subfields).

    ▸ 展开子字段(2)
    • mcp_serversarray可选

      Replacement MCP server list for this session: the provided array applies wholesale; an empty array clears, omitting keeps the agent's configuration.

    • toolsarray可选

      Replacement tool configuration for this session; an empty array clears, omitting keeps the agent's.

  • budgetobject可选

    A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.

    ▸ 展开子字段(2)
    • max_list_costobject必填

      Cap on list-call spending within the budget.

    • typestring必填

      Budget type; only max_list_cost today.

      取值 limit
  • metadataobject可选

    Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve.

  • titlestring可选

    Human-readable session title.

  • vault_idsarray可选

    Vault IDs (`vlt_*`) to attach to the session. Not yet supported; requests setting this field are rejected. Reserved for future use.

Returns

200

Supports title and metadata with the official patch semantics: a string value upserts the key, null deletes it, a whole-null object clears the bag, and untouched keys are preserved. The official agent override (tools/mcp_servers), budget and vault_ids are not supported and return 400 naming the field. Updating an archived session returns 409.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
agentobjectResolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.
agent.idstring
agent.descriptionnull | string
agent.mcp_serversarray<object>
agent.modelobjectModel identifier and configuration.
agent.multiagentnull | objectResolved coordinator topology with full agent definitions for each roster member.
agent.namestring
agent.skillsarray<object>
agent.systemnull | string
agent.toolsarray<object>
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring
created_atstringA timestamp in RFC 3339 format
environment_idstring
metadataobject
outcome_evaluationsarray<object>Per-outcome evaluation state. One entry per `define_outcome` event sent to the session.
outcome_evaluations[].completed_atnull | stringA timestamp in RFC 3339 format
outcome_evaluations[].descriptionstringWhat the agent should produce.
outcome_evaluations[].explanationnull | stringGrader's verdict text from the most recent evaluation. For `satisfied`, explains why criteria are met; for `needs_revision` (intermediate), what's missing; for `failed`, why unrecoverable.
outcome_evaluations[].iterationnumber0-indexed revision cycle the outcome is currently on.
outcome_evaluations[].outcome_idstringServer-generated outc_ ID for this outcome.
outcome_evaluations[].resultstringCurrent evaluation state. `pending` before the agent begins work; `running` while producing or revising; `evaluating` while the grader scores; `satisfied`/`max_iterations_reached`/`failed`/`interrupted` are terminal.
outcome_evaluations[].typestring
resourcesarray<object>
resources[].idstring
resources[].created_atstringA timestamp in RFC 3339 format
resources[].mount_pathstring | null | stringFilesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
resources[].typestring
resources[].updated_atstringA timestamp in RFC 3339 format
resources[].urlstring
resources[].checkoutnull | object
resources[].file_idstring
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].descriptionstringDescription of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
resources[].namenull | stringDisplay name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.
statsobjectTiming statistics for a session.
stats.active_secondsnumberCumulative time in seconds the session spent in `running` status. Excludes idle time.
stats.duration_secondsnumberElapsed time since session creation in seconds. For terminated sessions, frozen at the final update.
statusstringSessionStatus enum - `rescheduling` - Transient error occurred, retrying automatically. - `running` - Agent is actively executing. - `idle` - Agent is waiting for input, including user messages or tool confirmations. Sessions start in idle. - `terminated` - Session has ended, either due to an error or completion.
titlenull | string
typestring
updated_atstringA timestamp in RFC 3339 format
usageobjectCumulative token usage for a session across all turns.
usage.active_secondsnumberCumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once, unlike `stats.active_seconds`, which sums each thread's own active time. This is the duration the session's runtime cost is priced on.
usage.cache_creationobjectPrompt-cache creation token usage broken down by cache lifetime.
usage.cache_read_input_tokensnumberTotal tokens read from prompt cache.
usage.input_tokensnumberTotal input tokens consumed across all turns.
usage.list_costnull | objectA monetary amount in a specific currency.
usage.output_tokensnumberTotal output tokens generated across all turns.
usage.server_tool_usenull | objectCumulative count of server-executed tool invocations, broken down by tool.
vault_idsarray<string>Vault IDs attached to the session at creation. Empty when no vaults were supplied.
deployment_idnull | stringDeployment ID when the session was created from a deployment reference. Null otherwise.

Archive Session

Call Create session first and replace the example session ID with its returned ID.

POST /anthropic/v1/sessions/{session_id}/archive● Supported

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

Returns

200

Archived sessions refuse new messages with 400 invalid_request_error naming the archived session; retrieval and event history stay readable. Re-archiving is idempotent and archived_at keeps the first archive time.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
agentobjectResolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.
agent.idstring
agent.descriptionnull | string
agent.mcp_serversarray<object>
agent.modelobjectModel identifier and configuration.
agent.multiagentnull | objectResolved coordinator topology with full agent definitions for each roster member.
agent.namestring
agent.skillsarray<object>
agent.systemnull | string
agent.toolsarray<object>
agent.typestring
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
budget.max_list_costobjectA monetary amount in a specific currency.
budget.typestring
created_atstringA timestamp in RFC 3339 format
environment_idstring
metadataobject
outcome_evaluationsarray<object>Per-outcome evaluation state. One entry per `define_outcome` event sent to the session.
outcome_evaluations[].completed_atnull | stringA timestamp in RFC 3339 format
outcome_evaluations[].descriptionstringWhat the agent should produce.
outcome_evaluations[].explanationnull | stringGrader's verdict text from the most recent evaluation. For `satisfied`, explains why criteria are met; for `needs_revision` (intermediate), what's missing; for `failed`, why unrecoverable.
outcome_evaluations[].iterationnumber0-indexed revision cycle the outcome is currently on.
outcome_evaluations[].outcome_idstringServer-generated outc_ ID for this outcome.
outcome_evaluations[].resultstringCurrent evaluation state. `pending` before the agent begins work; `running` while producing or revising; `evaluating` while the grader scores; `satisfied`/`max_iterations_reached`/`failed`/`interrupted` are terminal.
outcome_evaluations[].typestring
resourcesarray<object>
resources[].idstring
resources[].created_atstringA timestamp in RFC 3339 format
resources[].mount_pathstring | null | stringFilesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
resources[].typestring
resources[].updated_atstringA timestamp in RFC 3339 format
resources[].urlstring
resources[].checkoutnull | object
resources[].file_idstring
resources[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
resources[].accessnull | stringAccess mode for an attached memory store.
resources[].descriptionstringDescription of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.
resources[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
resources[].namenull | stringDisplay name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.
statsobjectTiming statistics for a session.
stats.active_secondsnumberCumulative time in seconds the session spent in `running` status. Excludes idle time.
stats.duration_secondsnumberElapsed time since session creation in seconds. For terminated sessions, frozen at the final update.
statusstringSessionStatus enum - `rescheduling` - Transient error occurred, retrying automatically. - `running` - Agent is actively executing. - `idle` - Agent is waiting for input, including user messages or tool confirmations. Sessions start in idle. - `terminated` - Session has ended, either due to an error or completion.
titlenull | string
typestring
updated_atstringA timestamp in RFC 3339 format
usageobjectCumulative token usage for a session across all turns.
usage.active_secondsnumberCumulative time in seconds during which the session had at least one thread in running status. Overlapping activity from concurrent threads is counted once, unlike `stats.active_seconds`, which sums each thread's own active time. This is the duration the session's runtime cost is priced on.
usage.cache_creationobjectPrompt-cache creation token usage broken down by cache lifetime.
usage.cache_read_input_tokensnumberTotal tokens read from prompt cache.
usage.input_tokensnumberTotal input tokens consumed across all turns.
usage.list_costnull | objectA monetary amount in a specific currency.
usage.output_tokensnumberTotal output tokens generated across all turns.
usage.server_tool_usenull | objectCumulative count of server-executed tool invocations, broken down by tool.
vault_idsarray<string>Vault IDs attached to the session at creation. Empty when no vaults were supplied.
deployment_idnull | stringDeployment ID when the session was created from a deployment reference. Null otherwise.

GET /anthropic/v1/sessions/{session_id}/resources◐ Partial

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

501

Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstring
data[].created_atstringA timestamp in RFC 3339 format
data[].mount_pathstring | null | stringFilesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
data[].urlstring
data[].checkoutnull | object
data[].file_idstring
data[].memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
data[].accessnull | stringAccess mode for an attached memory store.
data[].descriptionstringDescription of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.
data[].instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
data[].namenull | stringDisplay name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.
next_pagestring | null

POST /anthropic/v1/sessions/{session_id}/resources◐ Partial

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • typestring必填

    query: The request-body field this session resource is added from.

    取值 file
  • file_idstring必填

    ID of a previously uploaded file.

  • mount_pathstring可选

    Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.

Returns

501

Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
created_atstringA timestamp in RFC 3339 format
file_idstring
mount_pathstring
typestring
updated_atstringA timestamp in RFC 3339 format

DELETE /anthropic/v1/sessions/{session_id}/resources/{resource_id}◐ Partial

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • resource_idstring必填

    path: Path parameter: the session resource ID.

  • session_idstring必填

    query: Session ID (path or query parameter).

Returns

501

Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
typestring

GET /anthropic/v1/sessions/{session_id}/resources/{resource_id}◐ Partial

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • resource_idstring必填

    path: Path parameter: the session resource ID.

  • session_idstring必填

    query: Session ID (path or query parameter).

Returns

501

Supports persistence, retrieval and removal of file resource references, up to 500 per session. Files must be live and owned by the current tenant. Paths default to /mnt/session/uploads/<file_id>; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API. Sandbox synchronization is not implemented in this batch.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
created_atstringA timestamp in RFC 3339 format
mount_pathstring | null | stringFilesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
typestring
updated_atstringA timestamp in RFC 3339 format
urlstring
checkoutnull | object
checkout.namestringBranch name to check out.
checkout.typestring
checkout.shastringFull commit SHA to check out.
file_idstring
memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
accessnull | stringAccess mode for an attached memory store.
descriptionstringDescription of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.
instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
namenull | stringDisplay name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.

POST /anthropic/v1/sessions/{session_id}/resources/{resource_id}○ Unsupported

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • resource_idstring必填

    path: Path parameter: the session resource ID.

  • session_idstring必填

    query: Session ID (path or query parameter).

  • authorization_tokenstring必填

    New authorization token for the resource. Currently only `github_repository` resources support token rotation.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform cannot attach extra resources (files, repositories, etc.) to a session yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstring
created_atstringA timestamp in RFC 3339 format
mount_pathstring | null | stringFilesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only.
typestring
updated_atstringA timestamp in RFC 3339 format
urlstring
checkoutnull | object
checkout.namestringBranch name to check out.
checkout.typestring
checkout.shastringFull commit SHA to check out.
file_idstring
memory_store_idstringThe memory store ID (memstore_...). Must belong to the caller's organization and workspace.
accessnull | stringAccess mode for an attached memory store.
descriptionstringDescription of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description.
instructionsnull | stringPer-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars.
namenull | stringDisplay name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource.

Call Create session first and replace the example session ID with its returned ID.

GET /anthropic/v1/sessions/{session_id}/threads◐ Partial

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

200

Returns the primary thread and every child thread in created_at order. Thread ids use sthr_ plus the owning session suffix; children reference the primary parent_thread_id and retain the parent session_id. agent describes the actual running definition; built-in types use their type name and null for unregistered id/version. Archived children have status terminated and archived_at. stats/usage remain null without thread-level tracking.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for this thread.
data[].agentobjectThe resolved agent a `session_thread` runs.
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].created_atstringA timestamp in RFC 3339 format
data[].parent_thread_idnull | stringParent thread that spawned this thread. Null for the primary thread.
data[].session_idstringThe session this thread belongs to.
data[].statsnull | objectTiming statistics for a session thread.
data[].statusstringSessionThreadStatus enum
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
data[].usagenull | objectCumulative token usage for a session thread across all turns.
next_pagestring | null

Call Create session first and replace the example session ID with its returned ID.

GET /anthropic/v1/sessions/{session_id}/threads/{thread_id}◐ Partial

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • thread_idstring必填

    path: Path parameter: the thread ID.

  • session_idstring必填

    query: Session ID (path or query parameter).

Returns

200

Returns a primary or child thread belonging to this session, field-for-field identical to its list item. Foreign, unknown and malformed thread ids uniformly return 404 without revealing existence.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this thread.
agentobjectThe resolved agent a `session_thread` runs.
agent.modelstring | objectThe advisor model id. / Model identifier and configuration.
agent.typestring
agent.idstring
agent.descriptionnull | string
agent.mcp_serversarray<object>
agent.namestring
agent.skillsarray<object>
agent.systemnull | string
agent.toolsarray<object>
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
parent_thread_idnull | stringParent thread that spawned this thread. Null for the primary thread.
session_idstringThe session this thread belongs to.
statsnull | objectTiming statistics for a session thread.
stats.active_secondsnumberCumulative time in seconds the thread spent actively running. Excludes idle time.
stats.duration_secondsnumberElapsed time since thread creation in seconds. For archived threads, frozen at the final update.
stats.startup_secondsnumberTime in seconds for the thread to begin running. Zero for child threads, which start immediately.
statusstringSessionThreadStatus enum
typestring
updated_atstringA timestamp in RFC 3339 format
usagenull | objectCumulative token usage for a session thread across all turns.
usage.active_secondsnumberCumulative 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.
usage.cache_creationobjectPrompt-cache creation token usage broken down by cache lifetime.
usage.cache_read_input_tokensnumberTotal tokens read from prompt cache.
usage.input_tokensnumberTotal input tokens consumed across all turns.
usage.list_costnull | objectA monetary amount in a specific currency.
usage.output_tokensnumberTotal output tokens generated across all turns.
usage.server_tool_usenull | objectCumulative count of server-executed tool invocations, broken down by tool.

Call Create session first and replace the example session ID with its returned ID.

POST /anthropic/v1/sessions/{session_id}/threads/{thread_id}/archive◐ Partial

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • thread_idstring必填

    path: Path parameter: the thread ID.

  • session_idstring必填

    query: Session ID (path or query parameter).

Returns

200

Archiving the primary thread uses session archival. Archiving a child archives only that child session, leaving the parent and siblings intact. Archived children have status terminated and archived_at; their history remains readable.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this thread.
agentobjectThe resolved agent a `session_thread` runs.
agent.modelstring | objectThe advisor model id. / Model identifier and configuration.
agent.typestring
agent.idstring
agent.descriptionnull | string
agent.mcp_serversarray<object>
agent.namestring
agent.skillsarray<object>
agent.systemnull | string
agent.toolsarray<object>
agent.versionnumber
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
parent_thread_idnull | stringParent thread that spawned this thread. Null for the primary thread.
session_idstringThe session this thread belongs to.
statsnull | objectTiming statistics for a session thread.
stats.active_secondsnumberCumulative time in seconds the thread spent actively running. Excludes idle time.
stats.duration_secondsnumberElapsed time since thread creation in seconds. For archived threads, frozen at the final update.
stats.startup_secondsnumberTime in seconds for the thread to begin running. Zero for child threads, which start immediately.
statusstringSessionThreadStatus enum
typestring
updated_atstringA timestamp in RFC 3339 format
usagenull | objectCumulative token usage for a session thread across all turns.
usage.active_secondsnumberCumulative 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.
usage.cache_creationobjectPrompt-cache creation token usage broken down by cache lifetime.
usage.cache_read_input_tokensnumberTotal tokens read from prompt cache.
usage.input_tokensnumberTotal input tokens consumed across all turns.
usage.list_costnull | objectA monetary amount in a specific currency.
usage.output_tokensnumberTotal output tokens generated across all turns.
usage.server_tool_usenull | objectCumulative count of server-executed tool invocations, broken down by tool.

Call Create session first and replace the example session ID with its returned ID.

GET /anthropic/v1/sessions/{session_id}/threads/{thread_id}/events◐ Partial

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • thread_idstring必填

    path: Path parameter: the thread ID.

  • session_idstring必填

    query: Session ID (path or query parameter).

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

200

Reads the selected thread ledger: the primary session for the primary thread, or the child session for a child thread. Uses the session event query parameters, public event types and data + next_page envelope. Web tools return search_result blocks on both APIs; answer citations are an /agent/v1 extension, rendered as [n] on /anthropic.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for this event.
data[].contentarray<object>Array of content blocks comprising the user message. / The result content returned by the tool. / Array of text blocks comprising the agent response. / The result content returned by the tool. / The result content returned by the tool. / Message content blocks. / Message content blocks. / The result content returned by the tool. / System content blocks. Text-only.
data[].typestring
data[].processed_atnull | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | string | null | string | string | string | null | string | stringA timestamp in RFC 3339 format
data[].session_thread_idnull | string | string | string | string | string | null | string | stringIf absent, interrupts every non-archived thread in a multiagent session (or the primary alone in a single-agent session). If present, interrupts only the named thread. / Set by the server to the subagent thread this confirmation was routed to. Omitted when it was routed to the primary thread. / Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread. / When set, this event was cross-posted from a subagent's thread to surface its custom tool use on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it back. / When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` by `tool_use_id`, so clients do not send it back. / When set, this event was cross-posted from a subagent's thread to surface its permission request on the primary thread's stream. Empty on the thread's own events. Informational only: the server routes the matching `user.tool_confirmation` or `user.tool_result` by `tool_use_id`, so clients do not send it back. / Public `sthr_` ID of the newly created thread. / Public sthr_ ID of the thread that started running. / Public sthr_ ID of the thread that went idle. / Public sthr_ ID of the thread that terminated. / Set by the server to the subagent thread this result was routed to. Omitted when it was routed to the primary thread. / Public sthr_ ID of the thread that is retrying.
data[].resultstringUserToolConfirmationResult enum / Evaluation verdict. 'satisfied': criteria met, session goes idle. 'needs_revision': criteria not met, another revision cycle follows. 'max_iterations_reached': evaluation budget exhausted with criteria still unmet — one final acknowledgment turn follows before the session goes idle, but no further evaluation runs. 'failed': grader determined the rubric does not apply to the deliverables. 'interrupted': user sent an interrupt while evaluation was in progress.
data[].tool_use_idstringThe id of the `agent.tool_use` or `agent.mcp_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` event's `stop_reason.event_ids` field. / The id of the `agent.tool_use` event this result corresponds to. / The id of the `agent.tool_use` event this result corresponds to, which can be found in the last `session.status_idle` event's `stop_reason.event_ids` field.
data[].deny_messagenull | stringOptional message providing context for a 'deny' decision. Only allowed when result is 'deny'.
data[].custom_tool_use_idstringThe id of the `agent.custom_tool_use` event this result corresponds to, which can be found in the last `session.status_idle` event's `stop_reason.event_ids` field.
data[].is_errornull | booleanWhether the tool execution resulted in an error. / Whether the model request resulted in an error. / Whether the tool execution resulted in an error.
data[].inputobjectInput parameters for the tool call.
data[].namestringName of the custom tool being called. / Name of the MCP tool being used. / Name of the agent tool being used.
data[].mcp_server_namestringName of the MCP server providing the tool.
data[].evaluated_permissionstringAgentEvaluatedPermission enum
data[].evaluationobjectNames the resolved permission_policy that produced evaluated_permission, and under auto carries the judgement. Open union: clients must tolerate unknown variants.
data[].mcp_tool_use_idstringThe id of the `agent.mcp_tool_use` event this result corresponds to.
data[].from_session_thread_idstringPublic `sthr_` ID of the thread that sent the message.
data[].from_agent_namenull | stringName of the callable agent this message came from. Absent when received from the primary agent.
data[].to_session_thread_idstringPublic `sthr_` ID of the thread the message was sent to.
data[].to_agent_namenull | stringName of the callable agent this message was sent to. Absent when sent to the primary agent.
data[].errorobject
data[].stop_reasonobject
data[].agent_namestringName of the callable agent the thread runs. / Name of the agent the thread runs. / Name of the agent the thread runs. / Name of the agent the thread runs. / Name of the agent the thread runs.
data[].iterationnumber0-indexed revision cycle. 0 is the first evaluation; 1 is the re-evaluation after the first revision; etc. / 0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`. / 0-indexed revision cycle, matching the corresponding `span.outcome_evaluation_start`.
data[].outcome_idstringThe `outc_` ID of the outcome being evaluated. / Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list.
data[].explanationstringHuman-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why.
data[].outcome_evaluation_start_idstringThe id of the corresponding `span.outcome_evaluation_start` event.
data[].usageobjectToken usage for a single model request. / Point-in-time snapshot of a session's cumulative usage.
data[].model_request_start_idstringThe id of the corresponding `span.model_request_start` event.
data[].model_usageobjectToken usage for a single model request.
data[].descriptionstringWhat the agent should produce. Copied from the input event.
data[].max_iterationsnull | numberEvaluate-then-revise cycles before giving up. Default 3, max 20.
data[].rubricobjectRubric for grading the quality of an outcome.
data[].agentnull | objectResolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time.
data[].budgetnull | objectA hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`.
data[].metadataobjectThe session's full metadata bag after the update. Present when the update set non-empty metadata; absent when metadata was unchanged or cleared to empty.
data[].titlenull | stringThe session's new title. Present only when the update changed it.
next_pagestring | null

Call Create session first and replace the example session ID with its returned ID.

GET /anthropic/v1/sessions/{session_id}/threads/{thread_id}/stream◐ Partial

Official Claude documentation ↗

Request parameters

  • session_idstring必填

    path: Session ID (path or query parameter).

  • thread_idstring必填

    path: Path parameter: the thread ID.

  • session_idstring必填

    query: Session ID (path or query parameter).

  • event_deltasarray可选

    query: When set, the connection also receives streaming delta events.

Returns

200

Subscribes to the selected thread live ledger using the session SSE implementation; the /agent API also supports a read-only WebSocket. The parent stream includes child creation, status and message events. Child approvals carry session_thread_id; confirmations and interrupts targeting that id are routed to the owned child.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Server-sent events

text/event-stream — chunk / event object

No field schema is declared.

GET /anthropic/v1/skills○ Unsupported

Request parameters

  • sourcestring可选

    query: Filter skills by source: custom or official.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Uploading and managing Skills is not supported yet; passing skills when creating an agent returns 400. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for the skill. The format and length of IDs may change over time.
data[].created_atstringISO 8601 timestamp of when the skill was created.
data[].display_namestringHuman-readable, single-line label for the Skill. Maximum 255 characters. Always set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not unique.
data[].latest_version_idstringID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version.
data[].sourceobjectWhere the Skill comes from. Possible values: - `"custom"`: authored by the platform user; private to their workspace - `"anthropic"`: published by Anthropic; shared and read-only - `"anthropic_example"`: Anthropic-published sample Skill - `"plugin"`: resolved from an installed plugin
data[].typestringObject type. For Skills, this is always `"skill"`.
data[].updated_atstringISO 8601 timestamp of when the skill was last updated.
next_pagestring | null

POST /anthropic/v1/skills○ Unsupported

Request body

  • filesarray必填

    Files to upload for the skill. All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory.

  • display_namestring可选

    Human-readable, single-line label for the Skill. Maximum 255 characters. Always set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not unique.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Uploading and managing Skills is not supported yet; passing skills when creating an agent returns 400. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

multipart/form-data

NameTypeDescription
idstringUnique identifier for the skill. The format and length of IDs may change over time.
created_atstringISO 8601 timestamp of when the skill was created.
display_namestringHuman-readable, single-line label for the Skill. Maximum 255 characters. Always set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not unique.
latest_version_idstringID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version.
sourceobjectWhere the Skill comes from. Possible values: - `"custom"`: authored by the platform user; private to their workspace - `"anthropic"`: published by Anthropic; shared and read-only - `"anthropic_example"`: Anthropic-published sample Skill - `"plugin"`: resolved from an installed plugin
source.typestringWhere the Skill comes from. Possible values: - `"custom"`: authored by the platform user; private to their workspace - `"anthropic"`: published by Anthropic; shared and read-only - `"anthropic_example"`: Anthropic-published sample Skill - `"plugin"`: resolved from an installed plugin
typestringObject type. For Skills, this is always `"skill"`.
updated_atstringISO 8601 timestamp of when the skill was last updated.

DELETE /anthropic/v1/skills/{skill_id}○ Unsupported

Request parameters

  • skill_idstring必填

    path: Skill ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Uploading and managing Skills is not supported yet; passing skills when creating an agent returns 400. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the skill. The format and length of IDs may change over time.
typestringDeleted object type. For Skills, this is always `"skill_deleted"`.

GET /anthropic/v1/skills/{skill_id}○ Unsupported

Request parameters

  • skill_idstring必填

    path: Skill ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Uploading and managing Skills is not supported yet; passing skills when creating an agent returns 400. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the skill. The format and length of IDs may change over time.
created_atstringISO 8601 timestamp of when the skill was created.
display_namestringHuman-readable, single-line label for the Skill. Maximum 255 characters. Always set: derived from the SKILL.md frontmatter `name` when omitted at creation. Not unique.
latest_version_idstringID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version.
sourceobjectWhere the Skill comes from. Possible values: - `"custom"`: authored by the platform user; private to their workspace - `"anthropic"`: published by Anthropic; shared and read-only - `"anthropic_example"`: Anthropic-published sample Skill - `"plugin"`: resolved from an installed plugin
source.typestringWhere the Skill comes from. Possible values: - `"custom"`: authored by the platform user; private to their workspace - `"anthropic"`: published by Anthropic; shared and read-only - `"anthropic_example"`: Anthropic-published sample Skill - `"plugin"`: resolved from an installed plugin
typestringObject type. For Skills, this is always `"skill"`.
updated_atstringISO 8601 timestamp of when the skill was last updated.

GET /anthropic/v1/skills/{skill_id}/versions○ Unsupported

Request parameters

  • skill_idstring必填

    path: Skill ID (path or query parameter).

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Uploading and managing Skills is not supported yet; passing skills when creating an agent returns 400. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for this Skill Version. The id addresses the version in paths and pins it in references.
data[].created_atstringISO 8601 timestamp of when the skill was created.
data[].descriptionstringDescription of the skill version. This is extracted from the SKILL.md file in the skill upload.
data[].namestringThe Skill's immutable kebab-case slug, set at creation from the first upload's SKILL.md frontmatter `name` (or its enclosing directory). Every later upload must resolve to the same value. Also the top-level directory of the Skill's mounted files and the base name of a downloaded archive.
data[].skill_idstringUnique identifier for the skill. The format and length of IDs may change over time.
data[].typestringObject type. For Skill Versions, this is always `"skill_version"`.
next_pagestring | null

POST /anthropic/v1/skills/{skill_id}/versions○ Unsupported

Request parameters

  • skill_idstring必填

    path: Skill ID (path or query parameter).

  • filesarray必填

    Files to upload for the skill. All files must be in the same top-level directory and must include a SKILL.md file at the root of that directory.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Uploading and managing Skills is not supported yet; passing skills when creating an agent returns 400. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

multipart/form-data

NameTypeDescription
idstringUnique identifier for this Skill Version. The id addresses the version in paths and pins it in references.
created_atstringISO 8601 timestamp of when the skill was created.
descriptionstringDescription of the skill version. This is extracted from the SKILL.md file in the skill upload.
namestringThe Skill's immutable kebab-case slug, set at creation from the first upload's SKILL.md frontmatter `name` (or its enclosing directory). Every later upload must resolve to the same value. Also the top-level directory of the Skill's mounted files and the base name of a downloaded archive.
skill_idstringUnique identifier for the skill. The format and length of IDs may change over time.
typestringObject type. For Skill Versions, this is always `"skill_version"`.

DELETE /anthropic/v1/skills/{skill_id}/versions/{version}○ Unsupported

Request parameters

  • skill_idstring必填

    path: Skill ID (path or query parameter).

  • versionstring必填

    path: Path parameter: the version.

  • skill_idstring必填

    query: Skill ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Uploading and managing Skills is not supported yet; passing skills when creating an agent returns 400. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this Skill Version. The id addresses the version in paths and pins it in references.
typestringDeleted object type. For Skill Versions, this is always `"skill_version_deleted"`.

GET /anthropic/v1/skills/{skill_id}/versions/{version}○ Unsupported

Request parameters

  • skill_idstring必填

    path: Skill ID (path or query parameter).

  • versionstring必填

    path: Path parameter: the version.

  • skill_idstring必填

    query: Skill ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Uploading and managing Skills is not supported yet; passing skills when creating an agent returns 400. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for this Skill Version. The id addresses the version in paths and pins it in references.
created_atstringISO 8601 timestamp of when the skill was created.
descriptionstringDescription of the skill version. This is extracted from the SKILL.md file in the skill upload.
namestringThe Skill's immutable kebab-case slug, set at creation from the first upload's SKILL.md frontmatter `name` (or its enclosing directory). Every later upload must resolve to the same value. Also the top-level directory of the Skill's mounted files and the base name of a downloaded archive.
skill_idstringUnique identifier for the skill. The format and length of IDs may change over time.
typestringObject type. For Skill Versions, this is always `"skill_version"`.

GET /anthropic/v1/skills/{skill_id}/versions/{version}/content○ Unsupported

Request parameters

  • skill_idstring必填

    path: Skill ID (path or query parameter).

  • versionstring必填

    path: Path parameter: the version.

  • skill_idstring必填

    query: Skill ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

Uploading and managing Skills is not supported yet; passing skills when creating an agent returns 400. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Binary response body

application/octet-stream

NameTypeDescription
$string (binary)

GET /anthropic/v1/tunnels○ Unsupported

Request parameters

  • include_archivedboolean可选

    query: Whether to include archived records.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not offer tunnels that connect agents into your own network yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for the tunnel, prefixed with `tnl_`.
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].created_atstringA timestamp in RFC 3339 format
data[].display_namenull | stringHuman-readable name for the tunnel (1-255 characters). Null if unset.
data[].domainstringAnthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.
data[].typestring
next_pagestring | null

POST /anthropic/v1/tunnels○ Unsupported

Request body

  • display_namestring可选

    Optional human-readable name for the tunnel (1-255 characters).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not offer tunnels that connect agents into your own network yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the tunnel, prefixed with `tnl_`.
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
display_namenull | stringHuman-readable name for the tunnel (1-255 characters). Null if unset.
domainstringAnthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.
typestring

GET /anthropic/v1/tunnels/{tunnel_id}○ Unsupported

Request parameters

  • tunnel_idstring必填

    path: Tunnel ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not offer tunnels that connect agents into your own network yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the tunnel, prefixed with `tnl_`.
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
display_namenull | stringHuman-readable name for the tunnel (1-255 characters). Null if unset.
domainstringAnthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.
typestring

POST /anthropic/v1/tunnels/{tunnel_id}/archive○ Unsupported

Request parameters

  • tunnel_idstring必填

    path: Tunnel ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not offer tunnels that connect agents into your own network yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the tunnel, prefixed with `tnl_`.
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
display_namenull | stringHuman-readable name for the tunnel (1-255 characters). Null if unset.
domainstringAnthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.
typestring

GET /anthropic/v1/tunnels/{tunnel_id}/certificates○ Unsupported

Request parameters

  • tunnel_idstring必填

    path: Tunnel ID (path or query parameter).

  • include_archivedboolean可选

    query: Whether to include archived records.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not offer tunnels that connect agents into your own network yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for the certificate, prefixed with `tcrt_`.
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].created_atstringA timestamp in RFC 3339 format
data[].expires_atnull | stringA timestamp in RFC 3339 format
data[].fingerprintstringLowercase hex SHA-256 fingerprint of the certificate's DER encoding.
data[].tunnel_idstringID of the tunnel the certificate is registered against.
data[].typestring
next_pagestring | null

POST /anthropic/v1/tunnels/{tunnel_id}/certificates○ Unsupported

Request parameters

  • tunnel_idstring必填

    path: Tunnel ID (path or query parameter).

  • ca_certificate_pemstring必填

    PEM-encoded X.509 CA certificate. Must contain exactly one certificate and no private-key material. Maximum 8KB.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not offer tunnels that connect agents into your own network yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the certificate, prefixed with `tcrt_`.
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
expires_atnull | stringA timestamp in RFC 3339 format
fingerprintstringLowercase hex SHA-256 fingerprint of the certificate's DER encoding.
tunnel_idstringID of the tunnel the certificate is registered against.
typestring

GET /anthropic/v1/tunnels/{tunnel_id}/certificates/{certificate_id}○ Unsupported

Request parameters

  • tunnel_idstring必填

    path: Tunnel ID (path or query parameter).

  • certificate_idstring必填

    path: Path parameter: the client certificate ID.

  • tunnel_idstring必填

    query: Tunnel ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not offer tunnels that connect agents into your own network yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the certificate, prefixed with `tcrt_`.
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
expires_atnull | stringA timestamp in RFC 3339 format
fingerprintstringLowercase hex SHA-256 fingerprint of the certificate's DER encoding.
tunnel_idstringID of the tunnel the certificate is registered against.
typestring

POST /anthropic/v1/tunnels/{tunnel_id}/certificates/{certificate_id}/archive○ Unsupported

Request parameters

  • tunnel_idstring必填

    path: Tunnel ID (path or query parameter).

  • certificate_idstring必填

    path: Path parameter: the client certificate ID.

  • tunnel_idstring必填

    query: Tunnel ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not offer tunnels that connect agents into your own network yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the certificate, prefixed with `tcrt_`.
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
expires_atnull | stringA timestamp in RFC 3339 format
fingerprintstringLowercase hex SHA-256 fingerprint of the certificate's DER encoding.
tunnel_idstringID of the tunnel the certificate is registered against.
typestring

POST /anthropic/v1/tunnels/{tunnel_id}/reveal_token○ Unsupported

Request parameters

  • tunnel_idstring必填

    path: Tunnel ID (path or query parameter).

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not offer tunnels that connect agents into your own network yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringStable identifier for the current token value. Changes when the token is rotated.
tunnel_tokenstringThe connector token used to run the tunnel. Treat as a credential.
typestring

POST /anthropic/v1/tunnels/{tunnel_id}/rotate_token○ Unsupported

Request parameters

  • tunnel_idstring必填

    path: Tunnel ID (path or query parameter).

  • reasonstring可选

    Optional free-text reason for the rotation, recorded for audit.

Returns

501 This endpoint is not implemented yet; calling it returns the response below:

The platform does not offer tunnels that connect agents into your own network yet. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringStable identifier for the current token value. Changes when the token is rotated.
tunnel_tokenstringThe connector token used to run the tunnel. Treat as a credential.
typestring

List Vaults

GET /anthropic/v1/vaults● Supported

Request parameters

  • include_archivedboolean可选

    query: Whether to include archived records.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

200

Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for the vault.
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].created_atstringA timestamp in RFC 3339 format
data[].display_namestringHuman-readable name for the vault.
data[].metadataobjectArbitrary key-value metadata attached to the vault.
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
next_pagestring | null

Create Vault

POST /anthropic/v1/vaults● Supported

Request body

  • display_namestring必填

    Human-readable name for the vault. 1-255 characters.

  • metadataobject可选

    Arbitrary key-value metadata to attach to the vault. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

Returns

200

Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the vault.
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
display_namestringHuman-readable name for the vault.
metadataobjectArbitrary key-value metadata attached to the vault.
typestring
updated_atstringA timestamp in RFC 3339 format

Delete Vault

DELETE /anthropic/v1/vaults/{vault_id}● Supported

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

Returns

200

Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier of the deleted vault.
typestring

Get Vault

GET /anthropic/v1/vaults/{vault_id}● Supported

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

Returns

200

Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the vault.
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
display_namestringHuman-readable name for the vault.
metadataobjectArbitrary key-value metadata attached to the vault.
typestring
updated_atstringA timestamp in RFC 3339 format

Update Vault

POST /anthropic/v1/vaults/{vault_id}● Supported

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

  • display_namestring可选

    Updated human-readable name for the vault. 1-255 characters.

  • metadataobject可选

    Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omitted keys are preserved.

Returns

200

Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the vault.
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
display_namestringHuman-readable name for the vault.
metadataobjectArbitrary key-value metadata attached to the vault.
typestring
updated_atstringA timestamp in RFC 3339 format

Archive Vault

POST /anthropic/v1/vaults/{vault_id}/archive● Supported

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

Returns

200

Supports create, list, retrieve, update, archive and delete. Lists accept limit, page and include_archived. Archiving a vault archives every credential in it and clears their values; deleting it removes every credential and cannot be undone. Metadata keys starting with anthropic. are reserved and cannot be written. The same vaults are also available through the native /vault/v1 API.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the vault.
archived_atnull | stringA timestamp in RFC 3339 format
created_atstringA timestamp in RFC 3339 format
display_namestringHuman-readable name for the vault.
metadataobjectArbitrary key-value metadata attached to the vault.
typestring
updated_atstringA timestamp in RFC 3339 format

GET /anthropic/v1/vaults/{vault_id}/credentials◐ Partial

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

  • include_archivedboolean可选

    query: Whether to include archived records.

  • limitnumber可选

    query: Maximum number of items per page.

  • pagestring可选

    query: Pagination cursor taken from the previous response's next_page.

Returns

200

Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
dataarray<object>
data[].idstringUnique identifier for the credential.
data[].archived_atnull | stringA timestamp in RFC 3339 format
data[].authobjectAuthentication details for a credential.
data[].created_atstringA timestamp in RFC 3339 format
data[].metadataobjectArbitrary key-value metadata attached to the credential.
data[].typestring
data[].updated_atstringA timestamp in RFC 3339 format
data[].vault_idstringIdentifier of the vault this credential belongs to.
data[].display_namenull | stringHuman-readable name for the credential.
next_pagestring | null

POST /anthropic/v1/vaults/{vault_id}/credentials◐ Partial

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

  • authobject必填

    Authentication details for creating a credential.

    ▸ 展开子字段(10)
    • access_tokenstring必填

      OAuth access token.

    • mcp_server_urlstring必填

      URL of the MCP server this credential authenticates against.

    • typestring必填
      取值 environment_variable
    • expires_atstring可选

      A timestamp in RFC 3339 format

    • refreshobject可选

      OAuth refresh token parameters for creating a credential with refresh support.

    • tokenstring必填

      Static bearer token value.

    • networkingobject必填

      Outbound hosts the secret value is substituted on.

    • secret_namestring必填

      Name of the environment variable. Immutable after create.

    • secret_valuestring必填

      Secret value. Write-only; never returned in responses.

    • injection_locationobject可选

      Where in the outbound request the secret value may be substituted.

  • display_namestring可选

    Human-readable name for the credential. Up to 255 characters.

  • metadataobject可选

    Arbitrary key-value metadata to attach to the credential. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

Returns

200

Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the credential.
archived_atnull | stringA timestamp in RFC 3339 format
authobjectAuthentication details for a credential.
auth.mcp_server_urlstringURL of the MCP server this credential authenticates against.
auth.typestring
auth.expires_atnull | stringA timestamp in RFC 3339 format
auth.refreshnull | objectOAuth refresh token configuration returned in credential responses.
auth.injection_locationobjectWhere in the outbound request the secret value is substituted.
auth.networkingobjectOutbound hosts the secret value is substituted on.
auth.secret_namestringName of the environment variable.
created_atstringA timestamp in RFC 3339 format
metadataobjectArbitrary key-value metadata attached to the credential.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idstringIdentifier of the vault this credential belongs to.
display_namenull | stringHuman-readable name for the credential.

MCP OAuth creation limit

The example above creates an environment_variable credential. Creating mcp_oauth still returns 501 without creating a credential; updating an existing mcp_oauth credential is also unsupported. This is the captured creation error.

{
  "type": "error",
  "error": {
    "type": "not_implemented_error",
    "message": "Not implemented: creating mcp_oauth credentials is not available on this platform yet; use static_bearer or environment_variable."
  },
  "request_id": "4c1dcdba-97bb-46ce-aad0-0a7d8753357c"
}

DELETE /anthropic/v1/vaults/{vault_id}/credentials/{credential_id}◐ Partial

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

  • credential_idstring必填

    path: Path parameter: the credential ID.

  • vault_idstring必填

    query: Vault ID (path or query parameter).

Returns

200

Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier of the deleted credential.
typestring

GET /anthropic/v1/vaults/{vault_id}/credentials/{credential_id}◐ Partial

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

  • credential_idstring必填

    path: Path parameter: the credential ID.

  • vault_idstring必填

    query: Vault ID (path or query parameter).

Returns

200

Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the credential.
archived_atnull | stringA timestamp in RFC 3339 format
authobjectAuthentication details for a credential.
auth.mcp_server_urlstringURL of the MCP server this credential authenticates against.
auth.typestring
auth.expires_atnull | stringA timestamp in RFC 3339 format
auth.refreshnull | objectOAuth refresh token configuration returned in credential responses.
auth.injection_locationobjectWhere in the outbound request the secret value is substituted.
auth.networkingobjectOutbound hosts the secret value is substituted on.
auth.secret_namestringName of the environment variable.
created_atstringA timestamp in RFC 3339 format
metadataobjectArbitrary key-value metadata attached to the credential.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idstringIdentifier of the vault this credential belongs to.
display_namenull | stringHuman-readable name for the credential.

POST /anthropic/v1/vaults/{vault_id}/credentials/{credential_id}◐ Partial

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

  • credential_idstring必填

    path: Path parameter: the credential ID.

  • vault_idstring必填

    query: Vault ID (path or query parameter).

  • authobject可选

    Updated authentication details for a credential.

    ▸ 展开子字段(8)
    • typestring必填
      取值 environment_variable
    • access_tokenstring可选

      Updated OAuth access token.

    • expires_atstring可选

      A timestamp in RFC 3339 format

    • refreshobject可选

      Parameters for updating OAuth refresh token configuration.

    • tokenstring可选

      Updated static bearer token value.

    • injection_locationobject可选

      Updated injection location.

    • networkingobject可选

      Updated networking scope. Full replacement.

    • secret_valuestring可选

      Updated secret value.

  • display_namestring可选

    Updated human-readable name for the credential. 1-255 characters.

  • metadataobject可选

    Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omitted keys are preserved.

Returns

200

Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the credential.
archived_atnull | stringA timestamp in RFC 3339 format
authobjectAuthentication details for a credential.
auth.mcp_server_urlstringURL of the MCP server this credential authenticates against.
auth.typestring
auth.expires_atnull | stringA timestamp in RFC 3339 format
auth.refreshnull | objectOAuth refresh token configuration returned in credential responses.
auth.injection_locationobjectWhere in the outbound request the secret value is substituted.
auth.networkingobjectOutbound hosts the secret value is substituted on.
auth.secret_namestringName of the environment variable.
created_atstringA timestamp in RFC 3339 format
metadataobjectArbitrary key-value metadata attached to the credential.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idstringIdentifier of the vault this credential belongs to.
display_namenull | stringHuman-readable name for the credential.

POST /anthropic/v1/vaults/{vault_id}/credentials/{credential_id}/archive◐ Partial

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

  • credential_idstring必填

    path: Path parameter: the credential ID.

  • vault_idstring必填

    query: Vault ID (path or query parameter).

Returns

200

Supports environment_variable and static_bearer. environment_variable networking supports limited only; unrestricted returns 400. secret_name may contain only uppercase letters, digits and underscores and cannot start with a digit. injection_location defaults match the official API. A static_bearer token is usable only on the host of its mcp_server_url. Creating or updating mcp_oauth returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry; use one-click authorization at /vault/v1/authorizations for OAuth tokens. A vault holds at most 20 active credentials. Metadata keys starting with anthropic. are reserved and cannot be written.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
idstringUnique identifier for the credential.
archived_atnull | stringA timestamp in RFC 3339 format
authobjectAuthentication details for a credential.
auth.mcp_server_urlstringURL of the MCP server this credential authenticates against.
auth.typestring
auth.expires_atnull | stringA timestamp in RFC 3339 format
auth.refreshnull | objectOAuth refresh token configuration returned in credential responses.
auth.injection_locationobjectWhere in the outbound request the secret value is substituted.
auth.networkingobjectOutbound hosts the secret value is substituted on.
auth.secret_namestringName of the environment variable.
created_atstringA timestamp in RFC 3339 format
metadataobjectArbitrary key-value metadata attached to the credential.
typestring
updated_atstringA timestamp in RFC 3339 format
vault_idstringIdentifier of the vault this credential belongs to.
display_namenull | stringHuman-readable name for the credential.

POST /anthropic/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate◐ Partial

Request parameters

  • vault_idstring必填

    path: Vault ID (path or query parameter).

  • credential_idstring必填

    path: Path parameter: the credential ID.

  • vault_idstring必填

    query: Vault ID (path or query parameter).

Returns

400

Applies to OAuth credentials only; other types return 400. The result is always HTTP 200 with status valid, invalid or unknown; mcp_probe describes the failing step only when the check does not pass, and refresh appears only when a refresh was attempted.

Errors follow the Claude Managed Agents format — see error codes

Response

HTTP 200

Successful response

application/json

NameTypeDescription
credential_idstringUnique identifier of the credential that was validated.
has_refresh_tokenbooleanWhether the credential has a refresh token configured.
mcp_probenull | objectThe failing step of an MCP validation probe.
mcp_probe.http_responsenull | objectAn HTTP response captured during a credential validation probe.
mcp_probe.methodstringThe MCP method that failed (for example `initialize` or `tools/list`).
refreshnull | objectOutcome of a refresh-token exchange attempted during credential validation.
refresh.http_responsenull | objectAn HTTP response captured during a credential validation probe.
refresh.statusstringOutcome of a refresh-token exchange attempted during credential validation. - `succeeded` - The token endpoint returned a new access token. - `failed` - The token endpoint returned an error response. See `http_response` for detail. - `connect_error` - The token endpoint could not be reached (DNS, TLS, or connection error). - `no_refresh_token` - No refresh token is stored for the credential, so no exchange was attempted.
statusstringOverall verdict of a credential validation probe.
typestring
validated_atstringA timestamp in RFC 3339 format
vault_idstringIdentifier of the vault containing the credential.

Example prerequisite

This example targets the static credential created earlier, so its captured response is 400 invalid_request_error. For a validation result, complete user authorization, then replace credential_id with the resulting OAuth secret ID. OAuth validation returns HTTP 200 with status valid, invalid or unknown.