anthropic
Anthropic API
Remove order_by and order query params from memory list endpoint
The order_by and order query parameters have been removed from the memory list endpoint. Clients passing these parameters will no longer be able to control sort order — the response data description now states items are returned in "a stable, server-defined order" instead. Additionally, a new beta header value agent-memory-2026-07-22 has been added to the list of recognised beta features.
Alert history
- Breaking
Remove order_by and order query params from memory list endpoint
The
order_byandorderquery parameters have been removed from the memory list endpoint. Clients passing these parameters will no longer be able to control sort order — the responsedatadescription now states items are returned in "a stable, server-defined order" instead. Additionally, a new beta header valueagent-memory-2026-07-22has been added to the list of recognised beta features. - Breaking
Beta: memory/environment APIs removed, RefusalCategory enum narrowed
This diff makes several breaking changes to the Beta API surface:
- The
/v1/memory_stores/{memory_store_id}/memories?beta=trueendpoint (POSTBetaCreateMemory) is removed and replaced by a new/v1/sessions?beta=trueendpoint (BetaCreateSession). - Environment webhook paths (
environment.created,environment.updated,environment.archived,environment.deleted) and memory store webhook paths (memory_store.created,memory_store.archived,memory_store.deleted) are removed from the spec entirely, along with their corresponding schemas and discriminator mappings. - The
RefusalCategoryenum loses the"military_weapons"value, which is a breaking change for any code that handles that enum value. requestBodyis now markedrequired: trueon the skill-creation endpoints (clarification, not a behaviour change in practice).
- The
- Breaking
Beta Sessions API replaced by Memory Stores and Memories APIs
The beta endpoint
/v1/sessions?beta=true(operationIdBetaCreateSession) has been removed and replaced by a new/v1/memory_stores/{memory_store_id}/memories?beta=trueendpoint (operationIdBetaCreateMemory). This is a breaking change for any client using the sessions beta — request/response schemas (BetaManagedAgentsCreateSessionParams→BetaManagedAgentsCreateMemoryParams,BetaManagedAgentsSession→BetaManagedAgentsMemory) have changed as well. Additionally, many new beta webhook event types are added (deployment.*,deployment_run.*,environment.*,memory_store.*,agent.updated) and error responses now referenceBetaManagedAgentsErrorResponseinstead ofBetaErrorResponse. - Additive
Add claude-sonnet-5 model option
The
claude-sonnet-5model has been added as a new option for themodelparameter in message completion and agent creation endpoints. This is a new, high-performance model for coding and agents that clients can now specify, expanding the available model choices without breaking existing integrations. - Informational
Documentation URL updates to new platform domain
Documentation links throughout the OpenAPI spec were updated from
docs.claude.comtoplatform.claude.com, and some link paths were refined. This is purely a documentation content change that does not affect API behaviour, request/response schemas, or functionality. - Additive
Add anthropic-user-profile-id header and refusal category
New optional
anthropic-user-profile-idheader parameter added to messages and batch endpoints to support user profile attribution. Newmilitary_weaponsrefusal category added toBetaRefusalCategoryandRefusalCategoryenums. An example value (false) was added to thestreamparameter, and documentation was enhanced for prompt caching TTL and MCP server configuration with references to relevant guides. Theuser_profile_idfield was removed from the request body schema but functionality moves to the header parameter. - Additive
Add session webhook and code execution tool updates
Added new
session.updatedwebhook event type and newCodeExecutionTool_20260521tool variant with REPL state persistence support. The changes also introduce aRefusalCategoryschema type and addBetaWebhookSessionUpdatedEventDatafor handling session update events. All changes are additive and do not break existing functionality. - Breaking
Model enum values removed: claude-opus-4, claude-sonnet-4, claude-3-haiku-20240307
Six model constant values have been removed from the model enum in the OpenAPI spec:
claude-opus-4-0,claude-opus-4-20250514,claude-sonnet-4-0,claude-sonnet-4-20250514, andclaude-3-haiku-20240307. Clients that rely on the spec for validation or SDK generation may break if they treat this enum as exhaustive, and any generated SDK code that exposed these as named constants will no longer compile. Note: the underlying API endpoints may still accept these strings at runtime — the removal is from the spec/enum definition only. - Additive
Add frontier_llm refusal category
The
categoryfield in refusal objects now includes a new enum value"frontier_llm"in addition to the existing"cyber","bio", and"reasoning_extraction"categories. This is backward compatible — clients receiving this new value will encounter a previously unseen enum member, but the field remains optional and the addition does not break existing integrations. - Breaking
Beta API: Sessions endpoint replaced by Memory Stores; webhook schemas gain required field
Several significant breaking changes are present in this beta API update:
/v1/sessions?beta=true(POST) has been replaced by/v1/memory_stores/{memory_store_id}/memories?beta=true(POST) — the old session creation endpoint no longer exists; any integrations calling it will break.- Webhook event data schemas
BetaWebhookSessionThreadCreatedEventData,BetaWebhookSessionThreadIdledEventData, andBetaWebhookSessionThreadTerminatedEventDatanow includesession_thread_idas a required field — consumers that validate or deserialize these payloads strictly may break if they were not already handling this field. - New schemas and endpoints for memory stores, deployments, vaults, and related resources have been added (additive), alongside new error types like
vault_archived_error,vault_not_found_error, andworkspace_archived_error.
- Additive
Add server-side fallback and fallback-credit features
The API adds opt-in server-side fallback retry capabilities via two new request parameters (
fallbacksandfallback_credit_token), introduces new schema types for fallback configuration and responses, and adds two new model identifiers (claude-fable-5andclaude-mythos-5). A new response block typeBetaResponseFallbackBlockis added, along with a new iteration usage typeBetaFallbackMessageIterationUsage. The refusal category enum gainsreasoning_extractionas a new option, andclaude-mythos-previewis deprecated. All changes are backward-compatible additions. - Additive
Add error_message field to RequestToolSearchToolResultError
A new optional
error_messagefield (nullable string) has been added to theRequestToolSearchToolResultErrorresponse schema. Additionally, thex-api-keyheader was reordered to appear after theanthropic-betaheader in the parameter lists of multiple endpoints (a non-breaking schema reordering). These changes are purely additive and do not break existing integrations. - Deprecation
Two Opus 4.1 model variants marked deprecated
The
claude-opus-4-1andclaude-opus-4-1-20250805model identifiers are now marked as deprecated in the OpenAPI spec with an August 5, 2026 end-of-life date. Existing code using these models will continue to work, but clients should migrate to newer models before the deadline. - Additive
Add output_tokens_details, mid_conv_system, and claude-opus-4-8 model
The Anthropic API adds several features: (1) new optional response field
output_tokens_detailsin usage objects to break down output tokens by category (e.g., thinking tokens); (2) newmid_conv_systemrequest/response block type for mid-conversation system instructions with cache control support; (3) newclaude-opus-4-8model option; (4) newstop_reasonfields in advisor result blocks; and (5) newurl_not_in_prior_contexterror code. All changes are backward-compatible additions — existing integrations continue to work unchanged. - Breaking
Beta user profile endpoints restructured; new thinking token count field added
This diff contains several changes across the beta API:
- Removed endpoints:
POST /v1/user_profiles?beta=true(Create User Profile) andGET /v1/user_profiles?beta=true(List User Profiles) have been removed from the spec; clients calling these beta endpoints will break. - New endpoint:
POST /v1/user_profiles/{user_profile_id}/enrollment_url?beta=true(BetaCreateEnrollmentUrl) has been added. - New required field:
estimated_tokensis now listed inrequiredonBetaThinkingContentBlockDelta, with a new beta flagthinking-token-count-2026-05-13; clients that deserialize this schema strictly may fail if they don't expect this field. - The
BetaTrustGrant.statusenum (active,pending,rejected) ordering changed cosmetically but no values were added or removed.
- Removed endpoints:
- Additive
New skill version download endpoint and work queue APIs
Added new beta endpoints for skill version content download (
GET /v1/skills/{skill_id}/versions/{version}/content) and work queue management including stats retrieval, work polling, completion, stopping, and metadata updates for self-hosted environments. Also added new schema definitions (BetaSelfHostedWorkQueueStats,BetaSelfHostedWorkUpdateRequest,BetaSessionWorkData) and agent toolset input types for managed agents. These are purely additive changes with no breaking modifications to existing APIs. - Additive
Add prompt cache diagnostics and search result support
Added new optional
diagnosticsrequest/response fields to the messages API for troubleshooting prompt cache misses, along with six new cache miss reason schema types (BetaCacheMissMessagesChanged,BetaCacheMissModelChanged,BetaCacheMissPreviousMessageNotFound,BetaCacheMissSystemChanged,BetaCacheMissToolsChanged,BetaCacheMissUnavailable). Also added support forsearch_resultblocks in managed agents with new schemasBetaManagedAgentsSearchResultBlock,BetaManagedAgentsSearchResultCitations, andBetaManagedAgentsSearchResultContent, plus a new beta feature flagcache-diagnosis-2026-04-07. All additions are optional and backward-compatible. - Additive
Fast mode now supports Claude Opus 4.7
Claude Opus 4.7 is now available in fast mode (research preview) via the
claude-opus-4-7model identifier with thefast-mode-2026-02-01beta header. This is a new optional model choice that does not affect existing integrations using earlier models.