Claude Platform Docs

Плагины

Создание плагина
client.beta.organization.plugins.create(params, options?): BetaPlugin
POST/v1/organizations/plugins

Создаёт плагин, принадлежащий организации, и его первую версию путём загрузки файлов версии.

Получение плагина
client.beta.organization.plugins.retrieve(pluginID, params?, options?): BetaPlugin
GET/v1/organizations/plugins/{plugin_id}

Получает плагин по ID.

Обновление плагина
client.beta.organization.plugins.update(pluginID, params, options?): BetaPlugin
POST/v1/organizations/plugins/{plugin_id}

Изменяет, какая из сохранённых версий плагина, принадлежащего организации, предоставляется участникам, — например, чтобы откатиться к более ранней. Это закрепляет предоставляемую версию: последующие загрузки сохраняются, но больше не меняют предоставляемую версию, а закрепление в настоящее время нельзя отменить ни здесь, ни в claude.ai.

Список плагинов
client.beta.organization.plugins.list(params?, options?): PageCursor<BetaPlugin>
GET/v1/organizations/plugins

Возвращает список плагинов, созданных в организации, начиная с самых новых: как находящихся в собственных маркетплейсах плагинов организации, так и в личных маркетплейсах плагинов участников.

Удаление плагина
client.beta.organization.plugins.delete(pluginID, params?, options?): BetaDeletedPlugin
DELETE/v1/organizations/plugins/{plugin_id}

Безвозвратно удаляет плагин и все его версии — точно так же, как при удалении администратором в claude.ai. Плагин может принадлежать организации или участнику, в том числе участнику, который с тех пор покинул организацию.

Models
interface BetaDeletedPlugin { type: "plugin_deleted"; id }
type: "plugin_deleted"

Always plugin_deleted.

defaultplugin_deleted
id: string

The deleted Plugin's ID.

interface BetaPlugin { type: "plugin"; id; components; /* 16 more */ }
interface BetaPluginAPIActor { type: "api_actor"; api_key_id }
type: "api_actor"

An Admin API key, in the same form the Compliance API activity feed uses for it.

defaultapi_actor
api_key_id: string

The key's ID.

interface BetaPluginComponent { type; description; name }
type: "agent" | "cli" | "command" | 3 more

The kind of component.

One of the following:
"agent"
"cli"
"command"
"hook"
"mcp_server"
"skill"
description: string | null

What the component declares about itself; always null for MCP servers, hooks, and CLIs.

name: string

The component's name: a skill's, command's or agent's name, an MCP server's key in the manifest, the event a hook runs on, or a CLI's executable.

interface BetaPluginContentScan { assessment; reason; status }
assessment: "fail" | "pass" | "unknown" | "warn" | null

The scan's verdict; set only when status is completed.

One of the following:
"fail"
"pass"
"unknown"
"warn"
reason: string | null

The primary mechanism behind a warn or fail, such as credential-exposure or guardrail-tampering; a mechanism this API does not yet name reads as other. Null on a pass, whenever assessment is null, and when no mechanism is reported for the verdict.

status: "completed" | "errored" | "processing"

processing while a scan runs, completed when it ran to completion, errored when it could not run or its outcome cannot be read.

One of the following:
"completed"
"errored"
"processing"
interface BetaPluginOwnerOrganization { type: "organization" }
type: "organization"

The Plugin lives in a plugin marketplace the organization owns.

defaultorganization
interface BetaPluginOwnerUser { type: "user"; user_id }
type: "user"

The Plugin lives in one member's personal plugin marketplace.

defaultuser
user_id: string

The member's User ID.

interface BetaPluginTargetOrganization { type: "organization" }
type: "organization"

Every member of the organization.

defaultorganization
interface BetaPluginTargetOrganizationMember { type: "organization_member"; user_id }
type: "organization_member"

One member of the organization.

defaultorganization_member
user_id: string

The member's User ID.

interface BetaPluginTargetRBACGroup { type: "rbac_group"; rbac_group_id }
type: "rbac_group"

An RBAC Group.

defaultrbac_group
rbac_group_id: string

The RBAC Group's ID.

interface BetaPluginUserActor { type: "user_actor"; email_address; user_id }
type: "user_actor"

A member of the organization.

defaultuser_actor
email_address: string | null

The member's email address; may be null, for example when they are no longer a member of the organization.

user_id: string

The member's User ID.

ПлагиныВерсии

Создание версии плагина
client.beta.organization.plugins.versions.create(pluginID, params, options?): BetaPluginVersion
POST/v1/organizations/plugins/{plugin_id}/versions

Добавляет версию в плагин, принадлежащий организации, путём загрузки файлов новой версии; она становится версией, предоставляемой участникам, если только предоставляемая версия плагина не была закреплена.

Список версий плагина
client.beta.organization.plugins.versions.list(pluginID, params?, options?): PageCursor<BetaPluginVersion>
GET/v1/organizations/plugins/{plugin_id}/versions

Возвращает список версий плагина, начиная с самых новых.

Получение версии плагина
client.beta.organization.plugins.versions.retrieve(version, params, options?): BetaPluginVersion
GET/v1/organizations/plugins/{plugin_id}/versions/{version}

Получает одну версию плагина по её идентификатору или самую новую версию плагина.

Скачивание архива версии плагина
client.beta.organization.plugins.versions.download(version, params, options?): Response
GET/v1/organizations/plugins/{plugin_id}/versions/{version}/content

Скачивает архив .zip одной версии точно в том виде, в каком он хранится. Каждое скачивание плагина из личного маркетплейса плагинов участника записывается в ленту активности Compliance API.

Список параметров установки плагина
client.beta.organization.plugins.installationSettings.list(pluginID, params?, options?): PageCursor<BetaPluginInstallationSetting>
GET/v1/organizations/plugins/{plugin_id}/installation_settings

Возвращает список параметров установки плагина, принадлежащего организации, которые определяют, для каких участников он предназначен, начиная с созданных последними.

Задание параметра установки плагина
client.beta.organization.plugins.installationSettings.set(target, params, options?): BetaPluginInstallationSetting
POST/v1/organizations/plugins/{plugin_id}/installation_settings/{target}

Задаёт или изменяет параметр установки плагина, принадлежащего организации, для всей организации или для одной группы RBAC.

Удаление параметра установки плагина
client.beta.organization.plugins.installationSettings.remove(target, params, options?): BetaDeletedPluginInstallationSetting
DELETE/v1/organizations/plugins/{plugin_id}/installation_settings/{target}

Удаляет собственный параметр установки плагина, принадлежащего организации, для всей организации или для одной группы RBAC.

ПлагиныОбщий доступ

Список предоставлений доступа к плагину
client.beta.organization.plugins.shares.list(pluginID, params?, options?): PageCursor<BetaPluginShare>
GET/v1/organizations/plugins/{plugin_id}/shares

Возвращает список предоставлений общего доступа, выданных владельцем плагина, принадлежащего участнику, — всем участникам организации, группе RBAC или одному участнику, — начиная с предоставленных последними.