---
title: "Update Edge"
method: PATCH
path: "/workflows/v1/edges/{edge_id}"
tags: ["Edges"]
---

# Update Edge

`PATCH /workflows/v1/edges/{edge_id}`

Endpoint to update a edge by its ID.
Optionally verify the edge belongs to a specific version number before updating.

## Path parameters

- `edge_id` string, required

## Query parameters

- `version_number` integer, nullable — Verify edge belongs to this version number before updating (0 includes legacy edges)

## Request body

- object

## Response `200`

Successful Response

- EdgesResponse — Response model for a single edge. Contains an EdgesModel object.
  - `edge` EdgesModel, required — Stores an edge configuration present in the workflow system.
    - `team_id` string, nullable — ID of the team that owns this edge
    - `created_by` string, nullable — ID of the user who created this edge
    - `updated_by` string, nullable — ID of the user who last updated this edge
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `_id` string
    - `edge_config` union — Edge Configuration
      - DirectEdgeConfigOutput
        - `logical_id` string, nullable — Unique identifier for the edge
        - `name` string, nullable — Name of the edge
        - `description` string, nullable — Description of the edge
        - `workflow_id` string, nullable — The DB Object ID of the workflow this entity belongs to
        - `version_number` integer, nullable — Version number of the workflow this entity belongs to. 0 is the initial version (default).
        - `disabled` boolean — If true, this entity will be disabled and will not execute its function. Useful for testing workflows without actually executing this specific entity
        - `miscellaneous` object — Miscellaneous config data that can be used by the entity
        - `source_node_logical_id` string, nullable — Logical ID of the source node for this edge
        - `destination_node_logical_id` string, nullable — Logical ID of the target node for this edge
        - `type` 'direct' — Type of the edge. Expected to be always 'direct' for this base config
      - ConditionalEdgeConfigOutput
        - `logical_id` string, nullable — Unique identifier for the edge
        - `name` string, nullable — Name of the edge
        - `description` string, nullable — Description of the edge
        - `workflow_id` string, nullable — The DB Object ID of the workflow this entity belongs to
        - `version_number` integer, nullable — Version number of the workflow this entity belongs to. 0 is the initial version (default).
        - `disabled` boolean — If true, this entity will be disabled and will not execute its function. Useful for testing workflows without actually executing this specific entity
        - `miscellaneous` object — Miscellaneous config data that can be used by the entity
        - `source_node_logical_id` string, nullable — Logical ID of the source node for this edge
        - `destination_node_logical_id` string, nullable — Logical ID of the target node for this edge
        - `type` 'conditional' — Type of the edge. Expected to be always 'conditional' for this config
        - `condition` ConditionConfig
          - `condition_freeform` string, nullable — Condition (expressed in natural language) that determines whether this path is taken
          - `condition_expression` string, nullable — Condition (expressed in a structured equation with variables) that determines whether this path is taken
          - `args_schema` object, nullable — JSON Schema describing the arguments that will be passed when condition_freeform is evaluated
          - `static_messages_config` StaticMessagesConfig
            - `static_messages` string[] — List of pre-configured messages from which one will be emitted
            - `static_messages_selection_mode` 'random' | 'sequence'
          - `dynamic_messages_config` DynamicMessagesConfig
            - `dynamic_message_prompt` string, nullable — A prompt describing what the LLM should say when this conditional edge is taken. The LLM will be asked to fill in a value based on this prompt, and the result will be emitted as an assistant response.
      - CompanionEdgeConfigOutput
        - `logical_id` string, nullable — Unique identifier for the edge
        - `name` string, nullable — Name of the edge
        - `description` string, nullable — Description of the edge
        - `workflow_id` string, nullable — The DB Object ID of the workflow this entity belongs to
        - `version_number` integer, nullable — Version number of the workflow this entity belongs to. 0 is the initial version (default).
        - `disabled` boolean — If true, this entity will be disabled and will not execute its function. Useful for testing workflows without actually executing this specific entity
        - `miscellaneous` object — Miscellaneous config data that can be used by the entity
        - `source_node_logical_id` string, nullable — Logical ID of the source node for this edge
        - `destination_node_logical_id` string, nullable — Logical ID of the target node for this edge
        - `type` 'companion' — Type of the edge. Expected to be always 'companion' for this config

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/interactly/apis/interactly-api-3.md) · [All operations](https://skmtc.dev/interactly/apis/interactly-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/interactly/interactly-api-3/revisions/d276be705570/schema)
