Update Template
Update a template owned by the caller’s workspace.
All fields are optional (omit to keep the stored value). When definition
is supplied it is a full replace — send the complete graph, not a partial
diff. Structural validation runs on write, same as POST /templates.
Restrictions:
- Only the owning workspace may update its templates (403 otherwise).
- Platform starter templates (
is_starter=true) are read-only via this endpoint regardless of workspace ownership (403). - Updates apply only to the draft/live definition; the published gallery snapshot is not updated until an admin republishes.
Requires workspace editor role or higher.
Authentication
Path parameters
Case-sensitive 8-character base62 template identifier.
Headers
Request
Full-replace on PATCH. Omit to keep the stored value. Explicit null is rejected — there is no 'empty graph' use-case worth the ambiguity. The union with null here only makes omission easy for FE clients; see reject_null_definition for the runtime guard.
Response
Response shape. workspace_id is intentionally omitted so the gallery
endpoint (which returns rows from any workspace) does not leak tenant
ownership IDs across tenants. created_by is retained as author
provenance for public/starter rows.
definition is the serialized WorkflowDefinition JSONB (same shape as
Workflow.definition) — a template is a reusable workflow snapshot.

