建立 Plugin 版本
透過上傳新版本的檔案,為組織擁有的 Plugin 新增版本;除非該 Plugin 所提供的版本已被釘選,否則新版本會成為向成員提供的版本。
上傳格式與建立 Plugin 時相同,皆為 multipart/form-data:包含該版本的檔案(files,每個部分以 files[] 傳送)以及選用的 release_notes。上傳的資訊清單中的 name 必須與 Plugin 的 name 相同。回應會傳回已儲存的版本;請重新讀取 Plugin 以查看其所提供的版本。
只有位於 manual 市集中的 Plugin 可接受上傳;從儲存庫同步的 Plugin 會從儲存庫取得其版本。當 Plugin 位於組織的程式庫市集中時,若某個版本新增的技能名稱與組織技能(管理員在 claude.ai 中為整個組織上傳的技能)相同,該版本會以 409 拒絕:error_code skill_name_taken,該名稱位於 details.skill_name。若傳回 503 且 error_code 為 registration_pending,表示該版本已儲存但尚無法使用;之後在該 Plugin 上建立版本時會完成此程序。
如需實際範例,請參閱 Plugins API 指南中的建立版本。
**接受的憑證:**具有 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
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_version = client.beta.organization.plugins.versions.create(
plugin_id="plugin_id",
files=[b"Example data"],
)
print(beta_plugin_version.id){
"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_01WCz1FkmYMm4gnmykNKUu3Q"
},
"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"
}Returns Examples
{
"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_01WCz1FkmYMm4gnmykNKUu3Q"
},
"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"
}