Skip to main content
POST
Admit a workflow as a durable job — by served name, or as immutable snapshot bytes

Authorizations

Authorization
string
header
required

Exactly one Authorization: Bearer value from the token file

Headers

Idempotency-Key
string
required
Required string length: 1 - 255

Body

application/json

The by-name form (ADR-131): a workflow the served registry lists (GET /v1/workflows · project-root-relative, .nika). The resident captures its world exactly as a schedule does — the one owner of the snapshot and its digest domain. Idempotency binds to these request bytes. Optional access is the same pin as CLI --access (a pin is a pin). Absent: the resident's unpinned plan. Snapshot bodies reject both access and inputs overlays, including null or empty maps. Optional inputs are literal JSON values checked against declared keys, types and required values before a job exists; strings are never CLI @env instructions or expressions.

workflow
string
required
Required string length: 1 - 4096
access
string

Access pin, same vocabulary as --access (class or harness id). A pin never silently substitutes a metered seat.

Required string length: 1 - 64
inputs
object

Literal JSON overrides for declared workflow inputs. Unknown keys, wrong types and missing required values refuse with 422; defaults remain authored. A present null is refused. Inputs bind exact request identity and survive durable queue recovery; workflow bytes are unchanged.

Response

Idempotent replay

id
string<uuid>
required
status
enum<string>
required

queued and running: the resident owns the execution. interrupted: execution ownership was lost and effect settlement is unknown — an EVIDENCE state (the journal is INCOMPLETE), never a run state (ADR-129). paused, succeeded, failed and cancelled: the run's own settlement, the words its terminal frame carries (ADR-128).

Available options:
queued,
running,
interrupted,
paused,
succeeded,
failed,
cancelled
error
object
evidence
object

Reported journal delivery loss, independent of execution status. The reason classifies the mirror's first error without exposing OS text or paths. Absence is not a claim that a journal exists.

execution_id
string
outputs
object

Declared workflow outputs; present only after settlement when supplied by the execution adapter

receipt
object

Terminal binding to the exact immutable admitted execution

settlement
object

The run's settlement (ADR-128), built once by the runtime and projected whole: the state word every door speaks, why, the elapsed time on the kernel clock, the task tally, the spend with its qualifier, the failure named. Unknown cost is never zero: total_cost_usd is absent when nothing was metered. Present on the terminal event and durable job response of a job whose runtime settled; absent when the resident lost the execution (interrupted) or refused it before any task. Reattachment and idempotent admission replay project the same hash-bound terminal event, never a new settlement.

trace_id
string