Patch a workflow's input state
A merge patch against the shared `input` half: keys absent from the body keep their value, keys set to `null` are removed. Only paths the current revision's contract declares are writable (`input.scratch` is always free-form), so an undeclared path is a `400` naming it and leaves state untouched. `version` is the `input` version the caller read from `GET /v1/workflows/{id}/state` — it says which state the patch was composed against. Because `input` is patched per path, a version that has moved on since does not throw the write away: the store re-reads and re-applies the patch against the live value, so a rival's edit to another path survives rather than being overwritten. Only a write that loses every one of those compare-and-swap retries is refused with `409`, which is a signal about contention, not about a stale read.
A merge patch against the shared input half: keys absent from the body keep their value, keys
set to null are removed. Only paths the current revision's contract declares are writable
(input.scratch is always free-form), so an undeclared path is a 400 naming it and leaves
state untouched.
version is the input version the caller read from GET /v1/workflows/{id}/state — it says
which state the patch was composed against. Because input is patched per path, a version that
has moved on since does not throw the write away: the store re-reads and re-applies the patch
against the live value, so a rival's edit to another path survives rather than being
overwritten. Only a write that loses every one of those compare-and-swap retries is refused
with 409, which is a signal about contention, not about a stale read.
Authorization
api_key workflows:writeAn atk_-prefixed API key, created under Settings → API keys.
In: header
Scope: workflows:write
Path Parameters
Workflow id
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The body of PATCH /v1/workflows/{id}/input.
Only the shared input half is writable here: ui is private to the caller and the app is the
only thing that writes it. input is an RFC 7386 merge patch, so a key that is absent from it
keeps its current value and a key set to null is removed.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/input" \ -H "Content-Type: application/json" \ -d '{ "input": {}, "version": 0 }'{ "input": {}, "ui": {}, "ui_version": 0, "version": 0}