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

# V1 REST API

> 用於管理專案、Agent、Pathway 與工具的開發者 API

V1 REST API 提供完整的程式化存取能力，讓您管理 Pathors 專案。所有端點皆使用 **Developer Key** 進行認證。

## 基礎 URL

```
https://api.pathors.com/v1
```

## 認證

所有 V1 API 請求都需要透過 `Authorization` 標頭傳入 Developer Key：

```bash theme={null}
Authorization: Bearer dk_your_developer_key_here
```

Developer Key 可在 Pathors 儀表板的 **Developer Keys** 區塊建立。

## 資源

<CardGroup cols={2}>
  <Card title="專案" icon="folder" href="/zh-Hant/api-reference/v1/projects/list-projects">
    建立與管理專案。
  </Card>

  <Card title="Agent 設定" icon="robot" href="/zh-Hant/api-reference/v1/agent/get-agent">
    設定 Agent 組態（全域提示、執行模式等）。
  </Card>

  <Card title="Pathway" icon="diagram-project" href="/zh-Hant/api-reference/v1/pathway/get-pathway">
    讀取與修改對話流程圖（節點與邊）。
  </Card>

  <Card title="工具" icon="wrench" href="/zh-Hant/api-reference/v1/tools/list-tools">
    管理 Agent 可使用的工具。
  </Card>

  <Card title="通話" icon="phone" href="/zh-Hant/api-reference/v1/calls/create-outbound-call">
    發起外撥電話。
  </Card>
</CardGroup>

## 錯誤格式

所有錯誤皆遵循一致的格式：

```json theme={null}
{
  "error": {
    "message": "Description of the error",
    "details": {}
  }
}
```

| 狀態碼 | 描述                  |
| --- | ------------------- |
| 400 | 驗證錯誤                |
| 401 | 無效或缺少 Developer Key |
| 403 | 權限不足                |
| 404 | 找不到資源               |
| 409 | 衝突（例如：重複的 ID）       |
| 500 | 內部伺服器錯誤             |
