API Reference
Programmatic access to the SovereignCMS Marketplace. Manage products, downloads, and integrate with your applications.
Authentication Required: Most API endpoints require an API token.
Generate your token in Account Settings.
Include it in requests as: Authorization: Bearer YOUR_TOKEN
Products
Retrieve a list of all published products.
Query Parameters
{
"success": true,
"data": [
{
"id": 1,
"name": "Neon Theme",
"slug": "neon-theme",
"type": "theme",
"version": "1.0.0",
"price": 0,
"downloads": 1250
}
]
}
Retrieve details for a specific product by its slug.
{
"success": true,
"data": {
"id": 1,
"name": "Neon Theme",
"slug": "neon-theme",
"type": "theme",
"description": "A vibrant neon-styled theme...",
"version": "1.0.0",
"price": 0,
"downloads": 1250,
"author": "developer123",
"created_at": "2024-01-15T10:30:00Z"
}
}
Downloads
Get a download link for a product. Requires authentication and valid purchase/free product access.
Response
List all products purchased by the authenticated user.
{
"success": true,
"data": [
{
"product_id": 5,
"product_name": "Premium Module",
"product_slug": "premium-module",
"purchased_at": "2024-02-20T14:22:00Z",
"price_paid": 19.99
}
]
}
Version Checking
Check the latest version of a product. Useful for auto-update systems.
{
"success": true,
"data": {
"slug": "neon-theme",
"current_version": "1.2.0",
"changelog": "- Fixed mobile responsiveness\n- Added dark mode support",
"released_at": "2024-03-01T09:00:00Z"
}
}
Check multiple products for updates at once.
Request Body
// Request
{
"products": [
{"slug": "neon-theme", "version": "1.0.0"},
{"slug": "chat-module", "version": "2.1.0"}
]
}
// Response
{
"success": true,
"updates": [
{
"slug": "neon-theme",
"current_version": "1.0.0",
"latest_version": "1.2.0",
"update_available": true
}
]
}
Rate Limits
API requests are rate limited to ensure fair usage:
- General API: 100 requests per minute
- Downloads: 20 downloads per hour
- Version checks: 60 requests per minute
Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Error Handling
All API errors follow a consistent format:
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired API token"
}
}
Common Error Codes
UNAUTHORIZED- Missing or invalid API tokenFORBIDDEN- Access denied to this resourceNOT_FOUND- Resource does not existRATE_LIMITED- Too many requestsVALIDATION_ERROR- Invalid request parameters