---
title: "Update Workflow"
method: PATCH
path: "/v1/workflows/{id}"
tags: ["Workflow"]
---

# Update Workflow

`PATCH /v1/workflows/{id}`

## Request

- Base URL: `https://api.sandbox.usenash.com`
- URL: `https://api.sandbox.usenash.com/v1/workflows/{id}`
- Auth: none declared

Update an existing workflow. Only provided fields are updated. If nodes, edges, and trigger are all provided, a new workflow version is created. These three structure fields must be provided together or not at all.

## Path parameters

- `id` string, required

## Request body

- UpdateWorkflowInputSerializer
  - `name` string, nullable
  - `description` string, nullable
  - `status` 'draft' | 'active' | 'inactive' | 'archived' | 'template'
  - `nodes` WorkflowNodeInputSerializer[], nullable
    - `nodeType` 'trigger' | 'action' | 'filter' | 'dispatch_check' | 'switch' | 'subgraph' | 'agent_invoke', required: Types of workflow nodes.
    - `nodeKey` string, required: Unique key within this workflow. Edges reference nodes by this key.
    - `nodeAction` 'dispatch_strategy' | 'optimization_strategy' | 'modify_order_price_or_tip' | 'modify_order_instructions' | 'modify_order_metadata' | 'reschedule_order' | 'add_tag' | 'flag_delivery' | 'send_email' | 'send_sms' | 'send_slack' | 'send_webhook' | 'send_to_destinations' | 'agent_call' | 'summarize' | 'extract_metadata_field' | 'add_requirements' | 'auto_reassign' | 'emit_custom_event' | 'browser_automation' | 'cancel_delivery' | 'mark_order_ready' | 'send_teams_channel_message' | 'cancel_order' | 'remove_order_from_route' | 'invoke_agent' | 'ai_decision' | 'create_route_flag' | 'update_route_flag' | 'resolve_route_flag' | 'assign_route_flags' | 'send_http_request' | 'add_validation_error' | 'generate_document': Actions that can be performed by a workflow node.
    - `nodeActionConfig` object, nullable: Config for the action. Shape depends on node_action. See GET /workflows/schema.
    - `nodeFilterConfig` object[], nullable: Filter conditions. Each dict has field, operator, and value. See GET /workflows/schema for available fields and operators.
    - `nodeLabel` string, required: Human-readable label for this node.
    - `isEnabled` boolean, nullable
    - `isTrigger` boolean, nullable
  - `edges` WorkflowEdgeInputSerializer[], nullable
    - `edgeKey` string, required: Unique key within this workflow.
    - `sourceNodeKey` string, required: node_key of the source node.
    - `targetNodeKey` string, required: node_key of the target node.
    - `executionOrder` integer, required: Execution order when a node has multiple outgoing edges.
    - `edgeType` 'default' | 'success' | 'negative' | 'decision'
    - `branchKey` string, nullable: Required only for decision edges from ai_decision: yes/no for yes_no, a configured choices[].key for choice, above/below for score, or uncertain/error for any mode. At most one edge per outcome per node.
  - `trigger` WorkflowTriggerInputSerializer
    - `triggerType` 'manual' | 'webhook' | 'cron' | 'event' | 'subgraph', required: Types of workflow triggers.
    - `eventTriggerType` string, nullable: For notification-based triggers only. Pass the entry's 'value' from the GET /workflows/schema triggers list, not the trigger key. Leave null for event triggers like order.created.
    - `eventName` string, nullable: The event to listen for. For schema entries whose input_field is 'eventName', pass the entry's value here (e.g. 'order.created'). For notification triggers, omit this. Defaults to 'notification_trigger.tripped'.
    - `customEventDefinitionId` string, nullable: Reference to a pre-defined custom event from the organization's catalog. Mutually exclusive with eventName: the definition's key becomes the trigger's event name. Not valid for cron triggers.
    - `courierFormDefinitionId` string, nullable: Reference to a CourierFormDefinition. Required when eventName is 'courier_form.submitted'; not valid for any other trigger type.
    - `notificationTriggerParameters` object, nullable: Extra config for notification triggers. Not used for event triggers.
    - `isEnabled` boolean, nullable

## Other responses

- `422`: Unprocessable Content

---

[API](https://skmtc.dev/nash/apis/nash-api.md) - [All operations](https://skmtc.dev/nash/apis/nash-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nash/apis/nash-api/revisions/e3713837c5c9?raw)
