Workflows
Update a workflow
Change a workflow: name, description, YAML, kind or folder.
Send any of the fields. The YAML (the new one, or the stored one when only kind changes) is linted against the kind the row will have afterwards; a rejected patch changes nothing. JSON null on description or folder clears it (folder: "none" unfiles too); null on any other field is a 422. A kind that moves away from bot or campaign runs the delete teardown for the old kind: a bot loses its memory namespace and its scheduled jobs, a campaign loses its jobs and its ledger is tombstoned (the row itself stays). Save as YAML: a text/yaml body is the new workflow YAML and name, description and folder ride the query; kind must equal the stored kind or be left out (400 invalid_request).
Authorizations
Authorization: Bearer ozk_…. ozk_ platform API key (Authorization: Bearer ozk_…)Path parameters
Query parameters
Available options: workflow, agent, bot, campaign
workflow.name is in the YAML (the query wins when both are set). PATCH: renamesMaximum string length: 200
folder fieldMaximum string length: 120
Body
application/jsontext/yaml
Maximum string length: 200
Available options: workflow, agent, bot, campaign
Maximum string length: 120
Available options: json, yaml, markdown, text
Response
The updated row Response format negotiates via the format field, an Accept header (application/json, text/yaml, text/markdown, text/plain), or the request Content-Type mirror; default JSON.
application/jsontext/yamltext/markdowntext/plain
invalid_json / invalid_yaml / invalid_body — unreadable body; invalid_format — format must be one of json, yaml, markdown, text
application/json
unauthorized — missing, invalid or revoked ozk_ key
application/json
workflow_not_found — no saved workflow with that id for this key (a foreign id answers the same); not_found — no route for this method on this path: every other method answers it
application/json
payload_too_large — body over 1 MiB (MAX_REQUEST_SIZE)
application/json
invalid_workflow — the YAML failed validation or the kind lint (the envelope carries errors and warnings; nothing was written). invalid_params — a field is missing or malformed
application/json
storage_error — the database or storage layer failed; no detail is returned, retry
application/json