Claude code marketplace API
This page documents the 8 gateway endpoints tagged claude_code_marketplace in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.
| Method | Path | Summary |
|---|---|---|
| GET | /claude-code/marketplace.json | Serve the plugin catalogue to Claude Code |
| GET | /claude-code/plugins | List the plugins a key may see |
| POST | /claude-code/plugins | Register a plugin in the marketplace |
| GET | /claude-code/plugins/{plugin_name} | Get one plugin |
| PUT | /claude-code/plugins/{plugin_name} | Replace a plugin's manifest |
| DELETE | /claude-code/plugins/{plugin_name} | Delete a plugin |
| POST | /claude-code/plugins/{plugin_name}/disable | Disable a plugin |
| POST | /claude-code/plugins/{plugin_name}/enable | Enable a plugin |
Endpoints
GET /claude-code/marketplace.json
Serve the plugin catalogue to Claude Code
Give Claude Code the plugin catalogue in its marketplace.json format, so developers can add the gateway as a
plugin marketplace with claude plugin marketplace add <gateway url>/claude-code/marketplace.json and then
install a plugin with claude plugin install <name>@spanway.
Anyone may call it without a key and gets the enabled plugins. With ?key=sk-... the key is checked (an invalid
key gets 401) and the catalogue also lists the disabled plugins granted to that key or its team through
object_permission.skills. Nothing is changed. A plugin whose stored manifest has no source is left out.
Docs (https://docs.spanway.ai/docs/proxy/claude_code_plugins)
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
key | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/claude-code/marketplace.json"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The catalogue in the marketplace.json format Claude Code reads | application/json MarketplaceResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 422 | Validation Error | application/json HTTPValidationError |
| 429 | One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try again | application/json ErrorDetail |
| 500 | The database is not connected, or reading or writing the plugin failed | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Marketplace identifier |
owner | PluginOwner | Yes | Marketplace owner |
plugins | array of MarketplacePluginEntry | No | Available plugins |
GET /claude-code/plugins
List the plugins a key may see
List the marketplace plugins the calling key may see, newest first: every enabled plugin plus the disabled ones
granted to the key or its team through object_permission.skills, and every plugin for a proxy admin. Set
enabled_only=true to leave the disabled ones out. Any valid key may call it. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
enabled_only | query | boolean | No |
Example request:
curl -X GET "http://localhost:4000/claude-code/plugins" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The plugins the calling key may see, newest first | application/json ListPluginsResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The database is not connected, or reading or writing the plugin failed | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
plugins | array of PluginListItem | Yes | Plugins |
count | integer | Yes | Count |
POST /claude-code/plugins
Register a plugin in the marketplace
Add a plugin to the gateway's Claude Code marketplace. The gateway stores only the plugin's name, metadata and where its files live (a GitHub repository, a git URL, a folder inside a git repository, or a zip archive on an HTTPS host), and Claude Code fetches the files from there when a developer installs it.
Only a proxy admin may call it, because the catalogue is served without a key and a new plugin is enabled and
installable by everyone at once. The name must be kebab-case. This route never overwrites: a name that is
already taken answers 409, so change an existing plugin with PUT /claude-code/plugins/{plugin_name}.
The guardrails set for skill scanning read the manifest first, and a refused scan answers 400 with the code
skill_scan_blocked or skill_scan_incomplete and stores nothing.
Docs (https://docs.spanway.ai/docs/proxy/claude_code_plugins)
Request body (application/json, schema RegisterPluginRequest):
| Field | Type | Required | Description |
|---|---|---|---|
author | PluginAuthor or null | No | Plugin author |
category | string or null | No | Plugin category |
description | string or null | No | Plugin description |
domain | string or null | No | Skill domain (e.g., 'Productivity') |
homepage | string or null | No | Plugin homepage URL |
keywords | array of string or null | No | Search keywords |
name | string | Yes | Plugin name (kebab-case, e.g., 'my-plugin') |
namespace | string or null | No | Skill namespace within domain (e.g., 'workflows') |
source | object | Yes | Plugin source reference. Supported formats: |
version | string or null | No | Semantic version |
Example request:
curl -X POST "http://localhost:4000/claude-code/plugins" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"category": "productivity",
"description": "Drafts release notes from merged changes",
"keywords": [
"release",
"changelog"
],
"name": "release-notes",
"source": {
"source": "url",
"url": "https://git.example.com/tools/release-notes.git"
},
"version": "1.2.0"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The plugin was registered and is installable at once | application/json RegisterPluginResponse |
| 400 | The name or the source is invalid, or the skill scan refused the plugin | application/json ErrorDetail |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 409 | POST never overwrites an existing plugin | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The database is not connected, or reading or writing the plugin failed | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Action taken (created/updated) |
plugin | PluginResponse | Yes | Plugin information |
status | string | Yes | Operation status |
GET /claude-code/plugins/{plugin_name}
Get one plugin
Read one marketplace plugin by name, with its source, author, homepage, keywords and who registered it. Any valid key may read an enabled plugin. A disabled plugin answers 403 unless it is granted to the key or its team, or the caller is a proxy admin. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
plugin_name | path | string | Yes |
Example request:
curl -X GET "http://localhost:4000/claude-code/plugins/plugin_name-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The plugin and its manifest | application/json PluginDetailResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The plugin is disabled and not granted to the key | application/json ErrorDetail |
| 404 | No plugin has that name | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The database is not connected, or reading or writing the plugin failed | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
author | PluginAuthor or null | No | |
category | string or null | No | Category |
created_at | string or null | No | Created At |
created_by | string or null | No | Created By |
description | string or null | No | Description |
enabled | boolean | Yes | Enabled |
homepage | string or null | No | Homepage |
id | string | Yes | Id |
keywords | array of string or null | No | Keywords |
name | string | Yes | Name |
source | object or null | No | Source |
updated_at | string or null | No | Updated At |
version | string or null | No | Version |
PUT /claude-code/plugins/{plugin_name}
Replace a plugin's manifest
Replace the whole definition of a marketplace plugin. The name in the path cannot change. This is a full
replace, not a merge: every optional field you leave out is cleared, the version included, so send the complete
definition you want. The enabled state is kept. A name with no plugin answers 404, so create new plugins with
POST /claude-code/plugins.
Only a proxy admin may call it. Developers get the new source the next time Claude Code refreshes the marketplace. The new manifest is scanned like a new plugin, and a refused scan answers 400 and keeps the old one.
Docs (https://docs.spanway.ai/docs/proxy/claude_code_plugins)
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
plugin_name | path | string | Yes |
Request body (application/json, schema UpdatePluginRequest):
| Field | Type | Required | Description |
|---|---|---|---|
author | PluginAuthor or null | No | Plugin author |
category | string or null | No | Plugin category |
description | string or null | No | Plugin description |
domain | string or null | No | Skill domain (e.g., 'Productivity') |
homepage | string or null | No | Plugin homepage URL |
keywords | array of string or null | No | Search keywords |
namespace | string or null | No | Skill namespace within domain (e.g., 'workflows') |
source | object | Yes | Plugin source reference. Supported formats: |
version | string or null | No | Semantic version; cleared if omitted |
Example request:
curl -X PUT "http://localhost:4000/claude-code/plugins/plugin_name-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"category": "productivity",
"description": "Drafts release notes from merged changes",
"keywords": [
"release",
"changelog"
],
"source": {
"source": "url",
"url": "https://git.example.com/tools/release-notes.git"
},
"version": "1.2.0"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The manifest was replaced with the body | application/json RegisterPluginResponse |
| 400 | The source is invalid, or the skill scan refused the new manifest | application/json ErrorDetail |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 404 | No plugin has that name | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The database is not connected, or reading or writing the plugin failed | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Action taken (created/updated) |
plugin | PluginResponse | Yes | Plugin information |
status | string | Yes | Operation status |
DELETE /claude-code/plugins/{plugin_name}
Delete a plugin
Remove a plugin from the marketplace for good. Developers who already installed it keep their local copy, but it can no longer be installed or updated through the gateway. Only a proxy admin may call it. To hide a plugin and keep it, disable it instead.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
plugin_name | path | string | Yes |
Example request:
curl -X DELETE "http://localhost:4000/claude-code/plugins/plugin_name-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | deleted | application/json PluginStatusResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 404 | No plugin has that name | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The database is not connected, or reading or writing the plugin failed | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | What happened, naming the plugin |
status | string | Yes | Always success |
POST /claude-code/plugins/{plugin_name}/disable
Disable a plugin
Hide a plugin from the public marketplace without deleting it. Keys and teams that are granted the plugin
through object_permission.skills still see it. Only a proxy admin may call it.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
plugin_name | path | string | Yes |
Request body (application/json, object):
Example request:
curl -X POST "http://localhost:4000/claude-code/plugins/plugin_name-123/disable" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | disabled | application/json PluginStatusResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 404 | No plugin has that name | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The database is not connected, or reading or writing the plugin failed | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | What happened, naming the plugin |
status | string | Yes | Always success |
POST /claude-code/plugins/{plugin_name}/enable
Enable a plugin
Turn a disabled plugin back on, so it is listed in the marketplace for everyone again. Only a proxy admin may call it. Enabling a plugin that is already on changes nothing but its update time.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
plugin_name | path | string | Yes |
Request body (application/json, object):
Example request:
curl -X POST "http://localhost:4000/claude-code/plugins/plugin_name-123/enable" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | enabled | application/json PluginStatusResponse |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
| 403 | The key is not a proxy admin key | application/json ErrorDetail |
| 404 | No plugin has that name | application/json ErrorDetail |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The database is not connected, or reading or writing the plugin failed | application/json ErrorDetail |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | What happened, naming the plugin |
status | string | Yes | Always success |