Templates
Templates are JSON envelopes wrapping .ws definitions with variable schemas. All endpoints scoped to your org.
List
GET
/api/templatesList templates
Returns all templates available to your organization.
Register
POST
/api/templatesRegister template
Create a new template with a variable schema and .ws source.
Request body:
json
{
"name": "demo-card",
"description": "Simple demo card",
"version": "1.0.0",
"variables": [
{ "name": "title", "type": "string", "required": true, "example": "Hello World" },
{ "name": "subtitle", "type": "string", "required": false, "default": "" }
],
"defaults": { "mood": "confident", "aspect": "16:9" },
"source": "define template demo-card [5s]\n background: dark\n show \"{title}\"\n size: display"
}
Get
GET
/api/templates/:nameGet template
Returns the full template envelope including variable schema and source.
Delete
DELETE
/api/templates/:nameDelete template
Removes a template by name.
Next Steps
- Templates and Reuse — guide to template workflows
- Batch Rendering — render N videos from one template