Skip to main content

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.

MethodPathSummary
GET/claude-code/marketplace.jsonServe the plugin catalogue to Claude Code
GET/claude-code/pluginsList the plugins a key may see
POST/claude-code/pluginsRegister 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}/disableDisable a plugin
POST/claude-code/plugins/{plugin_name}/enableEnable 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:

NameInTypeRequiredDescription
keyquerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/claude-code/marketplace.json"

Responses:

StatusDescriptionBody
200The catalogue in the marketplace.json format Claude Code readsapplication/json MarketplaceResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
422Validation Errorapplication/json HTTPValidationError
429One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try againapplication/json ErrorDetail
500The database is not connected, or reading or writing the plugin failedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
namestringYesMarketplace identifier
ownerPluginOwnerYesMarketplace owner
pluginsarray of MarketplacePluginEntryNoAvailable 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:

NameInTypeRequiredDescription
enabled_onlyquerybooleanNo

Example request:

curl -X GET "http://localhost:4000/claude-code/plugins" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The plugins the calling key may see, newest firstapplication/json ListPluginsResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
422Validation Errorapplication/json HTTPValidationError
500The database is not connected, or reading or writing the plugin failedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
pluginsarray of PluginListItemYesPlugins
countintegerYesCount

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):

FieldTypeRequiredDescription
authorPluginAuthor or nullNoPlugin author
categorystring or nullNoPlugin category
descriptionstring or nullNoPlugin description
domainstring or nullNoSkill domain (e.g., 'Productivity')
homepagestring or nullNoPlugin homepage URL
keywordsarray of string or nullNoSearch keywords
namestringYesPlugin name (kebab-case, e.g., 'my-plugin')
namespacestring or nullNoSkill namespace within domain (e.g., 'workflows')
sourceobjectYesPlugin source reference. Supported formats:
versionstring or nullNoSemantic 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:

StatusDescriptionBody
200The plugin was registered and is installable at onceapplication/json RegisterPluginResponse
400The name or the source is invalid, or the skill scan refused the pluginapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
409POST never overwrites an existing pluginapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The database is not connected, or reading or writing the plugin failedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
actionstringYesAction taken (created/updated)
pluginPluginResponseYesPlugin information
statusstringYesOperation 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:

NameInTypeRequiredDescription
plugin_namepathstringYes

Example request:

curl -X GET "http://localhost:4000/claude-code/plugins/plugin_name-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The plugin and its manifestapplication/json PluginDetailResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The plugin is disabled and not granted to the keyapplication/json ErrorDetail
404No plugin has that nameapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The database is not connected, or reading or writing the plugin failedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
authorPluginAuthor or nullNo
categorystring or nullNoCategory
created_atstring or nullNoCreated At
created_bystring or nullNoCreated By
descriptionstring or nullNoDescription
enabledbooleanYesEnabled
homepagestring or nullNoHomepage
idstringYesId
keywordsarray of string or nullNoKeywords
namestringYesName
sourceobject or nullNoSource
updated_atstring or nullNoUpdated At
versionstring or nullNoVersion

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:

NameInTypeRequiredDescription
plugin_namepathstringYes

Request body (application/json, schema UpdatePluginRequest):

FieldTypeRequiredDescription
authorPluginAuthor or nullNoPlugin author
categorystring or nullNoPlugin category
descriptionstring or nullNoPlugin description
domainstring or nullNoSkill domain (e.g., 'Productivity')
homepagestring or nullNoPlugin homepage URL
keywordsarray of string or nullNoSearch keywords
namespacestring or nullNoSkill namespace within domain (e.g., 'workflows')
sourceobjectYesPlugin source reference. Supported formats:
versionstring or nullNoSemantic 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:

StatusDescriptionBody
200The manifest was replaced with the bodyapplication/json RegisterPluginResponse
400The source is invalid, or the skill scan refused the new manifestapplication/json ErrorDetail
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No plugin has that nameapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The database is not connected, or reading or writing the plugin failedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
actionstringYesAction taken (created/updated)
pluginPluginResponseYesPlugin information
statusstringYesOperation 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:

NameInTypeRequiredDescription
plugin_namepathstringYes

Example request:

curl -X DELETE "http://localhost:4000/claude-code/plugins/plugin_name-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200deletedapplication/json PluginStatusResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No plugin has that nameapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The database is not connected, or reading or writing the plugin failedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesWhat happened, naming the plugin
statusstringYesAlways 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:

NameInTypeRequiredDescription
plugin_namepathstringYes

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:

StatusDescriptionBody
200disabledapplication/json PluginStatusResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No plugin has that nameapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The database is not connected, or reading or writing the plugin failedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesWhat happened, naming the plugin
statusstringYesAlways 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:

NameInTypeRequiredDescription
plugin_namepathstringYes

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:

StatusDescriptionBody
200enabledapplication/json PluginStatusResponse
401No valid key or Admin UI session was presentedapplication/json ProxyError
403The key is not a proxy admin keyapplication/json ErrorDetail
404No plugin has that nameapplication/json ErrorDetail
422Validation Errorapplication/json HTTPValidationError
500The database is not connected, or reading or writing the plugin failedapplication/json ErrorDetail

Response fields (200):

FieldTypeRequiredDescription
messagestringYesWhat happened, naming the plugin
statusstringYesAlways success