2026-10-22
Loading…| Method | Path | Description | Support |
|---|---|---|---|
| POST | /v1/messages | Create a Message | ● Supported |
| POST | /v1/messages/count_tokens | Count tokens for a request | ◐ Partial |
| GET | /v1/models | List models | ● Supported |
| POST | /v1/files | Upload a file | ● Supported |
| GET | /v1/files | List 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}/content | Download file content | ● Supported |
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.
/anthropic/v1/messages● Supportedmodelstring必填◐ Partially supportedBody 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 supportedBody 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.
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 supportedBody 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 supportedBody 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.
tool_choiceobject可选◐ Partially supportedBody 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.
typestring必填disable_parallel_tool_useboolean可选○ Currently ignoredWhether 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 supportedBody param: An object describing metadata about the request.
Accepts metadata; metadata.user_id is carried on same-protocol lines without promising an upstream echo.
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 supportedBody 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.
typestring必填Always `ephemeral`. Discriminator that marks this object as a CacheControlEphemeral in a `type`-tagged union.
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 ignoredAccepted and ignored; the platform does not implement container.
idstring可选Container id
skillsarray可选List of skills to load in the container
inference_geostring可选○ Currently ignoredAccepted 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.
effortstring可选◐ Partially supportedAll 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 supportedA 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 ignoredAccepted and ignored; the platform does not implement service_tier.
thinkingobject可选◐ Partially supportedBody 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.
budget_tokensnumber必填◐ Partially supportedDetermines 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必填displaystring可选○ Currently ignoredControls 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 ignoredAccepted and ignored; the platform does not implement context_management.
diagnosticsobject可选○ Currently ignoredAccepted and ignored; the platform does not implement diagnostics.
mcp_serversarray可选○ Currently ignoredAccepted and ignored; the platform does not implement mcp_servers.
speedstring可选○ Currently ignoredAccepted and ignored; the platform does not implement speed.
output_formatobject可选○ Currently ignoredAccepted and ignored legacy field; use output_config.format for structured output.
compactionobject可选○ UnsupportedRecognized compaction; not implemented, and returns 400 explicitly stating that the parameter is not supported.
fallback_credit_tokenstring可选○ UnsupportedRecognized fallback_credit_token; not implemented, and returns 400 explicitly stating that the parameter is not supported.
fallbacksstring可选○ UnsupportedRecognized fallbacks; not implemented, and returns 400 explicitly stating that the parameter is not supported.
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
Message created
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique object identifier. The format and length of IDs may change over time. |
| container | null | object | Information about the container used in the request (for the code execution tool) |
| container.id | string | Identifier for the container used in this request |
| container.expires_at | string | The time at which the container will expire. |
| container.skills | null | array<object> | Skills loaded in the container |
| content | array<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[].citations | null | 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[].text | string | The text generated by the model. |
| content[].type | string | Always `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[].signature | string | A 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[].thinking | string | The text of Claude's thinking process for this block. |
| content[].data | string | The 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[].id | string | Id 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[].caller | object | Which 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[].input | any | Arguments 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[].name | string | Name 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_name | null | string | For a toolset member tool_use, the toolset family. |
| content[].content | object | array<object> | object | object | object | object | object | Search 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_id | string | Id 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_id | string | Id of the file that was uploaded into the code execution container. |
| model | string | The model that will complete your prompt. See models for additional details and options. |
| role | string | Conversational role of the generated message. This will always be `"assistant"`. |
| stop_details | null | object | Structured information about a refusal. |
| stop_details.category | null | string | The 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.explanation | null | string | Human-readable explanation of the refusal. This text is not guaranteed to be stable. `null` when no explanation is available for the category. |
| stop_details.type | string | Always `refusal`. Discriminator that marks this object as a RefusalStopDetails in a `type`-tagged union. |
| stop_reason | null | string | The 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_sequence | null | string | Which custom stop sequence was generated, if any. This value will be a non-null string if one of your custom stop sequences was generated. |
| type | string | Object type. For Messages, this is always `"message"`. |
| usage | object | Billing 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 | null | object | Breakdown of cached tokens by TTL |
| usage.cache_creation_input_tokens | null | number | The number of input tokens used to create the cache entry. |
| usage.cache_read_input_tokens | null | number | The number of input tokens read from the cache. |
| usage.inference_geo | null | string | The geographic region where inference was performed for this request. |
| usage.input_tokens | number | The number of input tokens which were used. |
| usage.output_tokens | number | The number of output tokens which were used. |
| usage.output_tokens_details | null | object | Breakdown 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_use | null | object | The number of server tool requests. |
| usage.service_tier | null | string | If the request used the priority, standard, or batch tier. |
text/event-stream — chunk / event object
| Name | Type | Description |
|---|---|---|
| delta | object | Final fields of the message sent with message_delta: why generation stopped and the container. / The incremental change to the content block at index. |
| delta.container | null | object | Information about the container used in the request (for the code execution tool) |
| delta.stop_details | null | object | Structured information about a refusal. |
| delta.stop_reason | null | string | Why the model stopped; null while the message is still generating. |
| delta.stop_sequence | null | string | The custom stop sequence that was matched; null unless stop_reason is stop_sequence. |
| delta.text | string | Text fragment to append to the text block. |
| delta.type | string | Always `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_json | string | Fragment of the tool input JSON string; concatenate all fragments of a block and parse the result when the block stops. |
| delta.citation | object | The citation to attach to the text block being streamed. |
| delta.thinking | string | The 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.signature | string | The `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. |
| type | string | Always `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. |
| usage | object | Billing 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_tokens | null | number | The cumulative number of input tokens used to create the cache entry. |
| usage.cache_read_input_tokens | null | number | The cumulative number of input tokens read from the cache. |
| usage.input_tokens | null | number | The cumulative number of input tokens which were used. |
| usage.output_tokens | number | The cumulative number of output tokens which were used. |
| usage.output_tokens_details | null | object | Breakdown 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_use | null | object | The number of server tool requests. |
| index | number | Zero-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. |
| message | object | The complete Message object being started; its content is empty at message_start and filled by the following content_block events. |
| message.id | string | Unique object identifier. The format and length of IDs may change over time. |
| message.container | null | object | Information about the container used in the request (for the code execution tool) |
| message.content | array<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.model | string | The model that will complete your prompt. See models for additional details and options. |
| message.role | string | Conversational role of the generated message. This will always be `"assistant"`. |
| message.stop_details | null | object | Structured information about a refusal. |
| message.stop_reason | null | string | The 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_sequence | null | string | Which 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.type | string | Object type. For Messages, this is always `"message"`. |
| message.usage | object | Billing 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_block | object | The content block as it starts, with empty text or input to be filled by deltas. |
| content_block.citations | null | 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.text | string | The text generated by the model. |
| content_block.type | string | Always `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.signature | string | A 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.thinking | string | The text of Claude's thinking process for this block. |
| content_block.data | string | The 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.id | string | Id 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.caller | object | Which 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.input | any | Arguments 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.name | string | Name 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_name | null | string | For a toolset member tool_use, the toolset family. |
| content_block.content | object | array<object> | object | object | object | object | object | Search 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_id | string | Id 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_id | string | Id of the file that was uploaded into the code execution container. |
/anthropic/v1/messages/count_tokens◐ Partialmodelstring必填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 supportedBody 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.
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 supportedBody 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 supportedBody 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 supportedBody 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.
typestring必填Disable tool calls for this request.
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 supportedBody 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.
typestring必填Always `ephemeral`. Discriminator that marks this object as a CacheControlEphemeral in a `type`-tagged union.
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 supportedBody param: Configuration options for the model's output, such as the output format.
Forwarded natively; additional template tokens are not exact locally.
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 supportedBody 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.
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.
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`.
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
Token count
application/json
| Name | Type | Description |
|---|---|---|
| input_tokens | number | The total number of tokens across the provided list of messages, system prompt, and tools. |
/anthropic/v1/models● Supportedlimitnumber可选query: Number of items per page.
Verified to take effect.
before_idstring可选query:
Verified to take effect.
after_idstring可选query:
Verified to take effect.
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
Models listed
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique model identifier. |
| data[].capabilities | null | object | Model capability information. |
| data[].created_at | string | RFC 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_name | string | A human-readable name for the model. |
| data[].max_input_tokens | null | number | Maximum input context window size in tokens for this model. |
| data[].max_tokens | null | number | Maximum value for the `max_tokens` parameter when using this model. |
| data[].type | string | Object type. For Models, this is always `"model"`. |
| has_more | boolean | |
| first_id | null | string | |
| last_id | null | string |
/anthropic/v1/files● Supportedfilestring必填◐ Partially supportedBody 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 supportedBody 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.
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
File uploaded
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique object identifier. The format and length of IDs may change over time. |
| created_at | string | RFC 3339 datetime string representing when the file was created. |
| filename | string | Original filename of the uploaded file. |
| mime_type | string | MIME type of the file. |
| size_bytes | number | Size of the file in bytes. |
| type | string | Object type. For files, this is always `"file"`. |
| downloadable | boolean | Whether the file can be downloaded. |
| expires_at | null | string | RFC 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. |
| scope | null | object | The scope of this file, indicating the context in which it was created (e.g., a session). |
| scope.id | string | The ID of the scoping resource (e.g., the session ID). |
| scope.type | string | The type of scope (e.g., `"session"`). |
/anthropic/v1/files● Supportedidsarray可选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 supportedquery: 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.
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
Files listed
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique object identifier. The format and length of IDs may change over time. |
| data[].created_at | string | RFC 3339 datetime string representing when the file was created. |
| data[].filename | string | Original filename of the uploaded file. |
| data[].mime_type | string | MIME type of the file. |
| data[].size_bytes | number | Size of the file in bytes. |
| data[].type | string | Object type. For files, this is always `"file"`. |
| data[].downloadable | boolean | Whether the file can be downloaded. |
| data[].expires_at | null | string | RFC 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[].scope | null | object | The scope of this file, indicating the context in which it was created (e.g., a session). |
| next_page | null | string |
Upload a file first, then replace the example file ID with its returned ID.
/anthropic/v1/files/{file_id}● Supportedfile_idstring必填path:
200
Errors follow the Anthropic format — see error codes
Metadata
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique object identifier. The format and length of IDs may change over time. |
| created_at | string | RFC 3339 datetime string representing when the file was created. |
| filename | string | Original filename of the uploaded file. |
| mime_type | string | MIME type of the file. |
| size_bytes | number | Size of the file in bytes. |
| type | string | Object type. For files, this is always `"file"`. |
| downloadable | boolean | Whether the file can be downloaded. |
| expires_at | null | string | RFC 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. |
| scope | null | object | The scope of this file, indicating the context in which it was created (e.g., a session). |
| scope.id | string | The ID of the scoping resource (e.g., the session ID). |
| scope.type | string | The type of scope (e.g., `"session"`). |
Upload a file first, then replace the example file ID with its returned ID.
/anthropic/v1/files/{file_id}● Supportedfile_idstring必填path:
200
Errors follow the Anthropic format — see error codes
Deleted
application/json
| Name | Type | Description |
|---|---|---|
| id | string | ID of the deleted file. |
| type | string | Deleted object type. For file deletion, this is always `"file_deleted"`. |
Upload a file first, then replace the example file ID with its returned ID.
/anthropic/v1/files/{file_id}/content● Supportedfile_idstring必填path:
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
Binary content
No response body is declared.
Loading…agent_… ID.agent with that ID. Save the returned sesn_… ID.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.
| Method | Path | Description | Support |
|---|---|---|---|
| POST | /v1/agents | Create Agent | ◐ Partial |
| GET | /v1/agents | List Agents | ● Supported |
| GET | /v1/agents/{agent_id} | Get Agent | ● Supported |
| POST | /v1/agents/{agent_id} | Update Agent | ◐ Partial |
| GET | /v1/agents/{agent_id}/versions | List Agent Versions | ● Supported |
| POST | /v1/agents/{agent_id}/archive | Archive Agent | ● Supported |
| Method | Path | Description | Support |
|---|---|---|---|
| POST | /v1/sessions | Create Session | ◐ Partial |
| GET | /v1/sessions | List Sessions | ◐ Partial |
| GET | /v1/sessions/{session_id} | Get Session | ● Supported |
| POST | /v1/sessions/{session_id}/events | Send Events | ◐ Partial |
| GET | /v1/sessions/{session_id}/events | List Events | ● Supported |
| GET | /v1/sessions/{session_id}/events/stream | Stream Events | ◐ Partial |
| POST | /v1/sessions/{session_id} | Update Session | ◐ Partial |
| DELETE | /v1/sessions/{session_id} | Delete Session | ○ Unsupported |
| POST | /v1/sessions/{session_id}/archive | Archive Session | ● Supported |
| Method | Path | Description | Support |
|---|---|---|---|
| GET | /v1/deployment_runs | List Deployment Runs | ○ Unsupported |
| GET | /v1/deployment_runs/{deployment_run_id} | Get Deployment Run | ○ Unsupported |
| GET | /v1/deployments | List Deployments | ○ Unsupported |
| POST | /v1/deployments | Create Deployment | ○ Unsupported |
| GET | /v1/deployments/{deployment_id} | Get Deployment | ○ Unsupported |
| POST | /v1/deployments/{deployment_id} | Update Deployment | ○ Unsupported |
| POST | /v1/deployments/{deployment_id}/archive | Archive Deployment | ○ Unsupported |
| POST | /v1/deployments/{deployment_id}/pause | Pause Deployment | ○ Unsupported |
| POST | /v1/deployments/{deployment_id}/run | Run Deployment | ○ Unsupported |
| POST | /v1/deployments/{deployment_id}/unpause | Unpause Deployment | ○ Unsupported |
| Method | Path | Description | Support |
|---|---|---|---|
| GET | /v1/environments | List Environments | ◐ Partial |
| POST | /v1/environments | Create 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}/archive | Archive Environment | ◐ Partial |
| Method | Path | Description | Support |
|---|---|---|---|
| GET | /v1/environments/{environment_id}/work | List 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}/ack | Acknowledge Work Item | ○ Unsupported |
| POST | /v1/environments/{environment_id}/work/{work_id}/heartbeat | Heartbeat Work Item | ○ Unsupported |
| POST | /v1/environments/{environment_id}/work/{work_id}/stop | Stop Work Item | ○ Unsupported |
| GET | /v1/environments/{environment_id}/work/poll | Poll Work Items | ○ Unsupported |
| GET | /v1/environments/{environment_id}/work/stats | Work Item Stats | ○ Unsupported |
| Method | Path | Description | Support |
|---|---|---|---|
| GET | /v1/sessions/{session_id}/resources | List Session Resources | ◐ Partial |
| POST | /v1/sessions/{session_id}/resources | Add 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 |
| Method | Path | Description | Support |
|---|---|---|---|
| GET | /v1/sessions/{session_id}/threads | List Threads | ◐ Partial |
| GET | /v1/sessions/{session_id}/threads/{thread_id} | Get Thread | ◐ Partial |
| POST | /v1/sessions/{session_id}/threads/{thread_id}/archive | Archive Thread | ◐ Partial |
| GET | /v1/sessions/{session_id}/threads/{thread_id}/events | List Thread Events | ◐ Partial |
| GET | /v1/sessions/{session_id}/threads/{thread_id}/stream | Stream Thread Events | ◐ Partial |
| Method | Path | Description | Support |
|---|---|---|---|
| GET | /v1/skills | List Skills | ○ Unsupported |
| POST | /v1/skills | Create Skill | ○ Unsupported |
| DELETE | /v1/skills/{skill_id} | Delete Skill | ○ Unsupported |
| GET | /v1/skills/{skill_id} | Get Skill | ○ Unsupported |
| GET | /v1/skills/{skill_id}/versions | List Skill Versions | ○ Unsupported |
| POST | /v1/skills/{skill_id}/versions | Create 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}/content | Download Skill Version Content | ○ Unsupported |
| Method | Path | Description | Support |
|---|---|---|---|
| GET | /v1/tunnels | List Tunnels | ○ Unsupported |
| POST | /v1/tunnels | Create Tunnel | ○ Unsupported |
| GET | /v1/tunnels/{tunnel_id} | Get Tunnel | ○ Unsupported |
| POST | /v1/tunnels/{tunnel_id}/archive | Archive Tunnel | ○ Unsupported |
| GET | /v1/tunnels/{tunnel_id}/certificates | List Tunnel Certificates | ○ Unsupported |
| POST | /v1/tunnels/{tunnel_id}/certificates | Create Tunnel Certificate | ○ Unsupported |
| GET | /v1/tunnels/{tunnel_id}/certificates/{certificate_id} | Get Tunnel Certificate | ○ Unsupported |
| POST | /v1/tunnels/{tunnel_id}/certificates/{certificate_id}/archive | Archive Tunnel Certificate | ○ Unsupported |
| POST | /v1/tunnels/{tunnel_id}/reveal_token | Reveal Tunnel Token | ○ Unsupported |
| POST | /v1/tunnels/{tunnel_id}/rotate_token | Rotate Tunnel Token | ○ Unsupported |
| Method | Path | Description | Support |
|---|---|---|---|
| GET | /v1/vaults | List Vaults | ● Supported |
| POST | /v1/vaults | Create 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}/archive | Archive Vault | ● Supported |
| GET | /v1/vaults/{vault_id}/credentials | List Credentials | ◐ Partial |
| POST | /v1/vaults/{vault_id}/credentials | Create 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}/archive | Archive Credential | ◐ Partial |
| POST | /v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate | Validate Credential MCP OAuth | ◐ Partial |
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.
/anthropic/v1/agents◐ PartialOfficial Claude documentation ↗
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).
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.
namestring必填Name unique within this list, 1-255 characters, referenced by mcp_toolset configurations.
typestring必填Server type; only url is supported today.
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.
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.
skillsarray可选○ 未支持Skills available to the agent.
toolsarray可选Tool configurations for the agent; up to 128 tools across all toolsets.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | |
| mcp_servers | array<object> | |
| mcp_servers[].name | string | |
| mcp_servers[].type | string | |
| mcp_servers[].url | string | |
| metadata | object | |
| model | object | Model identifier and configuration. |
| model.id | string | The model that will power your agent. See models for additional details and options. |
| model.effort | object | How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. |
| model.inference_geo | string | Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo. |
| model.speed | string | Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. |
| multiagent | null | object | Resolved coordinator topology with a concrete agent roster. |
| multiagent.agents | array<object> | Agents the coordinator may spawn as session threads, each resolved to a specific version. |
| multiagent.type | string | |
| name | string | |
| skills | array<object> | |
| skills[].skill_id | string | |
| skills[].type | string | |
| skills[].version | string | |
| system | null | string | |
| tools | array<object> | |
| tools[].configs | array<object> | |
| tools[].default_config | object | Resolved default configuration for agent tools. / Resolved default configuration for all tools from an MCP server. |
| tools[].type | string | |
| tools[].mcp_server_name | string | |
| tools[].description | string | |
| tools[].input_schema | object | JSON Schema for custom tool input parameters. |
| tools[].name | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| version | number | The agent's current version. Starts at 1 and increments when the agent is modified. |
/anthropic/v1/agents● SupportedOfficial Claude documentation ↗
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.
200
Errors follow the Claude Managed Agents format — see error codes
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].description | null | string | |
| data[].mcp_servers | array<object> | |
| data[].metadata | object | |
| data[].model | object | Model identifier and configuration. |
| data[].multiagent | null | object | Resolved coordinator topology with a concrete agent roster. |
| data[].name | string | |
| data[].skills | array<object> | |
| data[].system | null | string | |
| data[].tools | array<object> | |
| data[].type | string | |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| data[].version | number | The agent's current version. Starts at 1 and increments when the agent is modified. |
| next_page | string | null |
Call Create agent first and replace the example agent ID with its returned ID.
/anthropic/v1/agents/{agent_id}● SupportedOfficial Claude documentation ↗
agent_idstring必填path: Filter results by agent ID.
versionnumber可选query: Path parameter: the version.
200
Replace example resource IDs with IDs from resources you created.
Errors follow the Claude Managed Agents format — see error codes
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | |
| mcp_servers | array<object> | |
| mcp_servers[].name | string | |
| mcp_servers[].type | string | |
| mcp_servers[].url | string | |
| metadata | object | |
| model | object | Model identifier and configuration. |
| model.id | string | The model that will power your agent. See models for additional details and options. |
| model.effort | object | How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. |
| model.inference_geo | string | Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo. |
| model.speed | string | Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. |
| multiagent | null | object | Resolved coordinator topology with a concrete agent roster. |
| multiagent.agents | array<object> | Agents the coordinator may spawn as session threads, each resolved to a specific version. |
| multiagent.type | string | |
| name | string | |
| skills | array<object> | |
| skills[].skill_id | string | |
| skills[].type | string | |
| skills[].version | string | |
| system | null | string | |
| tools | array<object> | |
| tools[].configs | array<object> | |
| tools[].default_config | object | Resolved default configuration for agent tools. / Resolved default configuration for all tools from an MCP server. |
| tools[].type | string | |
| tools[].mcp_server_name | string | |
| tools[].description | string | |
| tools[].input_schema | object | JSON Schema for custom tool input parameters. |
| tools[].name | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| version | number | The 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.
/anthropic/v1/agents/{agent_id}◐ PartialOfficial Claude documentation ↗
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).
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.
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.
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.
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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | |
| mcp_servers | array<object> | |
| mcp_servers[].name | string | |
| mcp_servers[].type | string | |
| mcp_servers[].url | string | |
| metadata | object | |
| model | object | Model identifier and configuration. |
| model.id | string | The model that will power your agent. See models for additional details and options. |
| model.effort | object | How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. |
| model.inference_geo | string | Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo. |
| model.speed | string | Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. |
| multiagent | null | object | Resolved coordinator topology with a concrete agent roster. |
| multiagent.agents | array<object> | Agents the coordinator may spawn as session threads, each resolved to a specific version. |
| multiagent.type | string | |
| name | string | |
| skills | array<object> | |
| skills[].skill_id | string | |
| skills[].type | string | |
| skills[].version | string | |
| system | null | string | |
| tools | array<object> | |
| tools[].configs | array<object> | |
| tools[].default_config | object | Resolved default configuration for agent tools. / Resolved default configuration for all tools from an MCP server. |
| tools[].type | string | |
| tools[].mcp_server_name | string | |
| tools[].description | string | |
| tools[].input_schema | object | JSON Schema for custom tool input parameters. |
| tools[].name | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| version | number | The 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.
/anthropic/v1/agents/{agent_id}/versions● SupportedOfficial Claude documentation ↗
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.
200
Replace example resource IDs with IDs from resources you created.
Errors follow the Claude Managed Agents format — see error codes
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].description | null | string | |
| data[].mcp_servers | array<object> | |
| data[].metadata | object | |
| data[].model | object | Model identifier and configuration. |
| data[].multiagent | null | object | Resolved coordinator topology with a concrete agent roster. |
| data[].name | string | |
| data[].skills | array<object> | |
| data[].system | null | string | |
| data[].tools | array<object> | |
| data[].type | string | |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| data[].version | number | The agent's current version. Starts at 1 and increments when the agent is modified. |
| next_page | string | null |
Call Create agent first and replace the example agent ID with its returned ID.
/anthropic/v1/agents/{agent_id}/archive● SupportedOfficial Claude documentation ↗
agent_idstring必填path: Filter results by agent ID.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | |
| mcp_servers | array<object> | |
| mcp_servers[].name | string | |
| mcp_servers[].type | string | |
| mcp_servers[].url | string | |
| metadata | object | |
| model | object | Model identifier and configuration. |
| model.id | string | The model that will power your agent. See models for additional details and options. |
| model.effort | object | How hard Claude works on each turn. Sets `output_config.effort` on every Messages call the session makes. |
| model.inference_geo | string | Geographic region for model inference. When unset, requests fall through to the workspace's default_inference_geo. |
| model.speed | string | Inference speed mode. `fast` provides significantly faster output token generation at premium pricing. Not all models support `fast`; invalid combinations are rejected at create time. |
| multiagent | null | object | Resolved coordinator topology with a concrete agent roster. |
| multiagent.agents | array<object> | Agents the coordinator may spawn as session threads, each resolved to a specific version. |
| multiagent.type | string | |
| name | string | |
| skills | array<object> | |
| skills[].skill_id | string | |
| skills[].type | string | |
| skills[].version | string | |
| system | null | string | |
| tools | array<object> | |
| tools[].configs | array<object> | |
| tools[].default_config | object | Resolved default configuration for agent tools. / Resolved default configuration for all tools from an MCP server. |
| tools[].type | string | |
| tools[].mcp_server_name | string | |
| tools[].description | string | |
| tools[].input_schema | object | JSON Schema for custom tool input parameters. |
| tools[].name | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| version | number | The 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.
/anthropic/v1/sessions◐ PartialOfficial Claude documentation ↗
agentstring | object必填The agent the session runs: an agent ID string (pins the latest version) or an object with id and version (see subfields).
idstring必填The ID of the agent the session runs.
typestring必填Reference type; only agent today.
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.
max_list_costobject必填Cap on list-call spending within the budget.
typestring必填Budget type; only max_list_cost today.
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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| agent | object | Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time. |
| agent.id | string | |
| agent.description | null | string | |
| agent.mcp_servers | array<object> | |
| agent.model | object | Model identifier and configuration. |
| agent.multiagent | null | object | Resolved coordinator topology with full agent definitions for each roster member. |
| agent.name | string | |
| agent.skills | array<object> | |
| agent.system | null | string | |
| agent.tools | array<object> | |
| agent.type | string | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| budget.max_list_cost | object | A monetary amount in a specific currency. |
| budget.type | string | |
| created_at | string | A timestamp in RFC 3339 format |
| environment_id | string | |
| metadata | object | |
| outcome_evaluations | array<object> | Per-outcome evaluation state. One entry per `define_outcome` event sent to the session. |
| outcome_evaluations[].completed_at | null | string | A timestamp in RFC 3339 format |
| outcome_evaluations[].description | string | What the agent should produce. |
| outcome_evaluations[].explanation | null | string | Grader'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[].iteration | number | 0-indexed revision cycle the outcome is currently on. |
| outcome_evaluations[].outcome_id | string | Server-generated outc_ ID for this outcome. |
| outcome_evaluations[].result | string | Current 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[].type | string | |
| resources | array<object> | |
| resources[].id | string | |
| resources[].created_at | string | A timestamp in RFC 3339 format |
| resources[].mount_path | string | null | string | Filesystem 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[].type | string | |
| resources[].updated_at | string | A timestamp in RFC 3339 format |
| resources[].url | string | |
| resources[].checkout | null | object | |
| resources[].file_id | string | |
| resources[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| resources[].access | null | string | Access mode for an attached memory store. |
| resources[].description | string | Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description. |
| resources[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| resources[].name | null | string | Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource. |
| stats | object | Timing statistics for a session. |
| stats.active_seconds | number | Cumulative time in seconds the session spent in `running` status. Excludes idle time. |
| stats.duration_seconds | number | Elapsed time since session creation in seconds. For terminated sessions, frozen at the final update. |
| status | string | SessionStatus 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. |
| title | null | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| usage | object | Cumulative token usage for a session across all turns. |
| usage.active_seconds | number | Cumulative 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_creation | object | Prompt-cache creation token usage broken down by cache lifetime. |
| usage.cache_read_input_tokens | number | Total tokens read from prompt cache. |
| usage.input_tokens | number | Total input tokens consumed across all turns. |
| usage.list_cost | null | object | A monetary amount in a specific currency. |
| usage.output_tokens | number | Total output tokens generated across all turns. |
| usage.server_tool_use | null | object | Cumulative count of server-executed tool invocations, broken down by tool. |
| vault_ids | array<string> | Vault IDs attached to the session at creation. Empty when no vaults were supplied. |
| deployment_id | null | string | Deployment ID when the session was created from a deployment reference. Null otherwise. |
/anthropic/v1/sessions◐ PartialOfficial Claude documentation ↗
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).
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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | |
| data[].agent | object | Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time. |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].environment_id | string | |
| data[].metadata | object | |
| data[].outcome_evaluations | array<object> | Per-outcome evaluation state. One entry per `define_outcome` event sent to the session. |
| data[].resources | array<object> | |
| data[].stats | object | Timing statistics for a session. |
| data[].status | string | SessionStatus 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[].title | null | string | |
| data[].type | string | |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| data[].usage | object | Cumulative token usage for a session across all turns. |
| data[].vault_ids | array<string> | Vault IDs attached to the session at creation. Empty when no vaults were supplied. |
| data[].deployment_id | null | string | Deployment ID when the session was created from a deployment reference. Null otherwise. |
| next_page | string | null |
Call Create session first and replace the example session ID with its returned ID.
/anthropic/v1/sessions/{session_id}● SupportedOfficial Claude documentation ↗
session_idstring必填path: Session ID (path or query parameter).
200
Replace example resource IDs with IDs from resources you created.
Errors follow the Claude Managed Agents format — see error codes
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| agent | object | Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time. |
| agent.id | string | |
| agent.description | null | string | |
| agent.mcp_servers | array<object> | |
| agent.model | object | Model identifier and configuration. |
| agent.multiagent | null | object | Resolved coordinator topology with full agent definitions for each roster member. |
| agent.name | string | |
| agent.skills | array<object> | |
| agent.system | null | string | |
| agent.tools | array<object> | |
| agent.type | string | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| budget.max_list_cost | object | A monetary amount in a specific currency. |
| budget.type | string | |
| created_at | string | A timestamp in RFC 3339 format |
| environment_id | string | |
| metadata | object | |
| outcome_evaluations | array<object> | Per-outcome evaluation state. One entry per `define_outcome` event sent to the session. |
| outcome_evaluations[].completed_at | null | string | A timestamp in RFC 3339 format |
| outcome_evaluations[].description | string | What the agent should produce. |
| outcome_evaluations[].explanation | null | string | Grader'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[].iteration | number | 0-indexed revision cycle the outcome is currently on. |
| outcome_evaluations[].outcome_id | string | Server-generated outc_ ID for this outcome. |
| outcome_evaluations[].result | string | Current 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[].type | string | |
| resources | array<object> | |
| resources[].id | string | |
| resources[].created_at | string | A timestamp in RFC 3339 format |
| resources[].mount_path | string | null | string | Filesystem 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[].type | string | |
| resources[].updated_at | string | A timestamp in RFC 3339 format |
| resources[].url | string | |
| resources[].checkout | null | object | |
| resources[].file_id | string | |
| resources[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| resources[].access | null | string | Access mode for an attached memory store. |
| resources[].description | string | Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description. |
| resources[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| resources[].name | null | string | Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource. |
| stats | object | Timing statistics for a session. |
| stats.active_seconds | number | Cumulative time in seconds the session spent in `running` status. Excludes idle time. |
| stats.duration_seconds | number | Elapsed time since session creation in seconds. For terminated sessions, frozen at the final update. |
| status | string | SessionStatus 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. |
| title | null | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| usage | object | Cumulative token usage for a session across all turns. |
| usage.active_seconds | number | Cumulative 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_creation | object | Prompt-cache creation token usage broken down by cache lifetime. |
| usage.cache_read_input_tokens | number | Total tokens read from prompt cache. |
| usage.input_tokens | number | Total input tokens consumed across all turns. |
| usage.list_cost | null | object | A monetary amount in a specific currency. |
| usage.output_tokens | number | Total output tokens generated across all turns. |
| usage.server_tool_use | null | object | Cumulative count of server-executed tool invocations, broken down by tool. |
| vault_ids | array<string> | Vault IDs attached to the session at creation. Empty when no vaults were supplied. |
| deployment_id | null | string | Deployment 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.
/anthropic/v1/sessions/{session_id}/events◐ PartialOfficial Claude documentation ↗
session_idstring必填path: Session ID (path or query parameter).
eventsarray必填Events to send to the session.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | Sent events |
| data[].id | string | Unique identifier for this event. |
| data[].content | array<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[].type | string | |
| data[].processed_at | null | string | string | null | string | null | string | A timestamp in RFC 3339 format |
| data[].session_thread_id | null | string | If 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[].result | string | UserToolConfirmationResult enum |
| data[].tool_use_id | string | The 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_message | null | string | Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'. |
| data[].custom_tool_use_id | string | The 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_error | null | boolean | Whether the tool execution resulted in an error. |
| data[].description | string | What the agent should produce. Copied from the input event. |
| data[].max_iterations | null | number | Evaluate-then-revise cycles before giving up. Default 3, max 20. |
| data[].outcome_id | string | Server-generated `outc_` ID for this outcome. Referenced by `span.outcome_evaluation_*` events and the session's `outcome_evaluations` list. |
| data[].rubric | object | Rubric for grading the quality of an outcome. |
Call Create session first and replace the example session ID with its returned ID.
/anthropic/v1/sessions/{session_id}/events● SupportedOfficial Claude documentation ↗
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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for this event. |
| data[].content | array<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[].type | string | |
| data[].processed_at | null | 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 | string | A timestamp in RFC 3339 format |
| data[].session_thread_id | null | string | string | string | string | string | null | string | string | If 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[].result | string | UserToolConfirmationResult 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_id | string | The 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_message | null | string | Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'. |
| data[].custom_tool_use_id | string | The 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_error | null | boolean | Whether the tool execution resulted in an error. / Whether the model request resulted in an error. / Whether the tool execution resulted in an error. |
| data[].input | object | Input parameters for the tool call. |
| data[].name | string | Name of the custom tool being called. / Name of the MCP tool being used. / Name of the agent tool being used. |
| data[].mcp_server_name | string | Name of the MCP server providing the tool. |
| data[].evaluated_permission | string | AgentEvaluatedPermission enum |
| data[].evaluation | object | Names 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_id | string | The id of the `agent.mcp_tool_use` event this result corresponds to. |
| data[].from_session_thread_id | string | Public `sthr_` ID of the thread that sent the message. |
| data[].from_agent_name | null | string | Name of the callable agent this message came from. Absent when received from the primary agent. |
| data[].to_session_thread_id | string | Public `sthr_` ID of the thread the message was sent to. |
| data[].to_agent_name | null | string | Name of the callable agent this message was sent to. Absent when sent to the primary agent. |
| data[].error | object | |
| data[].stop_reason | object | |
| data[].agent_name | string | Name 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[].iteration | number | 0-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_id | string | The `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[].explanation | string | Human-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why. |
| data[].outcome_evaluation_start_id | string | The id of the corresponding `span.outcome_evaluation_start` event. |
| data[].usage | object | Token usage for a single model request. / Point-in-time snapshot of a session's cumulative usage. |
| data[].model_request_start_id | string | The id of the corresponding `span.model_request_start` event. |
| data[].model_usage | object | Token usage for a single model request. |
| data[].description | string | What the agent should produce. Copied from the input event. |
| data[].max_iterations | null | number | Evaluate-then-revise cycles before giving up. Default 3, max 20. |
| data[].rubric | object | Rubric for grading the quality of an outcome. |
| data[].agent | null | object | Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time. |
| data[].budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| data[].metadata | object | The 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[].title | null | string | The session's new title. Present only when the update changed it. |
| next_page | string | null |
Call Create session first and replace the example session ID with its returned ID.
/anthropic/v1/sessions/{session_id}/events/stream◐ PartialOfficial Claude documentation ↗
session_idstring必填path: Session ID (path or query parameter).
event_deltasarray可选query: When set, the connection also receives streaming delta events.
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
Server-sent events
text/event-stream — chunk / event object
No field schema is declared.
/anthropic/v1/deployment_runs○ Unsupportedcreated_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for this run (`drun_...`). |
| data[].agent | object | A resolved agent reference with a concrete version. |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].deployment_id | string | ID of the deployment that produced this run. |
| data[].error | null | object | Why the run failed to create a session. The type identifies the failure; message is human-readable detail. |
| data[].session_id | null | string | Populated on success. Null on creation failure. Exactly one of `session_id` or `error` is non-null. |
| data[].trigger_context | object | Describes what triggered a deployment run, with trigger-specific metadata. |
| data[].type | string | |
| next_page | string | null |
/anthropic/v1/deployment_runs/{deployment_run_id}○ Unsupporteddeployment_run_idstring必填path: Path parameter: the deployment run ID.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this run (`drun_...`). |
| agent | object | A resolved agent reference with a concrete version. |
| agent.id | string | |
| agent.type | string | |
| agent.version | number | |
| created_at | string | A timestamp in RFC 3339 format |
| deployment_id | string | ID of the deployment that produced this run. |
| error | null | object | Why the run failed to create a session. The type identifies the failure; message is human-readable detail. |
| error.message | string | Human-readable error description. |
| error.type | string | |
| session_id | null | string | Populated on success. Null on creation failure. Exactly one of `session_id` or `error` is non-null. |
| trigger_context | object | Describes what triggered a deployment run, with trigger-specific metadata. |
| trigger_context.scheduled_at | string | A timestamp in RFC 3339 format |
| trigger_context.type | string | |
| type | string |
/anthropic/v1/deployments○ Unsupportedagent_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for this deployment. |
| data[].agent | object | A resolved agent reference with a concrete version. |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].description | null | string | Description of what the deployment does. |
| data[].environment_id | string | ID of the `environment` where sessions run. |
| data[].initial_events | array<object> | Events sent to each session immediately after creation. |
| data[].metadata | object | Arbitrary key-value metadata. Maximum 16 pairs. |
| data[].name | string | Human-readable name. |
| data[].paused_reason | null | object | Why a deployment is paused. Non-null exactly when `status` is `paused`. |
| data[].resources | array<object> | Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials. |
| data[].schedule | null | object | 5-field POSIX cron schedule with computed runtime timestamps. |
| data[].status | string | Lifecycle status of a deployment. |
| data[].type | string | |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| data[].vault_ids | array<string> | Vault IDs supplying stored credentials for sessions created from this deployment. |
| data[].budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| next_page | string | null |
/anthropic/v1/deployments○ Unsupportednamestring必填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.
idstring必填The `agent` ID.
typestring必填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`.
max_list_costobject必填A monetary amount in a specific currency.
typestring必填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.
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必填vault_idsarray可选Vault IDs for stored credentials the agent can use during sessions created from this deployment. Maximum 50.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this deployment. |
| agent | object | A resolved agent reference with a concrete version. |
| agent.id | string | |
| agent.type | string | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | Description of what the deployment does. |
| environment_id | string | ID of the `environment` where sessions run. |
| initial_events | array<object> | Events sent to each session immediately after creation. |
| initial_events[].content | array<object> | Array of content blocks for the user message. / System content blocks to append. Text-only. |
| initial_events[].type | string | |
| initial_events[].description | string | What the agent should produce. This is the task specification. |
| initial_events[].rubric | object | Rubric for grading the quality of an outcome. |
| initial_events[].max_iterations | null | number | Eval→revision cycles before giving up. Default 3, max 20. |
| metadata | object | Arbitrary key-value metadata. Maximum 16 pairs. |
| name | string | Human-readable name. |
| paused_reason | null | object | Why a deployment is paused. Non-null exactly when `status` is `paused`. |
| paused_reason.type | string | |
| paused_reason.error | object | The error that triggered an auto-pause. Matches the failed run's `error.type`. |
| resources | array<object> | Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials. |
| resources[].type | string | |
| resources[].url | string | Github URL of the repository |
| resources[].checkout | null | object | Branch or commit to check out. Defaults to the repository's default branch. |
| resources[].mount_path | null | string | Mount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`. |
| resources[].file_id | string | ID of a previously uploaded file. |
| resources[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| resources[].access | null | string | Access mode for an attached memory store. |
| resources[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| schedule | null | object | 5-field POSIX cron schedule with computed runtime timestamps. |
| schedule.expression | string | 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). |
| schedule.timezone | string | IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). |
| schedule.type | string | |
| schedule.last_run_at | null | string | A timestamp in RFC 3339 format |
| schedule.upcoming_runs_at | array<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. |
| status | string | Lifecycle status of a deployment. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| vault_ids | array<string> | Vault IDs supplying stored credentials for sessions created from this deployment. |
| budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| budget.max_list_cost | object | A monetary amount in a specific currency. |
| budget.type | string |
/anthropic/v1/deployments/{deployment_id}○ Unsupporteddeployment_idstring必填path: Deployment ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this deployment. |
| agent | object | A resolved agent reference with a concrete version. |
| agent.id | string | |
| agent.type | string | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | Description of what the deployment does. |
| environment_id | string | ID of the `environment` where sessions run. |
| initial_events | array<object> | Events sent to each session immediately after creation. |
| initial_events[].content | array<object> | Array of content blocks for the user message. / System content blocks to append. Text-only. |
| initial_events[].type | string | |
| initial_events[].description | string | What the agent should produce. This is the task specification. |
| initial_events[].rubric | object | Rubric for grading the quality of an outcome. |
| initial_events[].max_iterations | null | number | Eval→revision cycles before giving up. Default 3, max 20. |
| metadata | object | Arbitrary key-value metadata. Maximum 16 pairs. |
| name | string | Human-readable name. |
| paused_reason | null | object | Why a deployment is paused. Non-null exactly when `status` is `paused`. |
| paused_reason.type | string | |
| paused_reason.error | object | The error that triggered an auto-pause. Matches the failed run's `error.type`. |
| resources | array<object> | Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials. |
| resources[].type | string | |
| resources[].url | string | Github URL of the repository |
| resources[].checkout | null | object | Branch or commit to check out. Defaults to the repository's default branch. |
| resources[].mount_path | null | string | Mount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`. |
| resources[].file_id | string | ID of a previously uploaded file. |
| resources[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| resources[].access | null | string | Access mode for an attached memory store. |
| resources[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| schedule | null | object | 5-field POSIX cron schedule with computed runtime timestamps. |
| schedule.expression | string | 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). |
| schedule.timezone | string | IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). |
| schedule.type | string | |
| schedule.last_run_at | null | string | A timestamp in RFC 3339 format |
| schedule.upcoming_runs_at | array<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. |
| status | string | Lifecycle status of a deployment. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| vault_ids | array<string> | Vault IDs supplying stored credentials for sessions created from this deployment. |
| budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| budget.max_list_cost | object | A monetary amount in a specific currency. |
| budget.type | string |
/anthropic/v1/deployments/{deployment_id}○ Unsupporteddeployment_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.
idstring必填The `agent` ID.
typestring必填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`.
max_list_costobject必填A monetary amount in a specific currency.
typestring必填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.
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必填vault_idsarray可选Vault IDs. Full replacement. Omit to preserve; send empty array or null to clear. Maximum 50.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this deployment. |
| agent | object | A resolved agent reference with a concrete version. |
| agent.id | string | |
| agent.type | string | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | Description of what the deployment does. |
| environment_id | string | ID of the `environment` where sessions run. |
| initial_events | array<object> | Events sent to each session immediately after creation. |
| initial_events[].content | array<object> | Array of content blocks for the user message. / System content blocks to append. Text-only. |
| initial_events[].type | string | |
| initial_events[].description | string | What the agent should produce. This is the task specification. |
| initial_events[].rubric | object | Rubric for grading the quality of an outcome. |
| initial_events[].max_iterations | null | number | Eval→revision cycles before giving up. Default 3, max 20. |
| metadata | object | Arbitrary key-value metadata. Maximum 16 pairs. |
| name | string | Human-readable name. |
| paused_reason | null | object | Why a deployment is paused. Non-null exactly when `status` is `paused`. |
| paused_reason.type | string | |
| paused_reason.error | object | The error that triggered an auto-pause. Matches the failed run's `error.type`. |
| resources | array<object> | Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials. |
| resources[].type | string | |
| resources[].url | string | Github URL of the repository |
| resources[].checkout | null | object | Branch or commit to check out. Defaults to the repository's default branch. |
| resources[].mount_path | null | string | Mount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`. |
| resources[].file_id | string | ID of a previously uploaded file. |
| resources[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| resources[].access | null | string | Access mode for an attached memory store. |
| resources[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| schedule | null | object | 5-field POSIX cron schedule with computed runtime timestamps. |
| schedule.expression | string | 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). |
| schedule.timezone | string | IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). |
| schedule.type | string | |
| schedule.last_run_at | null | string | A timestamp in RFC 3339 format |
| schedule.upcoming_runs_at | array<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. |
| status | string | Lifecycle status of a deployment. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| vault_ids | array<string> | Vault IDs supplying stored credentials for sessions created from this deployment. |
| budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| budget.max_list_cost | object | A monetary amount in a specific currency. |
| budget.type | string |
/anthropic/v1/deployments/{deployment_id}/archive○ Unsupporteddeployment_idstring必填path: Deployment ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this deployment. |
| agent | object | A resolved agent reference with a concrete version. |
| agent.id | string | |
| agent.type | string | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | Description of what the deployment does. |
| environment_id | string | ID of the `environment` where sessions run. |
| initial_events | array<object> | Events sent to each session immediately after creation. |
| initial_events[].content | array<object> | Array of content blocks for the user message. / System content blocks to append. Text-only. |
| initial_events[].type | string | |
| initial_events[].description | string | What the agent should produce. This is the task specification. |
| initial_events[].rubric | object | Rubric for grading the quality of an outcome. |
| initial_events[].max_iterations | null | number | Eval→revision cycles before giving up. Default 3, max 20. |
| metadata | object | Arbitrary key-value metadata. Maximum 16 pairs. |
| name | string | Human-readable name. |
| paused_reason | null | object | Why a deployment is paused. Non-null exactly when `status` is `paused`. |
| paused_reason.type | string | |
| paused_reason.error | object | The error that triggered an auto-pause. Matches the failed run's `error.type`. |
| resources | array<object> | Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials. |
| resources[].type | string | |
| resources[].url | string | Github URL of the repository |
| resources[].checkout | null | object | Branch or commit to check out. Defaults to the repository's default branch. |
| resources[].mount_path | null | string | Mount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`. |
| resources[].file_id | string | ID of a previously uploaded file. |
| resources[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| resources[].access | null | string | Access mode for an attached memory store. |
| resources[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| schedule | null | object | 5-field POSIX cron schedule with computed runtime timestamps. |
| schedule.expression | string | 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). |
| schedule.timezone | string | IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). |
| schedule.type | string | |
| schedule.last_run_at | null | string | A timestamp in RFC 3339 format |
| schedule.upcoming_runs_at | array<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. |
| status | string | Lifecycle status of a deployment. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| vault_ids | array<string> | Vault IDs supplying stored credentials for sessions created from this deployment. |
| budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| budget.max_list_cost | object | A monetary amount in a specific currency. |
| budget.type | string |
/anthropic/v1/deployments/{deployment_id}/pause○ Unsupporteddeployment_idstring必填path: Deployment ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this deployment. |
| agent | object | A resolved agent reference with a concrete version. |
| agent.id | string | |
| agent.type | string | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | Description of what the deployment does. |
| environment_id | string | ID of the `environment` where sessions run. |
| initial_events | array<object> | Events sent to each session immediately after creation. |
| initial_events[].content | array<object> | Array of content blocks for the user message. / System content blocks to append. Text-only. |
| initial_events[].type | string | |
| initial_events[].description | string | What the agent should produce. This is the task specification. |
| initial_events[].rubric | object | Rubric for grading the quality of an outcome. |
| initial_events[].max_iterations | null | number | Eval→revision cycles before giving up. Default 3, max 20. |
| metadata | object | Arbitrary key-value metadata. Maximum 16 pairs. |
| name | string | Human-readable name. |
| paused_reason | null | object | Why a deployment is paused. Non-null exactly when `status` is `paused`. |
| paused_reason.type | string | |
| paused_reason.error | object | The error that triggered an auto-pause. Matches the failed run's `error.type`. |
| resources | array<object> | Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials. |
| resources[].type | string | |
| resources[].url | string | Github URL of the repository |
| resources[].checkout | null | object | Branch or commit to check out. Defaults to the repository's default branch. |
| resources[].mount_path | null | string | Mount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`. |
| resources[].file_id | string | ID of a previously uploaded file. |
| resources[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| resources[].access | null | string | Access mode for an attached memory store. |
| resources[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| schedule | null | object | 5-field POSIX cron schedule with computed runtime timestamps. |
| schedule.expression | string | 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). |
| schedule.timezone | string | IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). |
| schedule.type | string | |
| schedule.last_run_at | null | string | A timestamp in RFC 3339 format |
| schedule.upcoming_runs_at | array<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. |
| status | string | Lifecycle status of a deployment. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| vault_ids | array<string> | Vault IDs supplying stored credentials for sessions created from this deployment. |
| budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| budget.max_list_cost | object | A monetary amount in a specific currency. |
| budget.type | string |
/anthropic/v1/deployments/{deployment_id}/run○ Unsupporteddeployment_idstring必填path: Deployment ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this run (`drun_...`). |
| agent | object | A resolved agent reference with a concrete version. |
| agent.id | string | |
| agent.type | string | |
| agent.version | number | |
| created_at | string | A timestamp in RFC 3339 format |
| deployment_id | string | ID of the deployment that produced this run. |
| error | null | object | Why the run failed to create a session. The type identifies the failure; message is human-readable detail. |
| error.message | string | Human-readable error description. |
| error.type | string | |
| session_id | null | string | Populated on success. Null on creation failure. Exactly one of `session_id` or `error` is non-null. |
| trigger_context | object | Describes what triggered a deployment run, with trigger-specific metadata. |
| trigger_context.scheduled_at | string | A timestamp in RFC 3339 format |
| trigger_context.type | string | |
| type | string |
/anthropic/v1/deployments/{deployment_id}/unpause○ Unsupporteddeployment_idstring必填path: Deployment ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this deployment. |
| agent | object | A resolved agent reference with a concrete version. |
| agent.id | string | |
| agent.type | string | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| description | null | string | Description of what the deployment does. |
| environment_id | string | ID of the `environment` where sessions run. |
| initial_events | array<object> | Events sent to each session immediately after creation. |
| initial_events[].content | array<object> | Array of content blocks for the user message. / System content blocks to append. Text-only. |
| initial_events[].type | string | |
| initial_events[].description | string | What the agent should produce. This is the task specification. |
| initial_events[].rubric | object | Rubric for grading the quality of an outcome. |
| initial_events[].max_iterations | null | number | Eval→revision cycles before giving up. Default 3, max 20. |
| metadata | object | Arbitrary key-value metadata. Maximum 16 pairs. |
| name | string | Human-readable name. |
| paused_reason | null | object | Why a deployment is paused. Non-null exactly when `status` is `paused`. |
| paused_reason.type | string | |
| paused_reason.error | object | The error that triggered an auto-pause. Matches the failed run's `error.type`. |
| resources | array<object> | Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials. |
| resources[].type | string | |
| resources[].url | string | Github URL of the repository |
| resources[].checkout | null | object | Branch or commit to check out. Defaults to the repository's default branch. |
| resources[].mount_path | null | string | Mount path in the container. Defaults to `/workspace/<repo-name>`. / Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`. |
| resources[].file_id | string | ID of a previously uploaded file. |
| resources[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| resources[].access | null | string | Access mode for an attached memory store. |
| resources[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| schedule | null | object | 5-field POSIX cron schedule with computed runtime timestamps. |
| schedule.expression | string | 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). |
| schedule.timezone | string | IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). |
| schedule.type | string | |
| schedule.last_run_at | null | string | A timestamp in RFC 3339 format |
| schedule.upcoming_runs_at | array<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. |
| status | string | Lifecycle status of a deployment. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| vault_ids | array<string> | Vault IDs supplying stored credentials for sessions created from this deployment. |
| budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| budget.max_list_cost | object | A monetary amount in a specific currency. |
| budget.type | string |
/anthropic/v1/environments◐ PartialOfficial Claude documentation ↗
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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Environment identifier (e.g., 'env_...') |
| data[].archived_at | null | string | RFC 3339 timestamp when environment was archived, or null if not archived |
| data[].config | object | Environment configuration (either Anthropic Cloud or self-hosted) |
| data[].created_at | string | RFC 3339 timestamp when environment was created |
| data[].description | null | string | User-provided description for the environment; null when unset |
| data[].metadata | object | User-provided metadata key-value pairs |
| data[].name | string | Human-readable name for the environment |
| data[].type | string | The type of object (always 'environment') |
| data[].updated_at | string | RFC 3339 timestamp when environment was last updated |
| data[].scope | string | The visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account. |
| next_page | string | null |
/anthropic/v1/environments◐ Partialnamestring必填Human-readable name for the environment
configobject可选Environment configuration
typestring必填Environment type
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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Environment identifier (e.g., 'env_...') |
| archived_at | null | string | RFC 3339 timestamp when environment was archived, or null if not archived |
| config | object | Environment configuration (either Anthropic Cloud or self-hosted) |
| config.networking | object | Network configuration policy. |
| config.packages | object | Package manager configuration. |
| config.type | string | Environment type |
| created_at | string | RFC 3339 timestamp when environment was created |
| description | null | string | User-provided description for the environment; null when unset |
| metadata | object | User-provided metadata key-value pairs |
| name | string | Human-readable name for the environment |
| type | string | The type of object (always 'environment') |
| updated_at | string | RFC 3339 timestamp when environment was last updated |
| scope | string | The visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account. |
/anthropic/v1/environments/{environment_id}○ Unsupportedenvironment_idstring必填path: Environment ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Environment identifier |
| type | string | The type of response |
/anthropic/v1/environments/{environment_id}◐ PartialOfficial Claude documentation ↗
environment_idstring必填path: Environment ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Environment identifier (e.g., 'env_...') |
| archived_at | null | string | RFC 3339 timestamp when environment was archived, or null if not archived |
| config | object | Environment configuration (either Anthropic Cloud or self-hosted) |
| config.networking | object | Network configuration policy. |
| config.packages | object | Package manager configuration. |
| config.type | string | Environment type |
| created_at | string | RFC 3339 timestamp when environment was created |
| description | null | string | User-provided description for the environment; null when unset |
| metadata | object | User-provided metadata key-value pairs |
| name | string | Human-readable name for the environment |
| type | string | The type of object (always 'environment') |
| updated_at | string | RFC 3339 timestamp when environment was last updated |
| scope | string | The visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account. |
/anthropic/v1/environments/{environment_id}◐ Partialenvironment_idstring必填path: Environment ID (path or query parameter).
namestring可选Updated name for the environment
configobject可选Updated environment configuration
typestring必填Environment type
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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Environment identifier (e.g., 'env_...') |
| archived_at | null | string | RFC 3339 timestamp when environment was archived, or null if not archived |
| config | object | Environment configuration (either Anthropic Cloud or self-hosted) |
| config.networking | object | Network configuration policy. |
| config.packages | object | Package manager configuration. |
| config.type | string | Environment type |
| created_at | string | RFC 3339 timestamp when environment was created |
| description | null | string | User-provided description for the environment; null when unset |
| metadata | object | User-provided metadata key-value pairs |
| name | string | Human-readable name for the environment |
| type | string | The type of object (always 'environment') |
| updated_at | string | RFC 3339 timestamp when environment was last updated |
| scope | string | The visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account. |
/anthropic/v1/environments/{environment_id}/archive◐ Partialenvironment_idstring必填path: Environment ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Environment identifier (e.g., 'env_...') |
| archived_at | null | string | RFC 3339 timestamp when environment was archived, or null if not archived |
| config | object | Environment configuration (either Anthropic Cloud or self-hosted) |
| config.networking | object | Network configuration policy. |
| config.packages | object | Package manager configuration. |
| config.type | string | Environment type |
| created_at | string | RFC 3339 timestamp when environment was created |
| description | null | string | User-provided description for the environment; null when unset |
| metadata | object | User-provided metadata key-value pairs |
| name | string | Human-readable name for the environment |
| type | string | The type of object (always 'environment') |
| updated_at | string | RFC 3339 timestamp when environment was last updated |
| scope | string | The visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account. |
/anthropic/v1/environments/{environment_id}/work○ Unsupportedenvironment_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Work identifier (e.g., 'work_...') |
| data[].acknowledged_at | null | string | RFC 3339 timestamp when work was acknowledged by Environment Manager |
| data[].created_at | string | RFC 3339 timestamp when work was created |
| data[].data | object | The actual work to be performed (session or health check) |
| data[].environment_id | string | Environment identifier this work belongs to (e.g., `env_...`) |
| data[].latest_heartbeat_at | null | string | RFC 3339 timestamp of the most recent heartbeat |
| data[].metadata | object | User-provided metadata key-value pairs associated with this work item |
| data[].secret | null | string | Credential 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_at | null | string | RFC 3339 timestamp when work execution started |
| data[].state | string | Current state of the work item |
| data[].stop_requested_at | null | string | RFC 3339 timestamp when stop was requested |
| data[].stopped_at | null | string | RFC 3339 timestamp when work execution stopped |
| data[].type | string | The type of object (always 'work') |
| next_page | string | null |
/anthropic/v1/environments/{environment_id}/work/{work_id}○ Unsupportedenvironment_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Work identifier (e.g., 'work_...') |
| acknowledged_at | null | string | RFC 3339 timestamp when work was acknowledged by Environment Manager |
| created_at | string | RFC 3339 timestamp when work was created |
| data | object | The actual work to be performed (session or health check) |
| data.id | string | Session identifier (e.g., 'session_...') / Health check identifier |
| data.type | string | Type of work data |
| environment_id | string | Environment identifier this work belongs to (e.g., `env_...`) |
| latest_heartbeat_at | null | string | RFC 3339 timestamp of the most recent heartbeat |
| metadata | object | User-provided metadata key-value pairs associated with this work item |
| secret | null | string | Credential 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_at | null | string | RFC 3339 timestamp when work execution started |
| state | string | Current state of the work item |
| stop_requested_at | null | string | RFC 3339 timestamp when stop was requested |
| stopped_at | null | string | RFC 3339 timestamp when work execution stopped |
| type | string | The type of object (always 'work') |
/anthropic/v1/environments/{environment_id}/work/{work_id}○ Unsupportedenvironment_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Work identifier (e.g., 'work_...') |
| acknowledged_at | null | string | RFC 3339 timestamp when work was acknowledged by Environment Manager |
| created_at | string | RFC 3339 timestamp when work was created |
| data | object | The actual work to be performed (session or health check) |
| data.id | string | Session identifier (e.g., 'session_...') / Health check identifier |
| data.type | string | Type of work data |
| environment_id | string | Environment identifier this work belongs to (e.g., `env_...`) |
| latest_heartbeat_at | null | string | RFC 3339 timestamp of the most recent heartbeat |
| metadata | object | User-provided metadata key-value pairs associated with this work item |
| secret | null | string | Credential 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_at | null | string | RFC 3339 timestamp when work execution started |
| state | string | Current state of the work item |
| stop_requested_at | null | string | RFC 3339 timestamp when stop was requested |
| stopped_at | null | string | RFC 3339 timestamp when work execution stopped |
| type | string | The type of object (always 'work') |
/anthropic/v1/environments/{environment_id}/work/{work_id}/ack○ Unsupportedenvironment_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Work identifier (e.g., 'work_...') |
| acknowledged_at | null | string | RFC 3339 timestamp when work was acknowledged by Environment Manager |
| created_at | string | RFC 3339 timestamp when work was created |
| data | object | The actual work to be performed (session or health check) |
| data.id | string | Session identifier (e.g., 'session_...') / Health check identifier |
| data.type | string | Type of work data |
| environment_id | string | Environment identifier this work belongs to (e.g., `env_...`) |
| latest_heartbeat_at | null | string | RFC 3339 timestamp of the most recent heartbeat |
| metadata | object | User-provided metadata key-value pairs associated with this work item |
| secret | null | string | Credential 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_at | null | string | RFC 3339 timestamp when work execution started |
| state | string | Current state of the work item |
| stop_requested_at | null | string | RFC 3339 timestamp when stop was requested |
| stopped_at | null | string | RFC 3339 timestamp when work execution stopped |
| type | string | The type of object (always 'work') |
/anthropic/v1/environments/{environment_id}/work/{work_id}/heartbeat○ Unsupportedenvironment_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| last_heartbeat | string | RFC 3339 timestamp of the actual heartbeat from DB |
| lease_extended | boolean | Whether the heartbeat succeeded in extending the lease |
| state | string | Current state of the work item (active/stopping/stopped) |
| ttl_seconds | number | Effective TTL applied to the lease |
| type | string | The type of response |
/anthropic/v1/environments/{environment_id}/work/{work_id}/stop○ Unsupportedenvironment_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
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Work identifier (e.g., 'work_...') |
| acknowledged_at | null | string | RFC 3339 timestamp when work was acknowledged by Environment Manager |
| created_at | string | RFC 3339 timestamp when work was created |
| data | object | The actual work to be performed (session or health check) |
| data.id | string | Session identifier (e.g., 'session_...') / Health check identifier |
| data.type | string | Type of work data |
| environment_id | string | Environment identifier this work belongs to (e.g., `env_...`) |
| latest_heartbeat_at | null | string | RFC 3339 timestamp of the most recent heartbeat |
| metadata | object | User-provided metadata key-value pairs associated with this work item |
| secret | null | string | Credential 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_at | null | string | RFC 3339 timestamp when work execution started |
| state | string | Current state of the work item |
| stop_requested_at | null | string | RFC 3339 timestamp when stop was requested |
| stopped_at | null | string | RFC 3339 timestamp when work execution stopped |
| type | string | The type of object (always 'work') |
/anthropic/v1/environments/{environment_id}/work/poll○ Unsupportedenvironment_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Work identifier (e.g., 'work_...') |
| acknowledged_at | null | string | RFC 3339 timestamp when work was acknowledged by Environment Manager |
| created_at | string | RFC 3339 timestamp when work was created |
| data | object | The actual work to be performed (session or health check) |
| data.id | string | Session identifier (e.g., 'session_...') / Health check identifier |
| data.type | string | Type of work data |
| environment_id | string | Environment identifier this work belongs to (e.g., `env_...`) |
| latest_heartbeat_at | null | string | RFC 3339 timestamp of the most recent heartbeat |
| metadata | object | User-provided metadata key-value pairs associated with this work item |
| secret | null | string | Credential 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_at | null | string | RFC 3339 timestamp when work execution started |
| state | string | Current state of the work item |
| stop_requested_at | null | string | RFC 3339 timestamp when stop was requested |
| stopped_at | null | string | RFC 3339 timestamp when work execution stopped |
| type | string | The type of object (always 'work') |
/anthropic/v1/environments/{environment_id}/work/stats○ Unsupportedenvironment_idstring必填path: Environment ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| depth | number | Number of work items waiting to be picked up (lag from consumer group) |
| oldest_queued_at | null | string | RFC 3339 timestamp of oldest item in the work stream (includes both queued and pending items), null if stream empty |
| pending | number | Number of work items being processed (polled but not acknowledged) |
| type | string | The type of object |
| workers_polling | null | number | Number of workers that have polled for work in the last 30 seconds. Requires worker_id to be sent with poll requests. |
/anthropic/v1/memory_stores○ Unsupportedcreated_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique 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_at | string | A timestamp in RFC 3339 format |
| data[].name | string | Human-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name. |
| data[].type | string | |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].description | string | 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. Empty string when unset. |
| data[].metadata | object | 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. Returned on retrieve/list but not filterable. |
| next_page | string | null |
/anthropic/v1/memory_stores○ Unsupportednamestring必填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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique 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_at | string | A timestamp in RFC 3339 format |
| name | string | Human-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| archived_at | null | string | A timestamp in RFC 3339 format |
| description | string | 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. Empty string when unset. |
| metadata | object | 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. Returned on retrieve/list but not filterable. |
/anthropic/v1/memory_stores/{memory_store_id}○ Unsupportedmemory_store_idstring必填path: Memory store ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | ID of the deleted memory store (a `memstore_...` identifier). The store and all its memories and versions are no longer retrievable. |
| type | string |
/anthropic/v1/memory_stores/{memory_store_id}○ Unsupportedmemory_store_idstring必填path: Memory store ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique 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_at | string | A timestamp in RFC 3339 format |
| name | string | Human-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| archived_at | null | string | A timestamp in RFC 3339 format |
| description | string | 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. Empty string when unset. |
| metadata | object | 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. Returned on retrieve/list but not filterable. |
/anthropic/v1/memory_stores/{memory_store_id}○ Unsupportedmemory_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique 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_at | string | A timestamp in RFC 3339 format |
| name | string | Human-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| archived_at | null | string | A timestamp in RFC 3339 format |
| description | string | 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. Empty string when unset. |
| metadata | object | 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. Returned on retrieve/list but not filterable. |
/anthropic/v1/memory_stores/{memory_store_id}/archive○ Unsupportedmemory_store_idstring必填path: Memory store ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique 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_at | string | A timestamp in RFC 3339 format |
| name | string | Human-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| archived_at | null | string | A timestamp in RFC 3339 format |
| description | string | 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. Empty string when unset. |
| metadata | object | 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. Returned on retrieve/list but not filterable. |
/anthropic/v1/memory_stores/{memory_store_id}/memories○ Unsupportedmemory_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique 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_sha256 | string | Lowercase 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_bytes | number | Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`. |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].memory_store_id | string | ID of the memory store this memory belongs to (a `memstore_...` value). |
| data[].memory_version_id | string | ID 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[].path | string | Hierarchical 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[].type | string | |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| data[].content | null | string | The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes). |
| next_page | string | null |
/anthropic/v1/memory_stores/{memory_store_id}/memories○ Unsupportedmemory_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory. |
| content_sha256 | string | Lowercase 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_bytes | number | Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`. |
| created_at | string | A timestamp in RFC 3339 format |
| memory_store_id | string | ID of the memory store this memory belongs to (a `memstore_...` value). |
| memory_version_id | string | ID 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. |
| path | string | Hierarchical 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. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| content | null | string | The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes). |
/anthropic/v1/memory_stores/{memory_store_id}/memories/{memory_id}○ Unsupportedmemory_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | ID of the deleted memory (a `mem_...` value). |
| type | string |
/anthropic/v1/memory_stores/{memory_store_id}/memories/{memory_id}○ Unsupportedmemory_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory. |
| content_sha256 | string | Lowercase 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_bytes | number | Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`. |
| created_at | string | A timestamp in RFC 3339 format |
| memory_store_id | string | ID of the memory store this memory belongs to (a `memstore_...` value). |
| memory_version_id | string | ID 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. |
| path | string | Hierarchical 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. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| content | null | string | The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes). |
/anthropic/v1/memory_stores/{memory_store_id}/memories/{memory_id}○ Unsupportedmemory_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.
typestring必填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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory. |
| content_sha256 | string | Lowercase 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_bytes | number | Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`. |
| created_at | string | A timestamp in RFC 3339 format |
| memory_store_id | string | ID of the memory store this memory belongs to (a `memstore_...` value). |
| memory_version_id | string | ID 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. |
| path | string | Hierarchical 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. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| content | null | string | The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes). |
/anthropic/v1/memory_stores/{memory_store_id}/memory_versions○ Unsupportedmemory_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.
pagestring可选query: Pagination cursor taken from the previous response's next_page.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for this version (a `memver_...` value). |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].memory_id | string | ID 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_id | string | ID of the memory store this version belongs to (a `memstore_...` value). |
| data[].operation | string | The 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[].type | string | |
| data[].content | null | string | The 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_sha256 | null | string | Lowercase 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_bytes | null | number | Size 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_by | object | Identifies 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[].path | null | string | The memory's path at the time of this write. `null` if and only if `redacted_at` is set. |
| data[].redacted_at | null | string | A timestamp in RFC 3339 format |
| data[].redacted_by | object | Identifies 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_page | string | null |
/anthropic/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}○ Unsupportedmemory_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this version (a `memver_...` value). |
| created_at | string | A timestamp in RFC 3339 format |
| memory_id | string | ID 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_id | string | ID of the memory store this version belongs to (a `memstore_...` value). |
| operation | string | The 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. |
| type | string | |
| content | null | string | The 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_sha256 | null | string | Lowercase 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_bytes | null | number | Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise. |
| created_by | object | Identifies 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_id | string | ID of the session that performed the write (a `sesn_...` value). Look up the session via Retrieve a session for further provenance. |
| created_by.type | string | |
| created_by.api_key_id | string | ID of the API key that performed the write. This identifies the key, not the secret. |
| created_by.user_id | string | ID of the user who performed the write (a `user_...` value). |
| created_by.service_account_id | string | ID of the service account that performed the write (a `svac_...` value). |
| path | null | string | The memory's path at the time of this write. `null` if and only if `redacted_at` is set. |
| redacted_at | null | string | A timestamp in RFC 3339 format |
| redacted_by | object | Identifies 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_id | string | ID of the session that performed the write (a `sesn_...` value). Look up the session via Retrieve a session for further provenance. |
| redacted_by.type | string | |
| redacted_by.api_key_id | string | ID of the API key that performed the write. This identifies the key, not the secret. |
| redacted_by.user_id | string | ID of the user who performed the write (a `user_...` value). |
| redacted_by.service_account_id | string | ID of the service account that performed the write (a `svac_...` value). |
/anthropic/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact○ Unsupportedmemory_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this version (a `memver_...` value). |
| created_at | string | A timestamp in RFC 3339 format |
| memory_id | string | ID 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_id | string | ID of the memory store this version belongs to (a `memstore_...` value). |
| operation | string | The 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. |
| type | string | |
| content | null | string | The 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_sha256 | null | string | Lowercase 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_bytes | null | number | Size of `content` in bytes as of this version. `null` when `redacted_at` is set or `operation` is `deleted`. Populated regardless of `view` otherwise. |
| created_by | object | Identifies 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_id | string | ID of the session that performed the write (a `sesn_...` value). Look up the session via Retrieve a session for further provenance. |
| created_by.type | string | |
| created_by.api_key_id | string | ID of the API key that performed the write. This identifies the key, not the secret. |
| created_by.user_id | string | ID of the user who performed the write (a `user_...` value). |
| created_by.service_account_id | string | ID of the service account that performed the write (a `svac_...` value). |
| path | null | string | The memory's path at the time of this write. `null` if and only if `redacted_at` is set. |
| redacted_at | null | string | A timestamp in RFC 3339 format |
| redacted_by | object | Identifies 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_id | string | ID of the session that performed the write (a `sesn_...` value). Look up the session via Retrieve a session for further provenance. |
| redacted_by.type | string | |
| redacted_by.api_key_id | string | ID of the API key that performed the write. This identifies the key, not the secret. |
| redacted_by.user_id | string | ID of the user who performed the write (a `user_...` value). |
| redacted_by.service_account_id | string | ID of the service account that performed the write (a `svac_...` value). |
/anthropic/v1/sessions/{session_id}○ Unsupportedsession_idstring必填path: Session ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| type | string |
Call Create session first and replace the example session ID with its returned ID.
/anthropic/v1/sessions/{session_id}◐ PartialOfficial Claude documentation ↗
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).
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`.
max_list_costobject必填Cap on list-call spending within the budget.
typestring必填Budget type; only max_list_cost today.
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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| agent | object | Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time. |
| agent.id | string | |
| agent.description | null | string | |
| agent.mcp_servers | array<object> | |
| agent.model | object | Model identifier and configuration. |
| agent.multiagent | null | object | Resolved coordinator topology with full agent definitions for each roster member. |
| agent.name | string | |
| agent.skills | array<object> | |
| agent.system | null | string | |
| agent.tools | array<object> | |
| agent.type | string | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| budget.max_list_cost | object | A monetary amount in a specific currency. |
| budget.type | string | |
| created_at | string | A timestamp in RFC 3339 format |
| environment_id | string | |
| metadata | object | |
| outcome_evaluations | array<object> | Per-outcome evaluation state. One entry per `define_outcome` event sent to the session. |
| outcome_evaluations[].completed_at | null | string | A timestamp in RFC 3339 format |
| outcome_evaluations[].description | string | What the agent should produce. |
| outcome_evaluations[].explanation | null | string | Grader'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[].iteration | number | 0-indexed revision cycle the outcome is currently on. |
| outcome_evaluations[].outcome_id | string | Server-generated outc_ ID for this outcome. |
| outcome_evaluations[].result | string | Current 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[].type | string | |
| resources | array<object> | |
| resources[].id | string | |
| resources[].created_at | string | A timestamp in RFC 3339 format |
| resources[].mount_path | string | null | string | Filesystem 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[].type | string | |
| resources[].updated_at | string | A timestamp in RFC 3339 format |
| resources[].url | string | |
| resources[].checkout | null | object | |
| resources[].file_id | string | |
| resources[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| resources[].access | null | string | Access mode for an attached memory store. |
| resources[].description | string | Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description. |
| resources[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| resources[].name | null | string | Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource. |
| stats | object | Timing statistics for a session. |
| stats.active_seconds | number | Cumulative time in seconds the session spent in `running` status. Excludes idle time. |
| stats.duration_seconds | number | Elapsed time since session creation in seconds. For terminated sessions, frozen at the final update. |
| status | string | SessionStatus 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. |
| title | null | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| usage | object | Cumulative token usage for a session across all turns. |
| usage.active_seconds | number | Cumulative 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_creation | object | Prompt-cache creation token usage broken down by cache lifetime. |
| usage.cache_read_input_tokens | number | Total tokens read from prompt cache. |
| usage.input_tokens | number | Total input tokens consumed across all turns. |
| usage.list_cost | null | object | A monetary amount in a specific currency. |
| usage.output_tokens | number | Total output tokens generated across all turns. |
| usage.server_tool_use | null | object | Cumulative count of server-executed tool invocations, broken down by tool. |
| vault_ids | array<string> | Vault IDs attached to the session at creation. Empty when no vaults were supplied. |
| deployment_id | null | string | Deployment 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.
/anthropic/v1/sessions/{session_id}/archive● SupportedOfficial Claude documentation ↗
session_idstring必填path: Session ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| agent | object | Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time. |
| agent.id | string | |
| agent.description | null | string | |
| agent.mcp_servers | array<object> | |
| agent.model | object | Model identifier and configuration. |
| agent.multiagent | null | object | Resolved coordinator topology with full agent definitions for each roster member. |
| agent.name | string | |
| agent.skills | array<object> | |
| agent.system | null | string | |
| agent.tools | array<object> | |
| agent.type | string | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| budget.max_list_cost | object | A monetary amount in a specific currency. |
| budget.type | string | |
| created_at | string | A timestamp in RFC 3339 format |
| environment_id | string | |
| metadata | object | |
| outcome_evaluations | array<object> | Per-outcome evaluation state. One entry per `define_outcome` event sent to the session. |
| outcome_evaluations[].completed_at | null | string | A timestamp in RFC 3339 format |
| outcome_evaluations[].description | string | What the agent should produce. |
| outcome_evaluations[].explanation | null | string | Grader'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[].iteration | number | 0-indexed revision cycle the outcome is currently on. |
| outcome_evaluations[].outcome_id | string | Server-generated outc_ ID for this outcome. |
| outcome_evaluations[].result | string | Current 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[].type | string | |
| resources | array<object> | |
| resources[].id | string | |
| resources[].created_at | string | A timestamp in RFC 3339 format |
| resources[].mount_path | string | null | string | Filesystem 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[].type | string | |
| resources[].updated_at | string | A timestamp in RFC 3339 format |
| resources[].url | string | |
| resources[].checkout | null | object | |
| resources[].file_id | string | |
| resources[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| resources[].access | null | string | Access mode for an attached memory store. |
| resources[].description | string | Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description. |
| resources[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| resources[].name | null | string | Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource. |
| stats | object | Timing statistics for a session. |
| stats.active_seconds | number | Cumulative time in seconds the session spent in `running` status. Excludes idle time. |
| stats.duration_seconds | number | Elapsed time since session creation in seconds. For terminated sessions, frozen at the final update. |
| status | string | SessionStatus 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. |
| title | null | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| usage | object | Cumulative token usage for a session across all turns. |
| usage.active_seconds | number | Cumulative 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_creation | object | Prompt-cache creation token usage broken down by cache lifetime. |
| usage.cache_read_input_tokens | number | Total tokens read from prompt cache. |
| usage.input_tokens | number | Total input tokens consumed across all turns. |
| usage.list_cost | null | object | A monetary amount in a specific currency. |
| usage.output_tokens | number | Total output tokens generated across all turns. |
| usage.server_tool_use | null | object | Cumulative count of server-executed tool invocations, broken down by tool. |
| vault_ids | array<string> | Vault IDs attached to the session at creation. Empty when no vaults were supplied. |
| deployment_id | null | string | Deployment ID when the session was created from a deployment reference. Null otherwise. |
/anthropic/v1/sessions/{session_id}/resources◐ Partialsession_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].mount_path | string | null | string | Filesystem 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[].type | string | |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| data[].url | string | |
| data[].checkout | null | object | |
| data[].file_id | string | |
| data[].memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| data[].access | null | string | Access mode for an attached memory store. |
| data[].description | string | Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description. |
| data[].instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| data[].name | null | string | Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource. |
| next_page | string | null |
/anthropic/v1/sessions/{session_id}/resources◐ Partialsession_idstring必填path: Session ID (path or query parameter).
typestring必填query: The request-body field this session resource is added from.
file_idstring必填ID of a previously uploaded file.
mount_pathstring可选Mount path in the container. Defaults to `/mnt/session/uploads/<file_id>`.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| created_at | string | A timestamp in RFC 3339 format |
| file_id | string | |
| mount_path | string | |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
/anthropic/v1/sessions/{session_id}/resources/{resource_id}◐ Partialsession_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| type | string |
/anthropic/v1/sessions/{session_id}/resources/{resource_id}◐ Partialsession_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| created_at | string | A timestamp in RFC 3339 format |
| mount_path | string | null | string | Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| url | string | |
| checkout | null | object | |
| checkout.name | string | Branch name to check out. |
| checkout.type | string | |
| checkout.sha | string | Full commit SHA to check out. |
| file_id | string | |
| memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| access | null | string | Access mode for an attached memory store. |
| description | string | Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description. |
| instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| name | null | string | Display name of the memory store, snapshotted at attach time. Later edits to the store's name do not propagate to this resource. |
/anthropic/v1/sessions/{session_id}/resources/{resource_id}○ Unsupportedsession_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | |
| created_at | string | A timestamp in RFC 3339 format |
| mount_path | string | null | string | Filesystem path where the store is mounted in the session container, e.g. /mnt/memory/user-preferences. Derived from the store's name. Output-only. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| url | string | |
| checkout | null | object | |
| checkout.name | string | Branch name to check out. |
| checkout.type | string | |
| checkout.sha | string | Full commit SHA to check out. |
| file_id | string | |
| memory_store_id | string | The memory store ID (memstore_...). Must belong to the caller's organization and workspace. |
| access | null | string | Access mode for an attached memory store. |
| description | string | Description of the memory store, snapshotted at attach time. Rendered into the agent's system prompt. Empty string when the store has no description. |
| instructions | null | string | Per-attachment guidance for the agent on how to use this store. Rendered into the memory section of the system prompt. Max 4096 chars. |
| name | null | string | Display 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.
/anthropic/v1/sessions/{session_id}/threads◐ PartialOfficial Claude documentation ↗
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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for this thread. |
| data[].agent | object | The resolved agent a `session_thread` runs. |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].parent_thread_id | null | string | Parent thread that spawned this thread. Null for the primary thread. |
| data[].session_id | string | The session this thread belongs to. |
| data[].stats | null | object | Timing statistics for a session thread. |
| data[].status | string | SessionThreadStatus enum |
| data[].type | string | |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| data[].usage | null | object | Cumulative token usage for a session thread across all turns. |
| next_page | string | null |
Call Create session first and replace the example session ID with its returned ID.
/anthropic/v1/sessions/{session_id}/threads/{thread_id}◐ PartialOfficial Claude documentation ↗
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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this thread. |
| agent | object | The resolved agent a `session_thread` runs. |
| agent.model | string | object | The advisor model id. / Model identifier and configuration. |
| agent.type | string | |
| agent.id | string | |
| agent.description | null | string | |
| agent.mcp_servers | array<object> | |
| agent.name | string | |
| agent.skills | array<object> | |
| agent.system | null | string | |
| agent.tools | array<object> | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| parent_thread_id | null | string | Parent thread that spawned this thread. Null for the primary thread. |
| session_id | string | The session this thread belongs to. |
| stats | null | object | Timing statistics for a session thread. |
| stats.active_seconds | number | Cumulative time in seconds the thread spent actively running. Excludes idle time. |
| stats.duration_seconds | number | Elapsed time since thread creation in seconds. For archived threads, frozen at the final update. |
| stats.startup_seconds | number | Time in seconds for the thread to begin running. Zero for child threads, which start immediately. |
| status | string | SessionThreadStatus enum |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| usage | null | object | Cumulative token usage for a session thread across all turns. |
| usage.active_seconds | number | Cumulative time in seconds this thread spent in running status. Equal to `stats.active_seconds`; surfaced here so a thread's usage carries every quantity its cost is priced on. |
| usage.cache_creation | object | Prompt-cache creation token usage broken down by cache lifetime. |
| usage.cache_read_input_tokens | number | Total tokens read from prompt cache. |
| usage.input_tokens | number | Total input tokens consumed across all turns. |
| usage.list_cost | null | object | A monetary amount in a specific currency. |
| usage.output_tokens | number | Total output tokens generated across all turns. |
| usage.server_tool_use | null | object | Cumulative count of server-executed tool invocations, broken down by tool. |
Call Create session first and replace the example session ID with its returned ID.
/anthropic/v1/sessions/{session_id}/threads/{thread_id}/archive◐ PartialOfficial Claude documentation ↗
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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this thread. |
| agent | object | The resolved agent a `session_thread` runs. |
| agent.model | string | object | The advisor model id. / Model identifier and configuration. |
| agent.type | string | |
| agent.id | string | |
| agent.description | null | string | |
| agent.mcp_servers | array<object> | |
| agent.name | string | |
| agent.skills | array<object> | |
| agent.system | null | string | |
| agent.tools | array<object> | |
| agent.version | number | |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| parent_thread_id | null | string | Parent thread that spawned this thread. Null for the primary thread. |
| session_id | string | The session this thread belongs to. |
| stats | null | object | Timing statistics for a session thread. |
| stats.active_seconds | number | Cumulative time in seconds the thread spent actively running. Excludes idle time. |
| stats.duration_seconds | number | Elapsed time since thread creation in seconds. For archived threads, frozen at the final update. |
| stats.startup_seconds | number | Time in seconds for the thread to begin running. Zero for child threads, which start immediately. |
| status | string | SessionThreadStatus enum |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| usage | null | object | Cumulative token usage for a session thread across all turns. |
| usage.active_seconds | number | Cumulative time in seconds this thread spent in running status. Equal to `stats.active_seconds`; surfaced here so a thread's usage carries every quantity its cost is priced on. |
| usage.cache_creation | object | Prompt-cache creation token usage broken down by cache lifetime. |
| usage.cache_read_input_tokens | number | Total tokens read from prompt cache. |
| usage.input_tokens | number | Total input tokens consumed across all turns. |
| usage.list_cost | null | object | A monetary amount in a specific currency. |
| usage.output_tokens | number | Total output tokens generated across all turns. |
| usage.server_tool_use | null | object | Cumulative count of server-executed tool invocations, broken down by tool. |
Call Create session first and replace the example session ID with its returned ID.
/anthropic/v1/sessions/{session_id}/threads/{thread_id}/events◐ PartialOfficial Claude documentation ↗
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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for this event. |
| data[].content | array<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[].type | string | |
| data[].processed_at | null | 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 | string | A timestamp in RFC 3339 format |
| data[].session_thread_id | null | string | string | string | string | string | null | string | string | If 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[].result | string | UserToolConfirmationResult 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_id | string | The 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_message | null | string | Optional message providing context for a 'deny' decision. Only allowed when result is 'deny'. |
| data[].custom_tool_use_id | string | The 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_error | null | boolean | Whether the tool execution resulted in an error. / Whether the model request resulted in an error. / Whether the tool execution resulted in an error. |
| data[].input | object | Input parameters for the tool call. |
| data[].name | string | Name of the custom tool being called. / Name of the MCP tool being used. / Name of the agent tool being used. |
| data[].mcp_server_name | string | Name of the MCP server providing the tool. |
| data[].evaluated_permission | string | AgentEvaluatedPermission enum |
| data[].evaluation | object | Names 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_id | string | The id of the `agent.mcp_tool_use` event this result corresponds to. |
| data[].from_session_thread_id | string | Public `sthr_` ID of the thread that sent the message. |
| data[].from_agent_name | null | string | Name of the callable agent this message came from. Absent when received from the primary agent. |
| data[].to_session_thread_id | string | Public `sthr_` ID of the thread the message was sent to. |
| data[].to_agent_name | null | string | Name of the callable agent this message was sent to. Absent when sent to the primary agent. |
| data[].error | object | |
| data[].stop_reason | object | |
| data[].agent_name | string | Name 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[].iteration | number | 0-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_id | string | The `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[].explanation | string | Human-readable explanation of the verdict. For `needs_revision`, describes which criteria failed and why. |
| data[].outcome_evaluation_start_id | string | The id of the corresponding `span.outcome_evaluation_start` event. |
| data[].usage | object | Token usage for a single model request. / Point-in-time snapshot of a session's cumulative usage. |
| data[].model_request_start_id | string | The id of the corresponding `span.model_request_start` event. |
| data[].model_usage | object | Token usage for a single model request. |
| data[].description | string | What the agent should produce. Copied from the input event. |
| data[].max_iterations | null | number | Evaluate-then-revise cycles before giving up. Default 3, max 20. |
| data[].rubric | object | Rubric for grading the quality of an outcome. |
| data[].agent | null | object | Resolved `agent` definition for a `session`. Snapshot of the `agent` at `session` creation time. |
| data[].budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches `max_list_cost`. |
| data[].metadata | object | The 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[].title | null | string | The session's new title. Present only when the update changed it. |
| next_page | string | null |
Call Create session first and replace the example session ID with its returned ID.
/anthropic/v1/sessions/{session_id}/threads/{thread_id}/stream◐ PartialOfficial Claude documentation ↗
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.
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
Server-sent events
text/event-stream — chunk / event object
No field schema is declared.
/anthropic/v1/skills○ Unsupportedsourcestring可选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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for the skill. The format and length of IDs may change over time. |
| data[].created_at | string | ISO 8601 timestamp of when the skill was created. |
| data[].display_name | string | 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. |
| data[].latest_version_id | string | ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version. |
| data[].source | object | Where 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[].type | string | Object type. For Skills, this is always `"skill"`. |
| data[].updated_at | string | ISO 8601 timestamp of when the skill was last updated. |
| next_page | string | null |
/anthropic/v1/skills○ Unsupportedfilesarray必填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.
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
Successful response
multipart/form-data
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the skill. The format and length of IDs may change over time. |
| created_at | string | ISO 8601 timestamp of when the skill was created. |
| display_name | string | 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. |
| latest_version_id | string | ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version. |
| source | object | Where 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.type | string | Where 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 |
| type | string | Object type. For Skills, this is always `"skill"`. |
| updated_at | string | ISO 8601 timestamp of when the skill was last updated. |
/anthropic/v1/skills/{skill_id}○ Unsupportedskill_idstring必填path: Skill ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the skill. The format and length of IDs may change over time. |
| type | string | Deleted object type. For Skills, this is always `"skill_deleted"`. |
/anthropic/v1/skills/{skill_id}○ Unsupportedskill_idstring必填path: Skill ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the skill. The format and length of IDs may change over time. |
| created_at | string | ISO 8601 timestamp of when the skill was created. |
| display_name | string | 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. |
| latest_version_id | string | ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version. |
| source | object | Where 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.type | string | Where 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 |
| type | string | Object type. For Skills, this is always `"skill"`. |
| updated_at | string | ISO 8601 timestamp of when the skill was last updated. |
/anthropic/v1/skills/{skill_id}/versions○ Unsupportedskill_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for this Skill Version. The id addresses the version in paths and pins it in references. |
| data[].created_at | string | ISO 8601 timestamp of when the skill was created. |
| data[].description | string | Description of the skill version. This is extracted from the SKILL.md file in the skill upload. |
| data[].name | string | The 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_id | string | Unique identifier for the skill. The format and length of IDs may change over time. |
| data[].type | string | Object type. For Skill Versions, this is always `"skill_version"`. |
| next_page | string | null |
/anthropic/v1/skills/{skill_id}/versions○ Unsupportedskill_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.
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
Successful response
multipart/form-data
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this Skill Version. The id addresses the version in paths and pins it in references. |
| created_at | string | ISO 8601 timestamp of when the skill was created. |
| description | string | Description of the skill version. This is extracted from the SKILL.md file in the skill upload. |
| name | string | The 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_id | string | Unique identifier for the skill. The format and length of IDs may change over time. |
| type | string | Object type. For Skill Versions, this is always `"skill_version"`. |
/anthropic/v1/skills/{skill_id}/versions/{version}○ Unsupportedskill_idstring必填path: Skill ID (path or query parameter).
versionstring必填path: Path parameter: the version.
skill_idstring必填query: Skill ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this Skill Version. The id addresses the version in paths and pins it in references. |
| type | string | Deleted object type. For Skill Versions, this is always `"skill_version_deleted"`. |
/anthropic/v1/skills/{skill_id}/versions/{version}○ Unsupportedskill_idstring必填path: Skill ID (path or query parameter).
versionstring必填path: Path parameter: the version.
skill_idstring必填query: Skill ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this Skill Version. The id addresses the version in paths and pins it in references. |
| created_at | string | ISO 8601 timestamp of when the skill was created. |
| description | string | Description of the skill version. This is extracted from the SKILL.md file in the skill upload. |
| name | string | The 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_id | string | Unique identifier for the skill. The format and length of IDs may change over time. |
| type | string | Object type. For Skill Versions, this is always `"skill_version"`. |
/anthropic/v1/skills/{skill_id}/versions/{version}/content○ Unsupportedskill_idstring必填path: Skill ID (path or query parameter).
versionstring必填path: Path parameter: the version.
skill_idstring必填query: Skill ID (path or query parameter).
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
Binary response body
application/octet-stream
| Name | Type | Description |
|---|---|---|
| $ | string (binary) |
/anthropic/v1/tunnels○ Unsupportedinclude_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for the tunnel, prefixed with `tnl_`. |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].display_name | null | string | Human-readable name for the tunnel (1-255 characters). Null if unset. |
| data[].domain | string | Anthropic-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[].type | string | |
| next_page | string | null |
/anthropic/v1/tunnels○ Unsupporteddisplay_namestring可选Optional human-readable name for the tunnel (1-255 characters).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the tunnel, prefixed with `tnl_`. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| display_name | null | string | Human-readable name for the tunnel (1-255 characters). Null if unset. |
| domain | string | Anthropic-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. |
| type | string |
/anthropic/v1/tunnels/{tunnel_id}○ Unsupportedtunnel_idstring必填path: Tunnel ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the tunnel, prefixed with `tnl_`. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| display_name | null | string | Human-readable name for the tunnel (1-255 characters). Null if unset. |
| domain | string | Anthropic-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. |
| type | string |
/anthropic/v1/tunnels/{tunnel_id}/archive○ Unsupportedtunnel_idstring必填path: Tunnel ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the tunnel, prefixed with `tnl_`. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| display_name | null | string | Human-readable name for the tunnel (1-255 characters). Null if unset. |
| domain | string | Anthropic-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. |
| type | string |
/anthropic/v1/tunnels/{tunnel_id}/certificates○ Unsupportedtunnel_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for the certificate, prefixed with `tcrt_`. |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].expires_at | null | string | A timestamp in RFC 3339 format |
| data[].fingerprint | string | Lowercase hex SHA-256 fingerprint of the certificate's DER encoding. |
| data[].tunnel_id | string | ID of the tunnel the certificate is registered against. |
| data[].type | string | |
| next_page | string | null |
/anthropic/v1/tunnels/{tunnel_id}/certificates○ Unsupportedtunnel_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the certificate, prefixed with `tcrt_`. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| expires_at | null | string | A timestamp in RFC 3339 format |
| fingerprint | string | Lowercase hex SHA-256 fingerprint of the certificate's DER encoding. |
| tunnel_id | string | ID of the tunnel the certificate is registered against. |
| type | string |
/anthropic/v1/tunnels/{tunnel_id}/certificates/{certificate_id}○ Unsupportedtunnel_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the certificate, prefixed with `tcrt_`. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| expires_at | null | string | A timestamp in RFC 3339 format |
| fingerprint | string | Lowercase hex SHA-256 fingerprint of the certificate's DER encoding. |
| tunnel_id | string | ID of the tunnel the certificate is registered against. |
| type | string |
/anthropic/v1/tunnels/{tunnel_id}/certificates/{certificate_id}/archive○ Unsupportedtunnel_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the certificate, prefixed with `tcrt_`. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| expires_at | null | string | A timestamp in RFC 3339 format |
| fingerprint | string | Lowercase hex SHA-256 fingerprint of the certificate's DER encoding. |
| tunnel_id | string | ID of the tunnel the certificate is registered against. |
| type | string |
/anthropic/v1/tunnels/{tunnel_id}/reveal_token○ Unsupportedtunnel_idstring必填path: Tunnel ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Stable identifier for the current token value. Changes when the token is rotated. |
| tunnel_token | string | The connector token used to run the tunnel. Treat as a credential. |
| type | string |
/anthropic/v1/tunnels/{tunnel_id}/rotate_token○ Unsupportedtunnel_idstring必填path: Tunnel ID (path or query parameter).
reasonstring可选Optional free-text reason for the rotation, recorded for audit.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Stable identifier for the current token value. Changes when the token is rotated. |
| tunnel_token | string | The connector token used to run the tunnel. Treat as a credential. |
| type | string |
/anthropic/v1/vaults● Supportedinclude_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for the vault. |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].display_name | string | Human-readable name for the vault. |
| data[].metadata | object | Arbitrary key-value metadata attached to the vault. |
| data[].type | string | |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| next_page | string | null |
/anthropic/v1/vaults● Supporteddisplay_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the vault. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| display_name | string | Human-readable name for the vault. |
| metadata | object | Arbitrary key-value metadata attached to the vault. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
/anthropic/v1/vaults/{vault_id}● Supportedvault_idstring必填path: Vault ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier of the deleted vault. |
| type | string |
/anthropic/v1/vaults/{vault_id}● Supportedvault_idstring必填path: Vault ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the vault. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| display_name | string | Human-readable name for the vault. |
| metadata | object | Arbitrary key-value metadata attached to the vault. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
/anthropic/v1/vaults/{vault_id}● Supportedvault_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the vault. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| display_name | string | Human-readable name for the vault. |
| metadata | object | Arbitrary key-value metadata attached to the vault. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
/anthropic/v1/vaults/{vault_id}/archive● Supportedvault_idstring必填path: Vault ID (path or query parameter).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the vault. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| created_at | string | A timestamp in RFC 3339 format |
| display_name | string | Human-readable name for the vault. |
| metadata | object | Arbitrary key-value metadata attached to the vault. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
/anthropic/v1/vaults/{vault_id}/credentials◐ Partialvault_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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | |
| data[].id | string | Unique identifier for the credential. |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].auth | object | Authentication details for a credential. |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].metadata | object | Arbitrary key-value metadata attached to the credential. |
| data[].type | string | |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| data[].vault_id | string | Identifier of the vault this credential belongs to. |
| data[].display_name | null | string | Human-readable name for the credential. |
| next_page | string | null |
/anthropic/v1/vaults/{vault_id}/credentials◐ Partialvault_idstring必填path: Vault ID (path or query parameter).
authobject必填Authentication details for creating a credential.
access_tokenstring必填OAuth access token.
mcp_server_urlstring必填URL of the MCP server this credential authenticates against.
typestring必填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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the credential. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| auth | object | Authentication details for a credential. |
| auth.mcp_server_url | string | URL of the MCP server this credential authenticates against. |
| auth.type | string | |
| auth.expires_at | null | string | A timestamp in RFC 3339 format |
| auth.refresh | null | object | OAuth refresh token configuration returned in credential responses. |
| auth.injection_location | object | Where in the outbound request the secret value is substituted. |
| auth.networking | object | Outbound hosts the secret value is substituted on. |
| auth.secret_name | string | Name of the environment variable. |
| created_at | string | A timestamp in RFC 3339 format |
| metadata | object | Arbitrary key-value metadata attached to the credential. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| vault_id | string | Identifier of the vault this credential belongs to. |
| display_name | null | string | Human-readable name for the credential. |
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"
}/anthropic/v1/vaults/{vault_id}/credentials/{credential_id}◐ Partialvault_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier of the deleted credential. |
| type | string |
/anthropic/v1/vaults/{vault_id}/credentials/{credential_id}◐ Partialvault_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the credential. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| auth | object | Authentication details for a credential. |
| auth.mcp_server_url | string | URL of the MCP server this credential authenticates against. |
| auth.type | string | |
| auth.expires_at | null | string | A timestamp in RFC 3339 format |
| auth.refresh | null | object | OAuth refresh token configuration returned in credential responses. |
| auth.injection_location | object | Where in the outbound request the secret value is substituted. |
| auth.networking | object | Outbound hosts the secret value is substituted on. |
| auth.secret_name | string | Name of the environment variable. |
| created_at | string | A timestamp in RFC 3339 format |
| metadata | object | Arbitrary key-value metadata attached to the credential. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| vault_id | string | Identifier of the vault this credential belongs to. |
| display_name | null | string | Human-readable name for the credential. |
/anthropic/v1/vaults/{vault_id}/credentials/{credential_id}◐ Partialvault_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.
typestring必填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.
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the credential. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| auth | object | Authentication details for a credential. |
| auth.mcp_server_url | string | URL of the MCP server this credential authenticates against. |
| auth.type | string | |
| auth.expires_at | null | string | A timestamp in RFC 3339 format |
| auth.refresh | null | object | OAuth refresh token configuration returned in credential responses. |
| auth.injection_location | object | Where in the outbound request the secret value is substituted. |
| auth.networking | object | Outbound hosts the secret value is substituted on. |
| auth.secret_name | string | Name of the environment variable. |
| created_at | string | A timestamp in RFC 3339 format |
| metadata | object | Arbitrary key-value metadata attached to the credential. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| vault_id | string | Identifier of the vault this credential belongs to. |
| display_name | null | string | Human-readable name for the credential. |
/anthropic/v1/vaults/{vault_id}/credentials/{credential_id}/archive◐ Partialvault_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for the credential. |
| archived_at | null | string | A timestamp in RFC 3339 format |
| auth | object | Authentication details for a credential. |
| auth.mcp_server_url | string | URL of the MCP server this credential authenticates against. |
| auth.type | string | |
| auth.expires_at | null | string | A timestamp in RFC 3339 format |
| auth.refresh | null | object | OAuth refresh token configuration returned in credential responses. |
| auth.injection_location | object | Where in the outbound request the secret value is substituted. |
| auth.networking | object | Outbound hosts the secret value is substituted on. |
| auth.secret_name | string | Name of the environment variable. |
| created_at | string | A timestamp in RFC 3339 format |
| metadata | object | Arbitrary key-value metadata attached to the credential. |
| type | string | |
| updated_at | string | A timestamp in RFC 3339 format |
| vault_id | string | Identifier of the vault this credential belongs to. |
| display_name | null | string | Human-readable name for the credential. |
/anthropic/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate◐ Partialvault_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).
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
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| credential_id | string | Unique identifier of the credential that was validated. |
| has_refresh_token | boolean | Whether the credential has a refresh token configured. |
| mcp_probe | null | object | The failing step of an MCP validation probe. |
| mcp_probe.http_response | null | object | An HTTP response captured during a credential validation probe. |
| mcp_probe.method | string | The MCP method that failed (for example `initialize` or `tools/list`). |
| refresh | null | object | Outcome of a refresh-token exchange attempted during credential validation. |
| refresh.http_response | null | object | An HTTP response captured during a credential validation probe. |
| refresh.status | string | Outcome 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. |
| status | string | Overall verdict of a credential validation probe. |
| type | string | |
| validated_at | string | A timestamp in RFC 3339 format |
| vault_id | string | Identifier of the vault containing the credential. |
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.