更新插件市场
POST/v1/organizations/plugin_marketplaces/{marketplace_id}
设置组织自有插件市场之一的默认安装设置。该市场中所有没有自身设置的插件(包括之后添加的插件)都会将此默认值作为其组织范围设置。
将其作为 default_installation_preference 传入。成员的个人市场无法在此处更新(403)。
接受的凭据:具有 write:plugins 作用域的 Admin API 密钥。
每个请求都必须包含 beta 标头 anthropic-beta: ce-plugins-2026-09-01。缺少该标头的请求将返回 404,与端点不存在时完全相同。Plugins API 目前处于 beta 阶段,仅适用于 Claude Enterprise 组织。Claude Platform(Claude Console)组织以及启用了 HIPAA 就绪功能的组织无法使用。
Parameters
Returns
更新插件市场
require "anthropic"
anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")
beta_plugin_marketplace = anthropic.beta.organization.plugin_marketplaces.update(
"marketplace_id",
default_installation_preference: :available
)
puts(beta_plugin_marketplace)Response 200
{
"id": "marketplace_01HxQ3v9KpZ2mTn8RwLc4Ys7",
"created_at": "2026-03-14T09:26:53.589793Z",
"default_installation_preference": "available",
"last_sync_ended_at": "2026-03-14T09:26:53.589793Z",
"last_sync_read_sha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
"name": "engineering-tools",
"owner": {
"type": "organization"
},
"source": "github",
"sync_status": "success",
"type": "plugin_marketplace"
}Returns Examples
Response 200
{
"id": "marketplace_01HxQ3v9KpZ2mTn8RwLc4Ys7",
"created_at": "2026-03-14T09:26:53.589793Z",
"default_installation_preference": "available",
"last_sync_ended_at": "2026-03-14T09:26:53.589793Z",
"last_sync_read_sha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
"name": "engineering-tools",
"owner": {
"type": "organization"
},
"source": "github",
"sync_status": "success",
"type": "plugin_marketplace"
}