Mediflo
REST APIWorkflows

Replace a workflow

Runs the canonical validator; issues carry `nodeId` and `field`. Send `expectedVersion` (the `version` you last read) to avoid clobbering a concurrent edit — a mismatch returns 409 with both versions. A node’s `skillRef` is also checked against what the bot would actually serve: 400 `BOT_WORKFLOW_SKILL_REF_NOT_SERVABLE` with `details.skillRefs` when a pin is not on the bot’s current config snapshot (publish the bot config, or unpin it). Switching a node’s `overrideSystemPrompt` on is reserved for the Mediflo team: 403 `BOT_WORKFLOW_SYSTEM_PROMPT_OVERRIDE_STAFF_ONLY` with `details.nodeIds` (a node that already carries it may keep it or drop it). Required scope: `bots.write`.

PUT/bot-workflows/{workflowId}

Authorization

ApiKeyAuth
AuthorizationBearer <token>

An external API key, sent as Authorization: Bearer mflo_…. Scopes are checked per route; see each operation’s description.

In: header

Path Parameters

workflowId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/bot-workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "botId": "58ed41f0-04bf-402f-9853-7143ef7dd5ce",    "name": "string",    "description": "string",    "version": 0,    "isActive": true,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "definition": null  }}