Claude Platform Docs

外掛程式

建立外掛程式
beta.organization.plugins.create(**kwargs) -> BetaPlugin
POST/v1/organizations/plugins

上傳版本的檔案,以建立組織擁有的外掛程式(Plugin)及其 第一個版本。

取得外掛程式
beta.organization.plugins.retrieve(plugin_id, **kwargs) -> BetaPlugin
GET/v1/organizations/plugins/{plugin_id}

依 ID 擷取外掛程式。

更新外掛程式
beta.organization.plugins.update(plugin_id, **kwargs) -> BetaPlugin
POST/v1/organizations/plugins/{plugin_id}

變更向成員提供的組織擁有 Plugin 的已儲存版本,例如回復到較早的版本。這會釘選所提供的版本:之後上傳的版本仍會儲存,但不再改變所提供的內容,且目前無法取消釘選,無論在此處或在 claude.ai 中皆然。

列出 Plugin
beta.organization.plugins.list(**kwargs) -> PageCursor<BetaPlugin>
GET/v1/organizations/plugins

列出在組織下建立的 Plugin,依最新優先排序:包括組織自有外掛程式市集中的 Plugin,以及成員個人外掛程式市集中的 Plugin。

刪除 Plugin
beta.organization.plugins.delete(plugin_id, **kwargs) -> BetaDeletedPlugin
DELETE/v1/organizations/plugins/{plugin_id}

永久刪除 Plugin 及其所有版本,效果與管理員在 claude.ai 中刪除時完全相同。該 Plugin 可以屬於組織或成員,包括已離開組織的成員。

Models
class BetaDeletedPlugin { type: :plugin_deleted, id }
type: :plugin_deleted

Always plugin_deleted.

id: String

The deleted Plugin's ID.

class BetaPlugin { type: :plugin, id, components, 16 more }
class 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.

api_key_id: String

The key's ID.

class 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

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.

class BetaPluginContentScan { assessment, reason, status }
assessment: :fail | :pass | :unknown | :warn

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

One of the following:
:fail
:pass
:unknown
:warn
reason: String

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
class BetaPluginOwnerOrganization { type: :organization }
type: :organization

The Plugin lives in a plugin marketplace the organization owns.

class BetaPluginOwnerUser { type: :user, user_id }
type: :user

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

user_id: String

The member's User ID.

class BetaPluginTargetOrganization { type: :organization }
type: :organization

Every member of the organization.

class BetaPluginTargetOrganizationMember { type: :organization_member, user_id }
type: :organization_member

One member of the organization.

user_id: String

The member's User ID.

class BetaPluginTargetRBACGroup { type: :rbac_group, rbac_group_id }
type: :rbac_group

An RBAC Group.

rbac_group_id: String

The RBAC Group's ID.

class BetaPluginUserActor { type: :user_actor, email_address, user_id }
type: :user_actor

A member of the organization.

email_address: String

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.

外掛程式版本

建立 Plugin 版本
beta.organization.plugins.versions.create(plugin_id, **kwargs) -> BetaPluginVersion
POST/v1/organizations/plugins/{plugin_id}/versions

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

列出 Plugin 版本
beta.organization.plugins.versions.list(plugin_id, **kwargs) -> PageCursor<BetaPluginVersion>
GET/v1/organizations/plugins/{plugin_id}/versions

列出 Plugin 的版本,依最新優先排序。

取得 Plugin 版本
beta.organization.plugins.versions.retrieve(version, **kwargs) -> BetaPluginVersion
GET/v1/organizations/plugins/{plugin_id}/versions/{version}

依 ID 擷取 Plugin 的某個版本,或擷取 Plugin 的最新版本。

下載 Plugin 版本封存檔
beta.organization.plugins.versions.download(version, **kwargs) -> StringIO
GET/v1/organizations/plugins/{plugin_id}/versions/{version}/content

下載某個版本的 .zip 封存檔,內容與儲存時完全相同。每次從成員個人外掛程式市集下載 Plugin,都會記錄在 Compliance API 活動摘要中。

外掛程式安裝設定

列出 Plugin 安裝設定
beta.organization.plugins.installation_settings.list(plugin_id, **kwargs) -> PageCursor<BetaPluginInstallationSetting>
GET/v1/organizations/plugins/{plugin_id}/installation_settings

列出組織擁有的 Plugin 的安裝設定(用於指定該 Plugin 適用於哪些成員),依建立時間由新到舊排序。

設定 Plugin 安裝設定
beta.organization.plugins.installation_settings.set(target, **kwargs) -> BetaPluginInstallationSetting
POST/v1/organizations/plugins/{plugin_id}/installation_settings/{target}

為整個組織或單一 RBAC 群組設定或變更組織擁有的 Plugin 的安裝設定。

移除 Plugin 安裝設定
beta.organization.plugins.installation_settings.remove(target, **kwargs) -> BetaDeletedPluginInstallationSetting
DELETE/v1/organizations/plugins/{plugin_id}/installation_settings/{target}

移除組織擁有的 Plugin 針對整個組織或單一 RBAC 群組本身的安裝設定。

外掛程式分享

列出 Plugin 分享
beta.organization.plugins.shares.list(plugin_id, **kwargs) -> PageCursor<BetaPluginShare>
GET/v1/organizations/plugins/{plugin_id}/shares

列出成員擁有的 Plugin 的擁有者所提供的分享(分享給組織的所有成員、某個 RBAC 群組或單一成員),依授予時間由新到舊排序。