Create Job Definition Api V1 Workstreams Jobs Post
post
/api/v1/workstreams/jobsCreate job definition
Create a new agentic job definition.
Request bodyapplication/json
| Field | Type | Description |
|---|---|---|
namerequired | string | β |
description | string | null | β |
domainrequired | string | Domain knowledge key (e.g. 'ita_2007_eis') |
goal_template | string | null | Goal template with {{variable}} placeholders. OPTIONAL: when omitted (or null), it is defaulted server-side from the domain's DomainAgent persona goal_template (PERSONA_REGISTRY.for_workstream(domain)). A domain with no registered persona falls back to the DEFAULT persona's '{{ goal }}'. An explicit value is stored verbatim (back-compat). |
tools | string[] | β |
deliverables | object[] | βitem shapeEmpty object. |
max_turns | integer | β |
max_cost_usd | number | β |
max_duration_minutes | integer | β |
target_selector | TargetSelector | Who to run the job for.show nested |
per_client_overrides | object | βshow nestedEmpty object. |
default_context | object | βshow nestedEmpty object. |
source_tracing | boolean | β |
human_checkpoints | string[] | β |
schedule | string | null | Cron expression |
schedule_timezone | string | β |
Responses
201Successful Response
| Field | Type | Description |
|---|---|---|
idrequired | string (uuid) | β |
permakey | string | null | Stable human-readable key for the batch/fan-out deep-link URL /workstreams/{ws}/cycles/{permakey}/β¦ (#173). Null on legacy rows. |
namerequired | string | β |
description | string | null | β |
domainrequired | string | β |
goal_templaterequired | string | β |
toolsrequired | string[] | β |
deliverablesrequired | object[] | βitem shapeEmpty object. |
max_turnsrequired | integer | β |
max_cost_usdrequired | number | β |
max_duration_minutesrequired | integer | β |
target_selectorrequired | object | βshow nestedEmpty object. |
per_client_overridesrequired | object | βshow nestedEmpty object. |
default_contextrequired | object | βshow nestedEmpty object. |
source_tracingrequired | boolean | β |
human_checkpointsrequired | string[] | β |
schedule | string | null | β |
schedule_timezonerequired | string | β |
is_enabledrequired | boolean | β |
next_run_at | any | null | β |
last_run_at | any | null | β |
statusrequired | string | β |
created_byrequired | string | β |
created_atrequired | any | β |
updated_atrequired | any | β |
current_version | integer | null | Latest version number in job_definition_version; null if no history yet. |
422Validation Error
| Field | Type | Description |
|---|---|---|
detail | ValidationError[] | βitem shape |
curl https://api.dev.arch.ie/api/v1/workstreams/jobs \
-X POST \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": null,
"domain": "string",
"goal_template": null,
"tools": [
"string"
],
"deliverables": [
{}
],
"max_turns": 0,
"max_cost_usd": 0,
"max_duration_minutes": 0,
"target_selector": {
"type": "string",
"client_ids": null,
"client_id": null,
"tag": null
},
"per_client_overrides": {},
"default_context": {},
"source_tracing": false,
"human_checkpoints": [
"string"
],
"schedule": null,
"schedule_timezone": "string"
}'