Pistis
API referenceFlows

Build or change a flow

PUT
/flows/{flowId}

Admins only, with a person's token, saved as that person (listed as saved). The next run takes the new steps; a run already going keeps its own. An agent proposes one with its save_flow tool: a waiting approval whose approval (POST /sessions/{id}/approvals/{key}, by someone who may build flows) saves it.

Authorization

bearer
headerAuthorizationBearer <token>

An API token

Path Parameters

flowId*string

^[a-z0-9][a-z0-9-]{0,63}$

Request Body

application/json
  1. body
on*|||
steps*array<string>
repos?array<string>
concurrency?integer

Response Body

Saved

application/json
  1. response
ok*unknown
flow*
Example Request
curl -X PUT 'http://127.0.0.1:7777/flows/nightly-check' \  -H 'Content-Type: application/json' \  -d '{  "on": {    "manual": true  },  "steps": [    "run: pnpm test"  ]}'
Example Response
{  "ok": true,  "flow": {    "id": "string",    "on": {      "manual": true    },    "steps": [      "string"    ],    "repos": [      "string"    ],    "concurrency": 1  }}