設定 Plugin 安裝設定
POST/v1/organizations/plugins/{plugin_id}/installation_settings/{target}
為整個組織或單一 RBAC 群組設定或變更組織擁有的 Plugin 的安裝設定。
寫入目標本身已有的值不會造成任何變更。
成員擁有的 Plugin 使用的是分享而非安裝設定,因此對此類 Plugin,此路徑會傳回 404。
請一次傳送一個 Plugin 安裝設定的寫入請求。若同一個 Plugin 同時收到多個寫入請求,伺服器會依序處理,並可能對其中部分請求回應 503 而不套用。該 503 會帶有 x-should-retry: true,且該寫入可安全地重複執行:請等待一兩秒後再次傳送。
**接受的憑證:**具有 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
設定 Plugin 安裝設定
import os
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get(
"ANTHROPIC_API_KEY"
), # This is the default and can be omitted
)
beta_plugin_installation_setting = (
client.beta.organization.plugins.installation_settings.set(
target="target",
plugin_id="plugin_id",
installation_preference="required",
)
)
print(beta_plugin_installation_setting.plugin_id)Response 200
{
"created_at": "2026-03-14T09:26:53.589793Z",
"installation_preference": "required",
"plugin_id": "plugin_01JyHfbRkZvD1gW7oTqXc3Ne",
"target": {
"type": "organization"
},
"type": "plugin_installation_setting",
"updated_at": "2026-03-14T09:26:53.589793Z"
}Returns Examples
Response 200
{
"created_at": "2026-03-14T09:26:53.589793Z",
"installation_preference": "required",
"plugin_id": "plugin_01JyHfbRkZvD1gW7oTqXc3Ne",
"target": {
"type": "organization"
},
"type": "plugin_installation_setting",
"updated_at": "2026-03-14T09:26:53.589793Z"
}