Create Blueprint Api V1 Workstreams Workplans Post
post
/api/v1/workstreams/workplansCreate workplan from template
Create a new workplan from a template for a specific client.
A workplan inherits its template's steps and can override default
configuration.
**Authentication Required:** JWT Bearer token
Request bodyapplication/json
| Field | Type | Description |
|---|---|---|
template_idrequired | string (uuid) | Source template UUID (workstream_id) |
namerequired | string | Workplan name |
client_id | string (uuid) | null | Client UUID (optional; references platform.clients) |
config_overrides | object | Configuration overridesshow nestedEmpty object. |
schedule | string | null | Cron schedule expression (folded into configuration; null = unscheduled) |
schedule_timezone | string | null | IANA timezone for the schedule (folded into configuration) |
max_duration_minutes | integer | null | Per-instance duration guardrail in minutes (folded into configuration) |
human_checkpoints | any[] | null | Sign-off gate checkpoints (folded into configuration); [] clears the gate |
run_mode | string | null | Run posture: propose|auto_run (folded into configuration) |
Responses
201Workplan created successfully
| Field | Type | Description |
|---|---|---|
idrequired | string (uuid) | Workplan UUID |
template_idrequired | string (uuid) | Source template UUID (workstream_id in DB) |
namerequired | string | Workplan name |
client_id | string (uuid) | null | Client UUID (optional) |
client_name | string | null | Client name |
run_mode | WorkplanRunMode | The WorkPlan's effective run posture (S2-READ §1a).
``effective`` resolves: plan-level ``configuration.run_mode`` → the
workstream default → ``propose``. ``source`` tells the FE whether the value
was set on this plan or inherited. ``locked`` is the firm-lock governance
flag — always ``False`` in S2.show nested |
cohort | WorkplanCohort | Structural facts about the WorkPlan's bound client set (S2-READ §1b).
Live exception/ready counts live on the roster's ``summary`` (one
authoritative source); this object carries only the cohort's size + shape.
With no multi-client cohort writer yet, ``total_clients`` resolves to 0/1
and ``selector_kind`` to ``single`` — the shape is frozen, the populating
data is S2-write BE work behind it.show nested |
config_overrides | object | Configuration (from DB)show nestedEmpty object. |
effective_config | object | Merged effective configshow nestedEmpty object. |
schedule | string | null | Cron schedule expression (from configuration; null = unscheduled) |
schedule_timezone | string | IANA timezone for the schedule (from configuration; defaults UTC) |
max_duration_minutes | integer | null | Per-instance duration guardrail in minutes (from configuration; null = unset) |
human_checkpoints | any[] | Sign-off gate checkpoints (from configuration). Non-empty means a partner sign-off gate is on. |
statusrequired | "draft" | "active" | "paused" | "archived" | Status for workstream entities.draftactivepausedarchived |
last_run_at | string (date-time) | null | Most recent cycle start for this WorkPlan (null if never run) |
next_run_at | string (date-time) | null | Next scheduled execution — computed; see GET /workplans/{id}/next-run (P1) |
created_by | string (uuid) | null | Creator user ID (owner_id in DB) |
created_atrequired | string (date-time) | Creation timestamp |
updated_atrequired | string (date-time) | Last update timestamp |
400Invalid request or template not found
401Unauthorized
422Validation Error
| Field | Type | Description |
|---|---|---|
detail | ValidationError[] | —item shape |
curl https://api.dev.arch.ie/api/v1/workstreams/workplans \
-X POST \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"client_id": "660e8400-e29b-41d4-a716-446655440001",
"config_overrides": {
"currency": "USD",
"threshold": 1000
},
"name": "Acme Corp Monthly Close",
"schedule": "0 9 1 * *",
"template_id": "550e8400-e29b-41d4-a716-446655440000"
}'