Base URL
When running locally, API routes are served from your Next.js app:
http://localhost:3011/apiAuthentication
Protected routes require a valid JWT. Include the token in the Authorization header for dashboard and write operations.
Authorization: Bearer <your-jwt-token>Themes API
Manage token themes and Theme Engine packages per tenant. Key routes include:
- GET /api/themes — list token themes (Theme Builder)
- POST /api/themes — create a token theme
- GET /api/themes/[id] — get theme by ID
- PUT /api/themes/[id] — update theme
- POST /api/themes/[id]/duplicate — duplicate a theme
- POST /api/themes/activate — set active token theme
- POST /api/theme-engine/themes/upload — upload Theme Engine ZIP (Dashboard → Themes)
- POST /api/theme-engine/themes/[slug]/activate — activate a Theme Engine package
Full theme ZIP upload uses Theme Engine only. Legacy /api/themes/upload and /api/themes/import routes are removed.
Plugins API
Upload and manage dashboard plugins per tenant. Key routes include:
- GET /api/dashboard/plugins/get-plugins — list installed plugins
- POST /api/dashboard/plugins/upload-plugin — upload plugin ZIP (multipart .zip, max 25 MB)
- PATCH /api/dashboard/plugins/toggle-plugin — enable or disable a plugin
- DELETE /api/dashboard/plugins/remove-plugin — uninstall and remove plugin files
- GET|POST|PUT|PATCH|DELETE /api/plugins/[pluginId]/[[...path]] — backend plugin REST APIs
- GET|POST|PUT|DELETE /api/plugins/[pluginId]/data/[key] — plugin-data JSON storage (frontend-only plugins)
Backend plugins declare npm dependencies in manifest.json. Upload merges package names into the CMS root package.json and may return requiresNpmInstall, pendingDependencies, and addedToPackageJson. Run npm install, restart, then PATCH /api/dashboard/plugins/toggle-plugin to enable. See Plugin Upload.
Sample request
Example theme creation payload (see full samples in the repository):
POST /api/themes
Content-Type: application/json
{
"name": "My Custom Theme",
"slug": "my-custom-theme",
"config": { ... }
}Full reference
Complete sample bodies for all endpoints live in the CMS repository:
API_SAMPLE_BODIES.md on GitHub →