設定外掛程式安裝設定
POST/v1/organizations/plugins/{plugin_id}/installation_settings/{target}
Requires
anthropic-beta: ce-plugins-2026-09-01. How to send beta headers為整個組織或單一 RBAC 群組設定或變更組織擁有的外掛程式的安裝設定。
寫入目標本身已有的值不會造成任何變更。
成員擁有的外掛程式使用的是分享而非安裝設定,因此對此類外掛程式,此路徑會傳回 404。
請一次傳送一個外掛程式安裝設定的寫入請求。若同一個外掛程式同時收到多個寫入請求,伺服器會依序處理,並可能對其中部分請求回應 503 而不套用。該 503 會帶有 x-should-retry: true,且該寫入可安全地重複執行:請等待一兩秒後再次傳送。
接受的憑證:具有 write:plugins 範圍的 Admin API 金鑰。
每個請求都必須包含 beta 標頭 anthropic-beta: ce-plugins-2026-09-01。缺少此標頭的請求會傳回 404,與端點不存在時完全相同。外掛程式 API 目前為 beta 版,僅供 Claude Enterprise 組織使用。Claude Platform(Claude Console)組織或已啟用 HIPAA 就緒功能的組織無法使用。
Parameters
Returns
設定外掛程式安裝設定
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;
$client = new Client(apiKey: 'my-anthropic-api-key');
$betaPluginInstallationSetting = $client
->beta
->organization
->plugins
->installationSettings
->set(
'target',
pluginID: 'plugin_id',
installationPreference: 'required',
betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);
var_dump($betaPluginInstallationSetting);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"
}