Claude Platform Docs

建立外掛程式版本

$client->beta->organization->plugins->versions->create(string pluginID, list<FileParam | string> files, ?string releaseNotes, ?list<AnthropicBeta> betas): BetaPluginVersion
POST/v1/organizations/plugins/{plugin_id}/versions
Requires anthropic-beta: ce-plugins-2026-09-01. How to send beta headers

透過上傳新版本的檔案,為組織擁有的外掛程式新增版本;除非該外掛程式所提供的版本已被釘選,否則新版本會成為向成員提供的版本。

上傳格式與建立外掛程式時相同,皆為 multipart/form-data:包含該版本的檔案(files,每個部分以 files[] 傳送)以及選用的 release_notes。上傳的資訊清單中的 name 必須與外掛程式的 name 相同。回應會傳回已儲存的版本;請重新讀取外掛程式以查看其所提供的版本。

只有位於 manual 市集中的外掛程式可接受上傳;從儲存庫同步的外掛程式會從儲存庫取得其版本。當外掛程式位於組織的程式庫市集中時,若某個版本新增的技能名稱與組織技能(管理員在 claude.ai 中為整個組織上傳的技能)相同,該版本會以 409 拒絕:error_code skill_name_taken,該名稱位於 details.skill_name。若傳回 503 且 error_code 為 registration_pending,表示該版本已儲存但尚無法使用;之後在該外掛程式上建立版本時會完成此程序。

如需實際範例,請參閱外掛程式 API 指南中的建立版本。

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

files: list<FileParam | string>

The version's files: one part per file, the part's filename being the file's path within the Plugin (for example skills/review-pr/SKILL.md), or a single .zip or .plugin archive holding them all. On the wire each part is named files[], and a part named plain files is not read; with cURL, -F 'files[]=@SKILL.md;filename=skills/review-pr/SKILL.md'. The files must include the manifest, .claude-plugin/plugin.json.

releaseNotes?: optional string

Release notes stored with the version and shown in its version history in claude.ai; up to 5,000 characters.

betas?: optional list<AnthropicBeta>⁠Header parameter

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

Returns
class BetaPluginVersion { $type = 'plugin_version'; $id; $components; /* 9 more */ }
建立外掛程式版本
<?php

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

use Anthropic\Client;
use Anthropic\Beta\AnthropicBeta;
use Anthropic\Core\FileParam;

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

$betaPluginVersion = $client->beta->organization->plugins->versions->create(
  'plugin_id',
  files: [
    FileParam::fromString('Example data', filename: uniqid('file-upload-', true)),
  ],
  releaseNotes: 'release_notes',
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
);

var_dump($betaPluginVersion);
Returns Examples
Response 200
{
  "id": "pluginver_01KaZmQpRsTuVwXyZ2b4c6d8",
  "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",
  "manifest_version": "1.2.0",
  "plugin_id": "plugin_01JyHfbRkZvD1gW7oTqXc3Ne",
  "reach": "contained",
  "release_notes": "Adds a review checklist for database migrations.",
  "type": "plugin_version"
}