API Reference
Marketplace API

Marketplace API

The Marketplace API provides endpoints for browsing, reviewing, submitting, and managing plugins and themes.

All marketplace endpoints are prefixed with /marketplace.


Plugin Marketplace

Browse Plugins

GET /marketplace/browse

Returns a paginated list of published plugins.

Query Parameters:

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber20Items per page (max 100)
searchstringSearch by name/description
categorystringFilter by category slug
sortstringpopularSort order: popular, recent, rating

Response:

{
  "data": [
    {
      "id": "uuid",
      "name": "my-plugin",
      "displayName": "My Plugin",
      "description": "A useful plugin",
      "version": "1.0.0",
      "author": "developer",
      "category": "ai",
      "downloadCount": 1500,
      "averageRating": 4.5,
      "ratingCount": 23,
      "isActive": true
    }
  ],
  "total": 42,
  "page": 1,
  "limit": 20
}

Get Featured Plugins

GET /marketplace/plugins/featured

Returns plugins marked as featured by administrators.

Response: Array of plugin objects.

Get Plugin Categories

GET /marketplace/plugins/categories

Returns a list of all unique plugin categories.

Response:

["ai", "analytics", "communication", "content", "security", "utilities"]

Get Plugin Detail

GET /marketplace/plugins/:id

Returns full details for a single plugin, including rating statistics.

Response:

{
  "id": "uuid",
  "name": "my-plugin",
  "displayName": "My Plugin",
  "description": "A useful plugin",
  "version": "1.0.0",
  "author": "developer",
  "category": "ai",
  "downloadCount": 1500,
  "averageRating": 4.5,
  "ratingCount": 23,
  "isActive": true,
  "homepage": "https://example.com",
  "repository": "https://github.com/example/my-plugin",
  "ratingStats": {
    "averageRating": 4.5,
    "totalReviews": 23,
    "distribution": { "1": 0, "2": 1, "3": 2, "4": 5, "5": 15 }
  }
}

Plugin Reviews

Get Plugin Reviews

GET /marketplace/plugins/:id/reviews

Returns all reviews for a plugin.

Response: Array of review objects:

[
  {
    "pluginId": "uuid",
    "userId": "uuid",
    "rating": 5,
    "title": "Excellent plugin",
    "comment": "Works great!",
    "createdAt": "2025-01-15T10:00:00Z"
  }
]

Submit Plugin Review

POST /marketplace/plugins/:id/reviews

Auth Required: Yes (JWT)

Reviews are upserted — submitting again updates your existing review.

Request Body:

{
  "rating": 5,
  "review": "Works great for my use case."
}

Delete Plugin Review

DELETE /marketplace/plugins/:id/reviews

Auth Required: Yes (JWT) — deletes your own review for this plugin.


Plugin Versioning

Get Plugin Versions

GET /marketplace/plugins/:id/versions

Returns all published versions for a plugin, sorted by release date descending.

Response:

[
  {
    "pluginId": "uuid",
    "version": "1.2.0",
    "changelog": "Added new AI features",
    "compatibility": {
      "minPlatformVersion": "0.1.0",
      "maxPlatformVersion": "1.0.0"
    },
    "downloadUrl": "https://cdn.agentbase.dev/plugins/my-plugin/1.2.0.tgz",
    "fileSize": 45000,
    "checksum": "sha256:abc123...",
    "publishedBy": "uuid",
    "releasedAt": "2025-02-01T12:00:00Z"
  }
]

Get Specific Version

GET /marketplace/plugins/:id/versions/:version

Returns details for a specific plugin version.

Publish Plugin Version

POST /marketplace/plugins/:id/versions

Auth Required: Yes (JWT)

Request Body:

{
  "version": "1.2.0",
  "changelog": "Added new AI features",
  "downloadUrl": "https://cdn.agentbase.dev/plugins/my-plugin/1.2.0.tgz",
  "fileSize": 45000,
  "checksum": "sha256:abc123...",
  "compatibility": {
    "minPlatformVersion": "0.1.0",
    "maxPlatformVersion": "1.0.0"
  }
}

All fields except version are optional.


Theme Marketplace

Browse Themes

GET /marketplace/themes

Returns a paginated list of published themes.

Query Parameters:

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber20Items per page
searchstringSearch by name/description
categorystringFilter by category slug
sortstringpopularSort order: popular, recent, rating

Response:

{
  "data": [
    {
      "id": "uuid",
      "name": "modern-dark",
      "displayName": "Modern Dark",
      "description": "A sleek dark theme",
      "version": "1.0.0",
      "author": "designer",
      "category": "dark",
      "downloadCount": 3200,
      "averageRating": 4.8,
      "ratingCount": 48,
      "previewUrl": "https://cdn.agentbase.dev/themes/modern-dark/preview.png"
    }
  ],
  "total": 15,
  "page": 1,
  "limit": 20
}

Get Featured Themes

GET /marketplace/themes/featured

Returns themes marked as featured by administrators.

Get Theme Categories

