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 означает, что версия сохранена, но пока не пригодна к использованию; последующее создание версии этого плагина завершит её регистрацию.

Подробный пример см. в разделе Создание версии руководства по Plugins API.

Принимаемые учётные данные: ключ Admin API с областью write:plugins.

Каждый запрос должен содержать бета-заголовок anthropic-beta: ce-plugins-2026-09-01. Запрос без него возвращает 404 — точно так же, как если бы конечной точки не существовало. Plugins API находится в стадии бета-тестирования и доступен только организациям 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"
}