---
title: "Update an edge (condition, target) — reroutes a running execution when live."
method: PATCH
path: "/graphs/{id}/edges/{edgeId}"
tags: ["graphs"]
---

# Update an edge (condition, target) — reroutes a running execution when live.

`PATCH /graphs/{id}/edges/{edgeId}`

## Request

- Base URL: `https://api.livegraph.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.livegraph.ai/graphs/{id}/edges/{edgeId}`
- Auth: one of:
  - API key in cookie `livegraph_session`
  - API key in header `x-api-key`

## Path parameters

- `id` string, uuid, required
- `edgeId` string, uuid, required

## Request body

- object
  - `targetNodeId` string, uuid
  - `condition` 'default' | 'on_tool_call' | 'on_classifier_result' | 'manual'
  - `priority` integer
  - `label` string

## Response `200`

Success — see summary for the response shape.

## Other responses

- `4XX`: Client error — body is the shared {error, code?} envelope.

---

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