Claude Platform Docs

外掛程式

建立外掛程式
client.beta.organization.plugins.create(params, options?): BetaPlugin
POST/v1/organizations/plugins

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

取得外掛程式
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}

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

列出 Plugin
client.beta.organization.plugins.list(params?, options?): PageCursor<BetaPlugin>
GET/v1/organizations/plugins

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

刪除 Plugin
client.beta.organization.plugins.delete(pluginID, params?, options?): BetaDeletedPlugin
DELETE/v1/organizations/plugins/{plugin_id}

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

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.

外掛程式版本

建立 Plugin 版本
client.beta.organization.plugins.versions.create(pluginID, params, options?): BetaPluginVersion
POST/v1/organizations/plugins/{plugin_id}/versions

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

列出 Plugin 版本
client.beta.organization.plugins.versions.list(pluginID, params?, options?): PageCursor<BetaPluginVersion>
GET/v1/organizations/plugins/{plugin_id}/versions

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

取得 Plugin 版本
client.beta.organization.plugins.versions.retrieve(version, params, options?): BetaPluginVersion
GET/v1/organizations/plugins/{plugin_id}/versions/{version}

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

下載 Plugin 版本封存檔
client.beta.organization.plugins.versions.download(version, params, options?): Response
GET/v1/organizations/plugins/{plugin_id}/versions/{version}/content

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

外掛程式安裝設定

列出 Plugin 安裝設定
client.beta.organization.plugins.installationSettings.list(pluginID, params?, options?): PageCursor<BetaPluginInstallationSetting>
GET/v1/organizations/plugins/{plugin_id}/installation_settings

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

設定 Plugin 安裝設定
client.beta.organization.plugins.installationSettings.set(target, params, options?): BetaPluginInstallationSetting
POST/v1/organizations/plugins/{plugin_id}/installation_settings/{target}

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

移除 Plugin 安裝設定
client.beta.organization.plugins.installationSettings.remove(target, params, options?): BetaDeletedPluginInstallationSetting
DELETE/v1/organizations/plugins/{plugin_id}/installation_settings/{target}

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

外掛程式分享

列出 Plugin 分享
client.beta.organization.plugins.shares.list(pluginID, params?, options?): PageCursor<BetaPluginShare>
GET/v1/organizations/plugins/{plugin_id}/shares

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