A template turns your details into a branded PDF, such as a letter or a report. You’ll find your templates under Skills, Templates, alongside the starters Svanja ships with. Use these endpoints to render a document from your own data or turn Word files into templates. To read templates, you need the Templates area, which is included in Full access and Read-only. To render or save them, you need Full access or Templates set to Read and write. See Skills, tools and templates.
Call GET /templates to list the starter templates and your own, or GET /templates/{id} to view a single template along with its fields. Your own templates use the ID format SPACE_ID:path.
Use POST /templates to add templates to a Space. Set action to add_to_space (with space_id and starter_key) to copy a starter into a Space. Set action to import_word (with space_id and paths) to convert Word or OpenDocument files already in a Space into templates.
To render a PDF, call POST /templates/{id}/actions with your own operation_id and the template’s fields under data:
{
"action": "render",
"operation_id": "offer-2026-11",
"data": { "client": "Example Ltd" }
}
Rendering usually runs in the background, and the response returns an operation with its current status. To check the status, send the same request again with the same operation_id (and a new idempotency key, if you use one). Once the status is completed, the response also includes the artifact, which is the finished document under Artifacts. If you’re working from a terminal, see svanja template.