GET /marketplace/themes/categories

Returns all unique theme categories.

Get Theme Detail

GET /marketplace/themes/:id

Returns full details for a single theme, including rating statistics.


Theme Reviews

Get Theme Reviews

GET /marketplace/themes/:id/reviews

Submit Theme Review

POST /marketplace/themes/:id/reviews

Auth Required: Yes (JWT)

Reviews are upserted — submitting again updates your existing review.

Request Body:

{
  "rating": 5,
  "review": "Love the design!"
}

Delete Theme Review

DELETE /marketplace/themes/:id/reviews

Auth Required: Yes (JWT) — deletes your own review for this theme.


Developer Submission

Submit Plugin

POST /marketplace/submit/plugin

Auth Required: Yes (JWT)

Submit a new plugin for marketplace review. The plugin enters a review queue before being published.

Request Body:

FieldTypeRequiredDescription
namestringMachine-readable name (slug)
slugstringURL-friendly identifier
versionstringSemVer version (e.g. 1.0.0)
descriptionstringShort description
authorstringAuthor display name
authorUrlstringAuthor website URL
repositoryUrlstringSource code repository URL
iconUrlstringPlugin icon image URL
screenshotsstring[]Array of screenshot URLs
isPaidbooleanWhether the plugin is a paid listing
pricenumberPrice in USD (required if isPaid)
manifestobjectFull plugin manifest JSON
{
  "name": "my-plugin",
  "slug": "my-plugin",
  "version": "1.0.0",
  "description": "A useful AI plugin for Agentbase",
  "author": "Your Name",
  "authorUrl": "https://yoursite.com",
  "repositoryUrl": "https://github.com/you/my-plugin",
  "iconUrl": "https://yoursite.com/icon.png",
  "screenshots": ["https://yoursite.com/screenshot1.png"],
  "isPaid": false
}

Submit Theme

POST /marketplace/submit/theme

Auth Required: Yes (JWT)

Submit a new theme for marketplace review.

Request Body:

FieldTypeRequiredDescription
namestringMachine-readable name
slugstringURL-friendly identifier
versionstringSemVer version
descriptionstringShort description
authorstringAuthor display name
authorUrlstringAuthor website URL
previewUrlstringLive preview URL
iconUrlstringTheme icon image URL
screenshotsstring[]Array of screenshot URLs
categorystringTheme category slug
isPaidbooleanWhether this is a paid listing
pricenumberPrice in USD (required if isPaid)
manifestobjectFull theme manifest JSON
defaultStylesobjectDefault style variables
{
  "name": "my-theme",
  "slug": "my-theme",
  "version": "1.0.0",
  "description": "A beautiful responsive theme",
  "category": "business",
  "previewUrl": "https://preview.example.com",
  "isPaid": false
}

Admin Approval

All admin endpoints require the admin role.

Get Pending Plugins

GET /marketplace/admin/pending/plugins

Auth Required: Yes (JWT + Admin role)

Returns plugins awaiting review. Supports page and limit query parameters.

Approve Plugin

POST /marketplace/admin/plugins/:id/approve

Auth Required: Yes (JWT + Admin role)

Reject Plugin

POST /marketplace/admin/plugins/:id/reject

Auth Required: Yes (JWT + Admin role)

Get Pending Themes

GET /marketplace/admin/pending/themes

Auth Required: Yes (JWT + Admin role)

Returns themes awaiting review. Supports page and limit query parameters.

Approve Theme

POST /marketplace/admin/themes/:id/approve

Auth Required: Yes (JWT + Admin role)

Reject Theme

POST /marketplace/admin/themes/:id/reject

Auth Required: Yes (JWT + Admin role)


Plugin Updates

The platform automatically checks for updates to installed plugins once per day via a background job. The following endpoints expose update state to the UI.

Get Update Count

GET /marketplace/updates/count

Auth Required: Yes (JWT)

Response:

{ "count": 3 }

Get Available Updates

GET /marketplace/updates

Auth Required: Yes (JWT)

Returns installed plugins that have a newer version available on the marketplace.

Response:

[
  {
    "installedPluginId": "uuid",
    "pluginId": "my-plugin",
    "marketplacePluginId": "uuid",
    "latestVersion": "1.2.0",
    "currentVersion": "1.0.0",
    "changelog": "Added new AI features, fixed bug Y"
  }
]

Mark Plugin as Updated

PATCH /marketplace/updates/:installedPluginId/mark-updated

Auth Required: Yes (JWT)

Called after a plugin upgrade completes successfully to clear the pending update flag.

Request Body:

{ "newVersion": "1.2.0" }

Response:

{ "success": true }

Error Responses

All marketplace endpoints return standard error responses:

{
  "statusCode": 404,
  "message": "Plugin not found",
  "error": "Not Found"
}

Common status codes:

CodeDescription
200Success
201Created (submit, publish)
400Bad Request (validation error)
401Unauthorized (missing JWT)
403Forbidden (insufficient role)
404Not Found
409Conflict (duplicate version)