Operating system set to macOS
Documentation jurisdiction set to United States
Sign inConnect Claude

Update Template Api V1 Workstreams Templates Template Id Patch

patch/api/v1/workstreams/templates/{template_id}

Update template

Update an existing workflow template. Only provided fields will be updated. Omitted fields remain unchanged. **Authentication Required:** JWT Bearer token

Path parameters

template_idrequired
path
—

Request bodyapplication/json

FieldTypeDescription
namestring | nullTemplate name
descriptionstring | nullTemplate description
category"compliance" | "advisory" | "audit" | "bookkeeping" | "tax" | "internal" | nullTemplate category (closed taxonomy; off-taxonomy input is mapped)
stepsTaskStepDefinition | ToolCallStepDefinition | ArchieQueryStepDefinition | NotifyStepDefinition | ConditionalStepDefinition | LoopStepDefinition | ParallelStepDefinition | ApprovalStepDefinition | DocumentUploadStepDefinition | StageStepDefinition | GotoStepDefinition | SubWorkStreamStepDefinition | DeterministicExtractionStepDefinition | VerificationStepDefinition | EmailSendStepDefinition | WaitForReplyStepDefinition | SkillStepDefinition | AgentRunStepDefinition[] | nullWDL step definitions
default_configobject | nullDefault configuration
tagsstring[] | nullTemplate tags
input_schemaobject[] | nullDeclared workstream inputs (array of InputDef).
output_schemaobject[] | nullDeclared workstream outputs (array of OutputDef).
status"draft" | "active" | "paused" | "archived" | nullTemplate status
change_summarystring | nullCaller-supplied version-history note (e.g. 'Revised from cycle <id>: …'). Falls back to the auto-computed field list when omitted.

Responses

200Template updated successfully
FieldTypeDescription
idrequiredstring (uuid)Template UUID
slugstring | nullHuman-readable URL key (e.g. 'asc-606-review'). Stable + globally unique; resolvable by GET /templates/{id}. Link the FE here, not the UUID.
permakeystring | nullStable opaque short id (7-char); the cross-entity permalink, also resolvable.
namerequiredstringTemplate name
descriptionstring | nullTemplate description
category"compliance" | "advisory" | "audit" | "bookkeeping" | "tax" | "internal" | nullTemplate category (closed taxonomy: compliance/advisory/audit/bookkeeping/tax/internal). NULL = genuinely uncategorised (no category set); 'internal' = an off-taxonomy value mapped to the catch-all bucket — the two are distinct (NULL is NOT coerced to 'internal').
stepsobject[]WDL step definitions
item shape
Empty object.
default_configobjectDefault configuration
show nested
Empty object.
tagsstring[]Template tags
input_schemaobject[]Declared workstream inputs (array of InputDef: name/type/required/...).
item shape
Empty object.
output_schemaobject[]Declared workstream outputs for the Outputs tab (array of OutputDef: name/label/type/format/...). Empty ⇒ no Outputs tab.
item shape
Empty object.
forked_fromobject | nullProvenance: parent recipe {name, version} this was forked from. NULL when not a fork.
upstream_updateobject | null{version, note} when the fork's parent has advanced past the fork point. NULL when none/uncomputable.
is_templatebooleanAlways true for templates
domainstring | nullDomainAgent knowledge-key backing this recipe (e.g. 'ita_2007_eis'), resolved from the linked job_definition.domain via its most-recent cycle and surfaced ONLY when it maps to a real DomainAgent persona. NULL for fixed-step recipes and generic agentic containers (the 'workstream'/'general' placeholder domains) — which are NOT WorkPlan-able. The WorkPlan-create picker filters to `domain != null`.
statusrequired"draft" | "active" | "paused" | "archived"Status for workstream entities.
draftactivepausedarchived
versionintegerTemplate version, incremented on each update
active_blueprint_countintegerNumber of active linked workplans for this template
total_runsintegerCount of cycles ever launched from this template (run count).
total_instancesintegerAggregate instance count across all cycles. Each backend cycle is one instance run, so this equals total_runs today; kept distinct so the FE contract is stable if job-level fan-out grouping lands later.
last_run_atstring (date-time) | nullStart (or creation) timestamp of the most recent cycle. NULL if never run.
last_run_state"created" | "planning" | "queued" | "running" | "paused" | "blocked" | "completed" | "failed" | "cancelled" | "skipped" | nullStatus of the most recent cycle, for the 'last run' badge. NULL if never run.
avg_instance_costnumberAverage customer-facing cost (GBP) across runs: mean of £19/hr x elapsed per cycle. Mirrors CycleResponse.customer_cost_gbp.
cycle_idsstring (uuid)[]Cycle ids that have run this template, most recent first (capped).
created_byrequiredstring (uuid)Creator user ID
created_by_namestring | nullCreator display name
created_atrequiredstring (date-time)Creation timestamp
updated_atrequiredstring (date-time)Last update timestamp
scopestringDistribution scope: gallery|firm|team|user|plan (provenance pill).
is_catalogbooleanTrue for curated public library recipes (the seeded catalog).
owning_team_idstring (uuid) | nullThe team a `scope='team'` workstream belongs to — lets the FE group the My WorkStreams list under the team name (#170). NULL for firm/user-scoped rows.
400Invalid request data
401Unauthorized
404Template not found
422Validation Error
FieldTypeDescription
detailValidationError[]—
item shape
curl https://api.dev.arch.ie/api/v1/workstreams/templates/<template_id> \
  -X PATCH \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "name": null,
       "description": null,
       "category": null,
       "steps": null,
       "default_config": null,
       "tags": null,
       "input_schema": null,
       "output_schema": null,
       "status": null,
       "change_summary": null
     }'
API Reference · Archie for developers