Skip to main content
PATCH
Edit a workflow draft node
The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.

v2 compatibility notes

PATCH /api/v2/workflows/updateDraftNode Changes one node of the workflow’s editable draft through the same checks the Forge Console builder runs. The node’s logicalNodeId never changes.

Authentication

External App credential or platform API key. Requires permission workflows:write, and the caller must hold both workflows:read and workflows:write at the workflow’s home org unit. Any External App or platform API key with those grants may edit; who created the workflow lends no authority. The org unit a request acts from is not the workflow’s home.

Body

string
required
The workflow ID.
string
required
The node’s nodeId from getDraftGraph.
string
A new name, unused by any other node in the draft and not blank.
string
A new description.
object
New { x, y } coordinates.
WorkflowDraftGraphNodeConfig
Fields to set. Each replaces the stored value. inputs replaces the whole input map: omitting a stored input is refused unless removeInputFields names it.
string[]
Fields to delete: prompt, timeout, onTimeout, maxOutputTokens, presentationHint, outputs, outcomeRouting or inputs.
string[]
Input names to remove from the node’s current input map, applied on the server.
At least one of name, description, position, config, clearFields or removeInputFields is required.

What a machine can change

A node’s config takes only the structure and content fields: prompt, timeout, onTimeout, maxOutputTokens, tier, presentationHint, includeUpstreamOutputs, inputs, outputs, outcomeRouting, routingStrategy, rules, routingPrompt, routeOptions, multiSelect, joinStrategy, joinThreshold, publishMessageFormat, publishPresentation and message. Every field that names an agent, worker, person, role, recipient, channel, address, credential, tool, skill, procedure, model or sandbox stays Console-only: agentDefinitionId, agentVersion, pinnedToolContract, toolOverrides, estimatedCost, autoInjectCases, workerAssignment, syndicationTargets, slackChannel, escalationChannel, assignee, routingModel, routerAgentOverride, destination, apiEndpoint, channelId, emailTo, emailSubject, notifyChannels, notifyRecipients, notifyTitle, validation, sandbox, capabilityHints, pinnedSkillVersions, procedureId, procedureVersion, sourceStepId and credentialBindings. A body that names one answers 400, and a write never sets, clears or reads them. A produce node therefore needs a person to assign its agent or worker in the Console before the workflow can be published.

Responses

200 with:
string
The workflow ID.
string
The draft’s ID.
WorkflowDraftGraphNode
The node as getDraftGraph returns it: nodeId, logicalNodeId, type, name, description, position, config and consoleOnlyConfig.

Errors

Retries

Send an Idempotency-Key header to retry safely. Within 24 hours, the same key and body return the recorded status and body, with Idempotency-Replayed: true, while the caller still holds workflows:write and can read the workflow. Otherwise the repeat answers 409 idempotency_result_unavailable and does not write again. A new key is a new write. Without a key, a retried create meets the node-name rule (409) or the one-edge-per-pair rule (422), and a retried delete answers 404. If an outcome is unknown, read getDraftGraph before acting again.

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Headers

Idempotency-Key
string

Path Parameters

workflowId
string
required
Minimum string length: 1
nodeId
string
required
Minimum string length: 1

Body

application/json
name
string
description
string
position
object
config
object
clearFields
enum<string>[]
Available options:
prompt,
timeout,
onTimeout,
maxOutputTokens,
presentationHint,
outputs,
outcomeRouting,
inputs
removeInputFields
string[]

Response

The draft graph write.

data
object
required
meta
object
required