> ## 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.

# 更新邊

> 更新邊的條件、來源或目標

## 請求

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

### 路徑參數

<ParamField path="projectId" type="string" required>專案 ID</ParamField>
<ParamField path="edgeId" type="string" required>邊 ID</ParamField>

### 標頭

<ParamField header="Authorization" type="string" required>
  使用您的 Developer Key 進行 Bearer 令牌認證
</ParamField>

### 請求主體

所有欄位皆為選填。只需包含您想更新的欄位。

<ParamField body="source" type="string">新的來源節點 ID</ParamField>
<ParamField body="target" type="string">新的目標節點 ID</ParamField>
<ParamField body="condition" type="string">更新後的轉換條件</ParamField>

## 回應

回傳完整的更新後邊。若新的來源或目標節點不存在，則回傳 `400`。

### 範例

```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"
  }'
```
