Publish a template version
publish_templateMake a template version live for rendering. Called with no version, it snapshots the current draft into a new version and points published_version at it — this is how you ship an edit made with update_template. Called with an existing version, it republishes that earlier snapshot and leaves the draft alone. Reach for rollback_template instead when you are reverting a bad release: only that tool offers the concurrency fence and the option to restore the draft as well. Takes a template UUID or slug, same as every other /v1/templates route. Returns { templateId, publishedVersion, publishedVersionId, latestVersion, publishedAt }. Requires a Kamy API key with the templates:write scope; without a key, returns dashboard setup instructions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| version | No | Omit to snapshot the current draft into a new version and publish that. Supply an existing version number to republish a known-good earlier snapshot, leaving the draft untouched. | |
| templateId | Yes | Template UUID or slug — every /v1/templates route resolves either. |