Update Template
Update a template. Owner only; starter templates are read-only.
definition is full-replace (matches WorkflowUpdate — the FE sends the
entire graph back on save). Other fields are partial via exclude_unset.
Update a template. Owner only; starter templates are read-only.
definition is full-replace (matches WorkflowUpdate — the FE sends the
entire graph back on save). Other fields are partial via exclude_unset.
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 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.