Claude Platform Docs

设置插件安装设置

$client->beta->organization->plugins->installationSettings->set(string target, string pluginID, InstallationPreference installationPreference, ?list<AnthropicBeta> betas): BetaPluginInstallationSetting
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
pluginID: string⁠Path parameter

ID of the Plugin (prefixed plugin_).

target: string⁠Path parameter

The target whose setting is written: the literal organization for the Plugin's organization-wide setting, or an RBAC Group's ID (prefixed rbac_group_) for that group's own setting. Writing the organization target stops the Plugin from inheriting its marketplace's default, even when the value written equals that default.

installationPreference: InstallationPreference

The installation setting the target is to hold for this Plugin: one of required, auto_install, available, not_available.

betas?: optional list<AnthropicBeta>⁠Header parameter

This endpoint is in beta: requests must send ce-plugins-2026-09-01 in this header.

Returns
class BetaPluginInstallationSetting { $type = 'plugin_installation_setting'; $createdAt; $installationPreference; /* 3 more */ }
"plugin_installation_setting" type

Always plugin_installation_setting.

\Datetime createdAt

When the target was first given a setting for this Plugin.

InstallationPreference installationPreference

The setting the target holds for this Plugin. One of required, auto_install, available, not_available; a value this API does not yet name is returned as stored.

string pluginID

The Plugin's ID.

Target target

Whose setting this is: organization (the Plugin's own organization-wide setting) or rbac_group (one RBAC Group's own setting); organization_member does not occur here.

\Datetime updatedAt

When its setting last changed.

设置插件安装设置
<?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);
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"
}