Sites (beta)
Beta: Sites websites, theme packages, versions, and publish.
Beta. Sites and first-party theme packages are in beta. Paths and package ids may change before general availability.
REST routes for multi-page websites on styrar.site. Product overview: Sites.
Permissions: Sites uses the workspace Links capabilities (links:read, links:write). The same scopes also cover short links and bio. Analytics routes need analytics:read. See Authentication.
Pass companyId for company workspaces. Omit it for personal Sites (account username required for the public slug).
Plan requirement: API access requires Team or Agency. See pricing.
Base URL: https://api.styrar.com/v1
Routes
| Method | Path | Scope |
|---|---|---|
| GET | /v1/sites | links:read |
| POST | /v1/sites | links:write |
| GET/PATCH/DELETE | /v1/sites/:id | links:read / links:write |
| GET | /v1/sites/templates | links:read |
| GET | /v1/sites/section-catalog | links:read |
| GET | /v1/sites/theme-packages | links:read |
| GET | /v1/sites/theme-packages/:packageId | links:read |
| GET/POST | /v1/sites/theme-presets | links:read / links:write |
| DELETE | /v1/sites/theme-presets/:id | links:write |
| CRUD | /v1/sites/:id/versions/* | links:read / links:write |
| POST | /v1/sites/:id/versions/:versionId/install-theme-package | links:write |
| POST | /v1/sites/:id/versions/:versionId/publish | links:write |
| GET | /v1/analytics/sites | analytics:read |
| GET | /v1/analytics/sites/:id | analytics:read |
POST /v1/sites accepts templateId from structural starters (blank, portfolio, booking, store) or first-party theme packages (styrar.studio, styrar.midnight, styrar.soft, styrar.contrast).
install-theme-package body: { "packageId", "mode": "theme" | "full" }. Use theme to merge colors and fonts only; use full to replace the draft layout with the package sample (pages, sections, and chrome).
Create a site from a theme package
Authorization: Bearer sty_live_your_api_key
Content-Type: application/json
{
"companyId": "clxyz_company",
"title": "Studio site",
"templateId": "styrar.studio"
}Install theme tokens on a draft version
Authorization: Bearer sty_live_your_api_key
Content-Type: application/json
{
"packageId": "styrar.midnight",
"mode": "theme"
}Related
- Sites overview - product guide (beta)
- Theme packages - package structure and CSS variables (beta)
- Sites analytics - metrics
- Endpoints - route catalog by resource
- Authentication - scopes and API keys