Claude Platform Docs

插件市场

列出插件市场
client.Beta.Organization.PluginMarketplaces.List(ctx, params) (*PageCursor[BetaPluginMarketplace], error)
GET/v1/organizations/plugin_marketplaces

列出插件所在的插件市场,按从新到旧排序:包括组织自有的市场及其成员的个人市场。

获取插件市场
client.Beta.Organization.PluginMarketplaces.Get(ctx, marketplaceID, params) (*BetaPluginMarketplace, error)
GET/v1/organizations/plugin_marketplaces/{marketplace_id}

按 ID 检索插件市场。

更新插件市场
client.Beta.Organization.PluginMarketplaces.Update(ctx, marketplaceID, params) (*BetaPluginMarketplace, error)
POST/v1/organizations/plugin_marketplaces/{marketplace_id}

设置组织自有插件市场之一的默认安装设置。该市场中所有没有自身设置的插件(包括之后添加的插件)都会将此默认值作为其组织范围设置。

验证插件市场代码仓库
client.Beta.Organization.PluginMarketplaces.ValidateRepository(ctx, params) (*BetaPluginMarketplaceValidationReport, error)
POST/v1/organizations/plugin_marketplaces/validate_repository

检查存放在公共 GitHub 代码仓库中的插件市场能否同步到 claude.ai,而不会连接或存储该市场。

验证插件市场归档
client.Beta.Organization.PluginMarketplaces.ValidateArchive(ctx, params) (*BetaPluginMarketplaceValidationReport, error)
POST/v1/organizations/plugin_marketplaces/validate_archive

检查以市场目录 .zip 文件形式上传的插件市场能否同步到 claude.ai,而不会连接或存储该市场。

Models
type BetaPluginMarketplace struct { Type: "plugin_marketplace"; ID; CreatedAt; /* 7 more */ }
type BetaPluginMarketplaceValidationPluginError struct { Error; ErrorCode; Name }
Error string

Why the plugin would be skipped by a synchronization.

ErrorCode string

A stable identifier for the reason — the value to branch on.

Name string

The plugin's name, as its entry in marketplace.json declares it.

type BetaPluginMarketplaceValidationPluginWarning struct { ErrorCode; Message }
ErrorCode string

A stable identifier for the kind of warning.

Message string

What would be left out, and why.

type BetaPluginMarketplaceValidationPluginWarnings struct { Name; Warnings }
Name string

The plugin's name, as its entry in marketplace.json declares it.

The parts of the plugin a synchronization would leave out.

ErrorCode string

A stable identifier for the kind of warning.

Message string

What would be left out, and why.

type BetaPluginMarketplaceValidationReport struct { Type: "plugin_marketplace_validation_report"; CommitSha; ManifestError; /* 6 more */ }

The outcome of validating plugin marketplace content: a report, not a stored object, so nothing in it can be retrieved afterwards.