Skip to main content
Replaces the draft with the graph you send. What is live doesn’t change until you publish. Send the revision you read. If someone saved the workflow since — on the panel or through the API — the save is refused with revision_conflict: read it again, apply your change to theirs, and save with the new revision.
Needs the agents:write scope.

Path parameters

Body

A graph is refused when:
  • it has more than 300 blocks;
  • a node’s id is missing, used twice, or isn’t 1 to 40 letters, digits, - or _;
  • a block isn’t one this agent can use;
  • a node’s config isn’t a small object of plain values (up to 30 settings);
  • a wire joins nodes or outcomes that aren’t there, goes to a Start block or back to its own node, or an outcome has two wires.
Only blocks whose outcomes you choose — AI decides and Send buttons — keep the outcomes you send (up to 12); others always have their block’s own. A teammate or knowledge article a block names that isn’t in the account is dropped, and the block then shows an issue. A graph can be saved with issues; only publishing needs nothing broken.

Request

Response

200 OK — the workflow, in the shape GET …/workflow answers, with the new revision, the checks run on your draft, and unpublished true.

Errors

Every refusal is {"error": {"code", "message", "field"}}; field is there when one input is at fault. Any request can also be refused for its key, its account or its rate (key_required, invalid_key, account_suspended, plan_excludes_api, address_not_allowed, rate_limited); see the overview.