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.
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 →