> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pathors.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Edge

> Update an edge's condition, source, or target

## Request

```bash theme={null}
PATCH https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId}
```

### Path Parameters

<ParamField path="projectId" type="string" required>The project ID</ParamField>
<ParamField path="edgeId" type="string" required>The edge ID</ParamField>

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token using your developer key
</ParamField>

### Body

All fields are optional. Only include the fields you want to update.

<ParamField body="source" type="string">New source node ID</ParamField>
<ParamField body="target" type="string">New target node ID</ParamField>
<ParamField body="condition" type="string">Updated transition condition</ParamField>

## Response

Returns the full updated edge. Returns `400` if the new source or target node does not exist.

### Example

```bash theme={null}
curl -X PATCH https://api.pathors.com/v1/projects/{projectId}/pathway/edges/{edgeId} \
  -H "Authorization: Bearer dk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "condition": "User confirms booking and provides payment"
  }'
```
