Claude Platform Docs

更新外掛程式

$client->beta->organization->plugins->update(string pluginID, string servedVersionID, ?list<AnthropicBeta> betas): Plugin
POST/v1/organizations/plugins/{plugin_id}
Requires anthropic-beta: ce-plugins-2026-09-01. How to send beta headers

變更向成員提供的組織擁有外掛程式的已儲存版本,例如回復到較早的版本。這會釘選所提供的版本:之後上傳的版本仍會儲存,但不再改變所提供的內容,且目前無法取消釘選,無論在此處或在 claude.ai 中皆然。

以 served_version_id 傳入版本:傳入較早的版本以回復;傳入較新的版本,以開始提供一個已儲存但尚未提供的版本;或傳入目前已提供的版本,以在不改變所提供內容的情況下將其釘選。此操作不會建立新版本。

當組織已啟用內容掃描時,content_scan.status 為 processing 的版本會以 409 拒絕(error_code scan_pending;請在掃描完成後重試)。content_scan.status 為 errored,或 content_scan.assessment 為 fail 或 unknown 的版本會以 400 拒絕(error_code scan_failed);warn 則會被接受。若當下無法讀取掃描結果,請求會改以可重試的 503 失敗。當外掛程式位於組織的程式庫市集中時,若目前所提供版本以外的版本中,有某個技能的名稱已被組織技能(管理員在 claude.ai 中為整個組織上傳的技能)佔用,該版本也會以 409 拒絕:error_code skill_name_taken,該名稱位於 details.skill_name。成員擁有的外掛程式無法在此更新(403)。

此端點不會寫入安裝設定;安裝設定是在 /v1/organizations/plugins/{plugin_id}/installation_settings/{target} 寫入。

接受的憑證:具有 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_).

servedVersionID: string

Serve this version of the Plugin (prefixed pluginver_) and pin the served version to it; latest is not accepted.

betas?: optional list<AnthropicBeta>⁠Header parameter

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

Returns
class Plugin { $type = 'plugin'; $id; $components; /* 16 more */ }
更新外掛程式
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;

$client = new Client(apiKey: 'my-anthropic-api-key');

$betaPlugin = $client->beta->organization->plugins->update(
  'plugin_id',
  servedVersionID: 'pluginver_01KaZmQpRsTuVwXyZ2b4c6d8',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);

var_dump($betaPlugin);
Returns Examples
Response 200
{
  "id": "plugin_01JyHfbRkZvD1gW7oTqXc3Ne",
  "components": [
    {
      "description": "description",
      "name": "review-pr",
      "type": "skill"
    }
  ],
  "content_scan": {
    "assessment": "warn",
    "reason": "credential-exposure",
    "status": "completed"
  },
  "created_at": "2026-03-14T09:26:53.589793Z",
  "created_by": {
    "email_address": "user@example.com",
    "type": "user_actor",
    "user_id": "user_01WxYzAbCdEfGhJkMnPqRsTu"
  },
  "description": "Reviews pull requests against your team's conventions.",
  "display_name": "Code Review Helper",
  "latest_version_id": "pluginver_01KaZmQpRsTuVwXyZ2b4c6d8",
  "manifest_version": "1.2.0",
  "marketplace_id": "marketplace_01HxQ3v9KpZ2mTn8RwLc4Ys7",
  "name": "code-review-helper",
  "organization_installation_preference": "available",
  "organization_installation_preference_inherited": true,
  "owner": {
    "type": "organization"
  },
  "reach": "contained",
  "served_version_id": "pluginver_01K9wPcHd4Rm2Tx8Vq6Ln3Sb",
  "served_version_pinned": true,
  "type": "plugin",
  "updated_at": "2026-03-14T09:26:53.589793Z"
}