更新外掛程式市集
POST/v1/organizations/plugin_marketplaces/{marketplace_id}
設定組織自有外掛程式市集之一的預設安裝設定。該市集中每個沒有自身設定的 Plugin(包括之後新增的 Plugin)都會以此預設值作為其全組織設定。
請以 default_installation_preference 傳入。成員的個人市集無法在此更新(403)。
接受的憑證:具有 write:plugins 範圍的 Admin API 金鑰。
每個請求都必須包含 beta 標頭 anthropic-beta: ce-plugins-2026-09-01。缺少此標頭的請求會傳回 404,與端點不存在時完全相同。Plugins API 目前為 beta 版,僅供 Claude Enterprise 組織使用。Claude Platform(Claude Console)組織或已啟用 HIPAA 就緒功能的組織無法使用。
Parameters
Returns
更新外掛程式市集
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go"
"github.com/anthropics/anthropic-sdk-go/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
betaPluginMarketplace, err := client.Beta.Organization.PluginMarketplaces.Update(
context.TODO(),
"marketplace_id",
anthropic.BetaOrganizationPluginMarketplaceUpdateParams{
DefaultInstallationPreference: anthropic.BetaOrganizationPluginMarketplaceUpdateParamsDefaultInstallationPreferenceAvailable,
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", betaPluginMarketplace.ID)
}Response 200
{
"id": "marketplace_01HxQ3v9KpZ2mTn8RwLc4Ys7",
"created_at": "2026-03-14T09:26:53.589793Z",
"default_installation_preference": "available",
"last_sync_ended_at": "2026-03-14T09:26:53.589793Z",
"last_sync_read_sha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
"name": "engineering-tools",
"owner": {
"type": "organization"
},
"source": "github",
"sync_status": "success",
"type": "plugin_marketplace"
}Returns Examples
Response 200
{
"id": "marketplace_01HxQ3v9KpZ2mTn8RwLc4Ys7",
"created_at": "2026-03-14T09:26:53.589793Z",
"default_installation_preference": "available",
"last_sync_ended_at": "2026-03-14T09:26:53.589793Z",
"last_sync_read_sha": "9fceb02d0ae598e95dc970b74767f19372d61af8",
"name": "engineering-tools",
"owner": {
"type": "organization"
},
"source": "github",
"sync_status": "success",
"type": "plugin_marketplace"
}