Themes
ThemePacks encode brand identity as JSON. All endpoints scoped to your org.
List
GET
/api/themesList themes
Returns all ThemePacks available to your organization, including built-in themes.
Register
POST
/api/themesRegister ThemePack
Create a new ThemePack. Validated before registration.
Request body:
json
{
"schema": "themepack.v1",
"name": "acme-brand",
"version": "1.0.0",
"palette": {
"primary": "#1A1A2E",
"accent": "#E94560",
"background": "#FFFFFF",
"backgroundDark": "#0A0A0A",
"muted": "#888888",
"contrast": "#FFFFFF"
},
"typography": { "families": { "sans": "Space Grotesk" } }
}
Get
GET
/api/themes/:nameGet ThemePack
Returns the full ThemePack JSON.
Update
PUT
/api/themes/:nameUpdate ThemePack
Replace an existing ThemePack.
Delete
DELETE
/api/themes/:nameDelete ThemePack
Removes a ThemePack by name.
Validate (Dry Run)
POST
/api/themes/validateValidate ThemePack
Check schema validity without registering.
Response:
json
{ "valid": true, "errors": [] }
Compiling with a ThemePack
Pass the theme parameter to compile or render:
bash
curl -X POST https://api.ws.video/api/compile \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-org-id: YOUR_ORG_ID" \
-d '{ "source": "Film \"Demo\"\n mood: confident\n\nScene \"Hello\"\n show \"Hello World\"\n size: hero", "theme": "acme-brand" }'
Next Steps
- Brand Governance — the full brand-as-code workflow
- ThemePacks — how ThemePacks compose with moods