创建插件版本
POST/v1/organizations/plugins/{plugin_id}/versions
通过上传新版本的文件为组织所有的插件添加一个版本;除非该插件的提供版本已被固定,否则新版本将成为向成员提供的版本。
上传格式与创建插件时相同,均为 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 表示该版本已存储但尚不可用;之后在该插件上再次创建版本即可完成该操作。
有关完整示例,请参阅 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)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_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
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_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"
}