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

Adopt Upstream Api V1 Workstreams Template Id Adopt Post

post/api/v1/workstreams/{template_id}/adopt

Adopt upstream updates from parent playbook

Adopt the upstream updates from the parent playbook into this fork. The steps and input/output schemas are overwritten with the parent's latest versions. The fork's own metadata (name, description, status) and per-client alterations are preserved.

Path parameters

template_idrequired
path
The UUID of the forked recipe that takes up its parent's latest steps and schemas.

Responses

200Successful Response
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
source_descriptionstring | nullThe definition's own text, verbatim (the audit-true record of what was authored). Disclosed behind 'The definition, as written', in mono β€” never the firm-facing head. NULL when the definition has no prose distinct from the interpreted description.
source_namestring | nullThe definition's own name, verbatim. Disclosed alongside source_description when it differs from the firm-facing name.
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.
goal_specGoalSpecPayload-Output | object | nullThe versioned deterministic goal contract. This is definition state, not cycle output, and must round-trip through every authoring surface.
accounting_ledger"off" | "optional" | "required"The WorkStream's explicit Cycle Accounting Ledger capability.
offoptionalrequired
tagsstring[]Template tags
input_schemaobject[]Declared workstream inputs (array of InputDef: name/type/required/...).
item shape
Empty object.
familiesobject[]β€”
item shape
Empty object.
data_filesobject | nullThe WorkStream's data files; null on the list route.
broker_option_namesobjectMaps each family_id@version choice of a select input in input_schema to its broker family's stored display name. A family with no stored name is omitted; the choice values themselves are unchanged. Filled by the single-template route only; empty elsewhere.
show nested
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.
inputs_requiredany[] | nullDeclared inputs the WorkStream needs before it can run (part of the hashed definition).
runner_configobject | nullRunner settings for the WorkStream (part of the hashed definition). {} when none.
execution_mode"inline" | "containerized" | nullHow the WorkStream runs (part of the hashed definition).
jurisdictionsstring[] | nullApplicable jurisdictions (part of the hashed definition).
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" | "pending" | "needs_guidance" | "abandoned" | "debug_paused" | 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).
needs_you_countintegerInstances of this WorkStream parked at an approval gate, waiting on a person. APPROVALS ONLY β€” blocked (waiting on the client) and errored (needs a retry) are different asks and are counted elsewhere, so the orange attention number means the same thing on the list card, the WorkStream page and a cycle's triage.
needs_you_job_idstring (uuid) | nullThe batch holding the most of those approvals β€” the DOOR the attention chip opens, so the count is never a claim the user then has to hunt for. NULL when needs_you_count is 0, and ALSO null when the gated instances belong to no batch (a standalone run has no fan-out to open). A non-zero count with a null door is therefore expected: fall back to the WorkStream's own Cycles tab, which is always reachable β€” never render the count as unclickable.
source_managedbooleanThe WorkStream is saved to git (every save is a commit).
working_branch_headstring | nullThe head of the working branch (40 lower-case hex) of a managed WorkStream: send it back as `expected_head` with the next save.
publishedboolean | nullAlways false on a managed save answer: saved, not yet published.
unpublished_savesinteger | nullCommits on the working branch that main does not yet hold; null when it could not be read.
latest_versioninteger | nullThe WorkStream's own version; a save never changes it.
headstring | nullThe head after this save (a managed save only).
save_messagestring | null"Saved. Not published: N change(s) since version V." (a managed save only).
created_byrequiredstring (uuid)Creator user ID
created_by_namestring | nullCreator display name
owner_user_idstring | nullThe user who owns (and alone grants edit rights on) this definition.
shared_with_user_idsstring[]Users the owner granted edit rights on this definition.
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.
workspace_idstring (uuid) | nullWorkspace ID owning this template, or NULL for catalog/curated recipes
lintstring[]ADVISORY structural findings for the saved step set β€” duplicate ids, dangling depends_on, dependency cycles, unresolvable references. Entries prefixed `warn:` are advisory by the linter's own tiering. This NEVER blocks a save and an empty list is not a guarantee: see the note on the update handler for why a hard gate would be wrong against today's stored data.
422Validation Error
FieldTypeDescription
detailValidationError[]β€”
item shape
curl https://api.dev.arch.ie/api/v1/workstreams/<template_id>/adopt \
  -X POST \
  -H "Authorization: Bearer sk_..."
API Reference Β· Archie for developers