Felo API PlatformFelo API Platform

Felo APIs

LiveDoc API

建立知識庫、管理資源,並執行語意檢索和路由。

POST/v2/livedocs

認證

Bearer API key

Content type

application/json or multipart/form-data

限流說明

可能適用 endpoint 專屬限制。

本頁說明既有的 /v2 Felo APIs,使用 Felo 帳戶權益與 Pro 點數規則。是否扣除點數取決於 操作。若要使用平台餘額呼叫,請選擇支援的 Felo OpenAPI 端點;請求與回應格式可能不同。

LiveDoc 網址使用 https://felo.ai/livedoc/{short_id}。可能需要具備對該 LiveDoc 存取權的瀏覽器工作階段。請保留每個端點的 API 欄位名稱:SuperAgent 會回傳 live_doc_short_id,而 mindmap 與 PPT 建立則回傳 livedoc_short_id。

LiveDoc API 提供 LiveDocs 及其資源的完整 CRUD 操作,包括文件建立、檔案上傳、URL 匯入與語意擷取。

與 AI 代理人一起使用

安裝完整的 felo-ai 套件,為 Agent 提供 LiveDoc 支援以及所有其他可用的 Felo Skills。安裝程式會動態探索每個包含 SKILL.md 的套件目錄,包括未來新增的套件。請將所有探索到的 Skills 安裝到 Agent 的原生目錄:Codex ~/.codex/skills、Claude Code ~/.claude/skills、OpenClaw ~/.agents/skills,或 Hermes Agent ~/.hermes/skills。 手動 AI Agent 設定指南 涵蓋各平台不同的 API 金鑰與驗證步驟。

驗證

所有請求都需要在 Authorization 標頭中提供 API Key:

Authorization: Bearer YOUR_API_KEY

1. 建立 LiveDoc

端點

POST https://openapi.felo.ai/v2/livedocs

請求主體

參數類型必填說明
namestring是LiveDoc 名稱
descriptionstring否LiveDoc 描述
iconstring否LiveDoc 圖示

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "AI Research Notes",
    "description": "Collection of AI research materials"
  }'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "short_id": "PvyKouzJirXjFdst4uKRK3",
    "name": "AI Research Notes",
    "description": "Collection of AI research materials",
    "icon": null,
    "created_at": "2026-03-09T10:00:00Z",
    "modified_at": "2026-03-09T10:00:00Z"
  }
}

回應欄位

欄位類型說明
short_idstringLiveDoc ID
namestringLiveDoc 名稱
descriptionstringLiveDoc 描述
iconstringLiveDoc 圖示
created_atstring建立時間戳(ISO 8601)
modified_atstring最後修改時間戳(ISO 8601)
is_sharedboolean此 LiveDoc 是否與目前使用者共享(非其擁有)

2. 列出 LiveDocs

端點

GET https://openapi.felo.ai/v2/livedocs

查詢參數

參數類型必填說明
keywordstring否依關鍵字篩選
pageinteger否頁碼(從 1 開始)
sizeinteger否每頁大小

範例

curl 'https://openapi.felo.ai/v2/livedocs?keyword=AI&page=1&size=20' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "total": 2,
    "page": 1,
    "size": 20,
    "items": [
      {
        "short_id": "PvyKouzJirXjFdst4uKRK3",
        "name": "AI Research Notes",
        "description": "Collection of AI research materials",
        "icon": null,
        "created_at": "2026-03-09T10:00:00Z",
        "modified_at": "2026-03-09T10:05:00Z",
        "is_shared": false,
        "readme": {
          "summary": "AI research notes and papers collection",
          "content": "# AI Research Notes\n\nThis LiveDoc contains..."
        }
      }
    ]
  }
}

回應欄位

items 中的每個項目都包含與 建立 LiveDoc 回應 相同的欄位,另外還有:

欄位類型說明
readmeobject | nullREADME 資訊。若不存在 README 則為 null。
readme.summarystring | null一行式專案描述
readme.contentstring | nullREADME 內容(Markdown)

端點

PUT https://openapi.felo.ai/v2/livedocs/{short_id}

請求主體

參數類型必填說明
namestring否新 LiveDoc 名稱
descriptionstring否新 LiveDoc 描述

範例

curl -X PUT 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Updated Research Notes"
  }'

成功回應(200)

回傳更新後的 LiveDoc 物件(結構與建立時相同)。


4. 刪除 LiveDoc

端點

DELETE https://openapi.felo.ai/v2/livedocs/{short_id}

範例

curl -X DELETE 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": null
}

5. 列出資源

端點

GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources

查詢參數

參數類型必填說明
resource_typesstring[]否依資源類型篩選
pageinteger否頁碼(從 1 開始)
sizeinteger否每頁大小

範例

curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources?page=1&size=20' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "total": 2,
    "page": 1,
    "size": 20,
    "items": [
      {
        "id": "res_001",
        "title": "OpenAI Blog Post",
        "link": "https://openai.com/blog/...",
        "snippet": "Summary of the article...",
        "thumbnail": null,
        "resource_type": "web",
        "resource_key": "key_001",
        "status": "completed",
        "source": "url",
        "created_at": "2026-03-09T10:00:10Z",
        "modified_at": "2026-03-09T10:00:15Z"
      }
    ]
  }
}

資源回應欄位

欄位類型說明
idstring資源 ID
titlestring資源標題
linkstring資源連結 / URL
snippetstring資源摘要
thumbnailstring縮圖 URL
resource_typestring資源類型(例如 web、ai_doc、file)
resource_keystring資源關聯鍵
statusstring資源狀態
sourcestring資源來源
created_atstring建立時間戳(ISO 8601)
modified_atstring最後修改時間戳(ISO 8601)

6. 取得單一資源

端點

GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}

範例

curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

回傳單一資源物件(結構與列出資源中的 items 相同)。


7. 更新資源

更新資源的 title、snippet 或 thumbnail。只會更新有提供的欄位;未提供的欄位會保留目前值。

端點

PUT https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}

請求主體

所有欄位都是選填。

參數類型必填說明
titlestring否新資源標題(最多 500 個字元)
snippetstring否新資源摘要(最多 2000 個字元)
thumbnailstring否新縮圖 URL(最多 2000 個字元)

範例

curl -X PUT 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Updated Title",
    "snippet": "Updated summary of the resource."
  }'

成功回應(200)

回傳更新後的資源物件(結構與列出資源中的 items 相同)。


8. 更新資源內容

更新 ai_doc 資源的 Markdown 內容。僅支援 resource_type == ai_doc 的資源。snippet 欄位會根據新內容的前 2000 位元組自動更新。

端點

PUT https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}/content

請求主體

參數類型必填說明
contentstring是資源的新 Markdown 內容

範例

curl -X PUT 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001/content' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": "# Updated Document\n\nThis is the new content."
  }'

成功回應(200)

回傳更新後的資源物件(結構與列出資源中的 items 相同)。


9. 建立文件資源

端點

POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/doc

請求主體

參數類型必填說明
titlestring否文件標題(預設為 "New Document")
contentstring是Markdown 文件內容;純文字也可視為有效 Markdown

這會建立一個 ai_doc 資源。請在 JSON 字串中以 Markdown 傳送標題、清單與連結,並將換行以 \n 轉義。格式化的文件內容請使用 Markdown。

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/doc' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "My Research Notes",
    "content": "# Research Notes\n\n## Key findings\n\n- First finding\n- Second finding"
  }'

成功回應(200)

回傳已建立的資源物件。


10. 將檔案上傳為文件

上傳檔案並將其轉換為文件資源(ai_doc 類型)。

端點

POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/upload-doc

Content-Type

multipart/form-data

請求部分

參數類型必填說明
filefile是要上傳的檔案
titlestring否文件標題

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/upload-doc' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F '[email protected]' \
  -F 'title=My PDF Document'

成功回應(200)

回傳已建立的資源物件。


11. 上傳檔案資源

上傳檔案並保留其原始格式。

端點

POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/upload

Content-Type

multipart/form-data

請求部分

參數類型必填說明
filefile是要上傳的檔案

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/upload' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F '[email protected]'

成功回應(200)

回傳已建立的資源物件。


12. 新增 URL 資源

將一或多個 URL 作為資源新增到 LiveDoc。

端點

POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/urls

請求主體

參數類型必填說明
urlsarray是要新增的 URL 項目清單(1–10)。每個項目可以是純字串,或是包含 url 與選填 title 的物件。

URL 項目格式

urls 中的每個項目可以是以下任一種:

  • 純字串:"https://example.com/article"
  • 物件:{"url": "https://example.com/article", "title": "Custom Title"}
欄位類型必填說明
urlstring是要新增的 URL(5–2000 個字元)
titlestring否資源的自訂標題(最多 1000 個字元)。若省略,標題會自動從頁面產生。

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/urls' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "urls": [
      "https://example.com/article-1",
      {"url": "https://example.com/article-2", "title": "My Custom Title"}
    ]
  }'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": [
    {
      "url": "https://example.com/article-1",
      "status": "success",
      "fail_reason": null,
      "resource_id": "res_003"
    },
    {
      "url": "https://example.com/article-2",
      "status": "existed",
      "fail_reason": null,
      "resource_id": "res_004"
    }
  ]
}

URL 結果欄位

欄位類型說明
urlstring已處理的 URL
statusstring結果狀態:success、failed 或 existed
fail_reasonstring失敗原因(成功時為 null)
resource_idstring已建立的資源 ID

13. 刪除資源

端點

DELETE https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}

範例

curl -X DELETE 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": null
}

14. 擷取(語意搜尋)

對 LiveDoc 中的資源執行語意擷取。

端點

POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/retrieve

請求主體

參數類型必填說明
querystring是語意搜尋的查詢內容
resource_idsstring[]否要在其中搜尋的特定資源 ID(1–50)。若省略,相關資源會根據查詢自動路由

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/retrieve' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "latest developments in large language models",
    "resource_ids": ["res_001", "res_002"]
  }'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": [
    {
      "id": "res_001",
      "title": "LLM Research Paper",
      "content": "Relevant content excerpt...",
      "score": 0.92,
      "metadata": {}
    }
  ]
}

擷取結果欄位

欄位類型說明
idstring資源 ID
titlestring資源標題
contentstring符合的內容
scorenumber相關性分數
metadataobject其他中繼資料

15. 路由資源

根據查詢,將 LiveDoc 中的相關資源進行路由。回傳可傳給擷取端點的資源 ID 清單。

端點

POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/route

請求主體

參數類型必填說明
querystring是路由用的查詢內容
max_resourcesinteger否要回傳的資源 ID 最大數量

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/route' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "latest developments in large language models",
    "max_resources": 5
  }'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": ["res_001", "res_003", "res_007"]
}

16. 下載資源來源檔案

取得資源的來源檔案。會回傳一個 302 重新導向到預簽章下載 URL。

僅支援具有相關來源檔案的資源(例如已上傳的文件)。

端點

GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}/download

查詢參數

參數類型必填說明
expires_ininteger否URL 逾時秒數(預設:3600)

範例

curl -L 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001/download' \
  -H 'Authorization: Bearer YOUR_API_KEY'

回應

回傳 302 Found,並帶有指向預簽章 S3 下載 URL 的 Location 標頭。支援重新導向的 HTTP 用戶端(例如 curl -L)會自動跟隨重新導向並直接下載檔案。


17. 取得資源內容

取得資源的擷取後文字內容。支援大多數資源類型(document、web、video、ai_doc、ai_ppt、text、voice、mindmap 等)。對 image 之類不支援的類型會回傳 400。

端點

GET https://openapi.felo.ai/v2/livedocs/{short_id}/resources/{resource_id}/content

範例

curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/res_001/content' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "title": "Q4 Financial Report",
    "type": "document",
    "content": "Full extracted text content of the resource..."
  }
}

回應欄位

欄位類型說明
titlestring資源標題
typestring資源類型
contentstring資源內容;其解讀方式取決於 type,如下所述

資源內容格式

data.content 是字串。請使用 data.type 決定如何讀取:

資源類型內容格式讀取步驟
ai_docMarkdown將字串以文件方式呈現或儲存;這也包含 SuperAgent 研究報告
mindmapJSON 編碼物件解碼一次以讀取 layout 與 text 中以 Markdown 標題表示的大綱
ai_ppt含有 slides 的 JSON 編碼物件解碼一次,然後若每張投影片的 content 字串包含 JSON,則再解碼一次
其他含文字類型擷取文字依你的應用程式需求顯示文字

解碼後的 mindmap 內容範例:

{
  "layout": "mindMap",
  "text": "# Topic\n## Branch\n### Leaf"
}

解碼後的 PPT 內容範例:

{
  "slides": [
    {
      "page": 1,
      "title": "Introduction",
      "content": "{\"coreIdea\":\"Introduce the topic\",\"slideOverview\":\"Overview of key points\",\"themeDescription\":\"Light background\"}",
      "theme": "light",
      "url": "https://example.com/slide-preview?signature=..."
    }
  ]
}

投影片欄位取決於生成器,可能不存在或包含額外資訊。請將 coreIdea、slideOverview 與 themeDescription 視為選填的簡報中繼資料。若投影片的 content 是純文字,請直接顯示。

投影片 url 值是暫時性的簽名連結。其有效期會在發出時決定;當連結過期時,請重新擷取資源內容。若要下載 PPTX,請使用獨立的 PPT 匯出工作流程,其回應包含 expires_at。


18. PPT 頁面擷取

對 PPT 資源的特定頁面執行深度內容擷取。會抓取投影片頁面並回傳排序後的內容區塊。回應格式與 擷取 端點相同。

端點

POST https://openapi.felo.ai/v2/livedocs/{short_id}/resources/ppt-retrieve

請求主體

參數類型必填說明
resource_idstring是PPT 資源 ID
page_numberinteger是要擷取的頁碼(從 1 開始)
querystring是描述要尋找內容的查詢
max_chunkinteger否要回傳的最大區塊數(預設:3)

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/resources/ppt-retrieve' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "resource_id": "res_001",
    "page_number": 3,
    "query": "product pricing information",
    "max_chunk": 3
  }'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": [
    {
      "id": "res_001_page_3_chunk_1",
      "title": "Q4 Product Deck",
      "content": "Relevant slide content excerpt...",
      "score": null,
      "metadata": {
        "resource_id": "res_001",
        "page_number": 3,
        "index": 1
      }
    }
  ]
}

回應欄位

與 擷取結果欄位 相同。


錯誤代碼

代碼HTTP 狀態說明
INVALID_API_KEY401API Key 無效或已撤銷
LIVEDOC_CREATE_FAILED502建立 LiveDoc 失敗
LIVEDOC_UPDATE_FAILED502更新 LiveDoc 失敗
LIVEDOC_DELETE_FAILED502刪除 LiveDoc 失敗
LIVEDOC_NOT_FOUND404找不到 LiveDoc
LIVEDOC_LIST_FAILED502列出 LiveDocs 失敗
LIVEDOC_RESOURCE_CREATE_FAILED502建立資源失敗
LIVEDOC_RESOURCE_UPLOAD_FAILED502上傳資源失敗
LIVEDOC_RESOURCE_DELETE_FAILED502刪除資源失敗
LIVEDOC_RESOURCE_NOT_FOUND404找不到資源
LIVEDOC_RESOURCE_LIST_FAILED502列出資源失敗
LIVEDOC_RESOURCE_RETRIEVE_FAILED502擷取資源失敗
LIVEDOC_RESOURCE_ADD_URLS_FAILED502新增 URL 資源失敗

19. 取得 README

取得 LiveDoc 的 README 內容。若未設定 README,則回傳空字串。

端點

GET https://openapi.felo.ai/v2/livedocs/{short_id}/readme

範例

curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/readme' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "summary": "A brief one-line description of the project.",
    "content": "# My LiveDoc\n\nThis is the README content in Markdown."
  }
}

回應欄位

欄位類型說明
summarystring | null一行式專案描述。最多 2000 個字元。
contentstringREADME 內容(Markdown)。若未設定則為空字串。

20. 建立或更新 README

建立或更新 LiveDoc 的 README(upsert 語意)。

端點

PUT https://openapi.felo.ai/v2/livedocs/{short_id}/readme

請求主體

參數類型必填說明
summarystring否一行式專案描述(最多 2000 個字元)
contentstring否README 內容(Markdown)

注意: 必須至少提供 summary 或 content 其中之一。

範例

curl -X PUT 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/readme' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "summary": "A brief one-line description of the project.",
    "content": "# My LiveDoc\n\nThis is the README content in Markdown."
  }'

成功回應(200)

回傳更新後的 README 物件(結構與取得 README 相同)。


21. 附加至 README

將內容附加到既有 README 的結尾。若不存在 README,則會以提供的內容建立新的 README。

端點

POST https://openapi.felo.ai/v2/livedocs/{short_id}/readme/append

請求主體

參數類型必填說明
contentstring是要附加的內容(Markdown)

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/readme/append' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": "\n\n## New Section\n\nAdditional content appended to README."
  }'

成功回應(200)

回傳附加後的完整 README 物件(結構與取得 README 相同)。


22. 刪除 README

刪除 LiveDoc 的 README。

端點

DELETE https://openapi.felo.ai/v2/livedocs/{short_id}/readme

範例

curl -X DELETE 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/readme' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": null
}

23. 列出任務

取得 LiveDoc 中任務的分頁清單。結果依 sort 升冪、status 升冪、created_at 降冪排序。

端點

GET https://openapi.felo.ai/v2/livedocs/{short_id}/tasks

查詢參數

參數類型必填說明
statusinteger否依狀態篩選:0=TODO、1=IN_PROGRESS、2=DONE
labelsstring[]否依標籤篩選(任務必須包含所有指定標籤)
pageinteger否頁碼(從 1 開始)
sizeinteger否每頁大小

範例

curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks?status=0&page=1&size=20' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "total": 1,
    "page": 1,
    "size": 20,
    "items": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "title": "Write documentation",
        "description": "Write API documentation for the new endpoints",
        "status": 0,
        "sort": 0,
        "labels": ["docs", "priority-high"],
        "created_at": "2026-03-19T10:00:00Z",
        "modified_at": "2026-03-19T10:00:00Z"
      }
    ]
  }
}

任務回應欄位

欄位類型說明
idstring任務 ID(UUID)
titlestring任務標題
descriptionstring任務描述
statusinteger任務狀態:0=TODO、1=IN_PROGRESS、2=DONE
sortinteger排序順序(非負)
labelsstring[]標籤清單
operated_bystring操作人簽章,例如 claude-code、openclaw
created_atstring建立時間戳(ISO 8601)
modified_atstring最後修改時間戳(ISO 8601)

24. 建立任務

在 LiveDoc 中建立新任務。

端點

POST https://openapi.felo.ai/v2/livedocs/{short_id}/tasks

請求主體

參數類型必填說明
titlestring是任務標題
descriptionstring否任務描述
statusinteger是任務狀態:0=TODO、1=IN_PROGRESS、2=DONE
sortinteger是排序順序(非負整數)
labelsstring[]否標籤清單(最多 10 個,每個最多 50 個字元)
operated_bystring否操作人簽章,例如 claude-code、openclaw(最多 100 個字元)

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Write documentation",
    "description": "Write API documentation for the new endpoints",
    "status": 0,
    "sort": 0,
    "labels": ["docs", "priority-high"]
  }'

成功回應(200)

回傳已建立的任務物件(結構與列出任務中的 items 相同)。


25. 更新任務

部分更新任務。只會更新有提供的欄位;未提供的欄位會保留目前值。

端點

PATCH https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}

請求主體

所有欄位都是選填。

參數類型必填說明
titlestring否新任務標題
descriptionstring否新任務描述
statusinteger否新狀態:0=TODO、1=IN_PROGRESS、2=DONE
sortinteger否新排序順序(非負)
labelsstring[]否新標籤清單(最多 10 個,每個最多 50 個字元)
operated_bystring否操作人簽章,例如 claude-code、openclaw(最多 100 個字元)

範例

curl -X PATCH 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks/550e8400-e29b-41d4-a716-446655440000' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": 1
  }'

成功回應(200)

回傳更新後的任務物件(結構與列出任務中的 items 相同)。


26. 刪除任務

軟刪除任務。

端點

DELETE https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}

範例

curl -X DELETE 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks/550e8400-e29b-41d4-a716-446655440000' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": null
}

27. 列出任務紀錄

取得任務的紀錄分頁清單(留言與變更歷史),依 created_at 升冪排序。

端點

GET https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}/records

查詢參數

參數類型必填說明
record_typestring否依紀錄類型篩選:comment、edit、status_change
pageinteger否頁碼(從 1 開始)
sizeinteger否每頁大小

範例

curl 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks/550e8400-e29b-41d4-a716-446655440000/records' \
  -H 'Authorization: Bearer YOUR_API_KEY'

成功回應(200)

{
  "status": 200,
  "code": "OK",
  "request_id": "req_example",
  "message": null,
  "data": {
    "total": 2,
    "page": 1,
    "size": 20,
    "items": [
      {
        "id": "rec_001",
        "record_type": "comment",
        "content": "This is a comment",
        "meta": null,
        "task_id": "550e8400-e29b-41d4-a716-446655440000",
        "created_at": "2026-03-19T10:05:00Z",
        "modified_at": "2026-03-19T10:05:00Z"
      },
      {
        "id": "rec_002",
        "record_type": "status_change",
        "content": null,
        "meta": {"from": 0, "to": 1},
        "task_id": "550e8400-e29b-41d4-a716-446655440000",
        "created_at": "2026-03-19T10:10:00Z",
        "modified_at": "2026-03-19T10:10:00Z"
      }
    ]
  }
}

任務紀錄回應欄位

欄位類型說明
idstring紀錄 ID
record_typestring紀錄類型:comment / edit / status_change
contentstring留言文字(僅適用於 comment 類型)
metaobject變更詳細資訊(適用於 edit 與 status_change 類型)
task_idstring父層任務 ID
operated_bystring操作人簽章,例如 claude-code、openclaw
created_atstring建立時間戳(ISO 8601)
modified_atstring最後修改時間戳(ISO 8601)

28. 新增任務留言

為任務新增留言。

端點

POST https://openapi.felo.ai/v2/livedocs/{short_id}/tasks/{task_id}/comments

請求主體

參數類型必填說明
contentstring是留言內容
operated_bystring否操作人簽章,例如 claude-code、openclaw(最多 100 個字元)

範例

curl -X POST 'https://openapi.felo.ai/v2/livedocs/PvyKouzJirXjFdst4uKRK3/tasks/550e8400-e29b-41d4-a716-446655440000/comments' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": "This task is now in progress."
  }'

成功回應(200)

回傳已建立的紀錄物件(結構與列出任務紀錄中的 items 相同)。


更新後的錯誤代碼

代碼HTTP 狀態說明
INVALID_API_KEY401API Key 無效或已撤銷
LIVEDOC_CREATE_FAILED502建立 LiveDoc 失敗
LIVEDOC_UPDATE_FAILED502更新 LiveDoc 失敗
LIVEDOC_DELETE_FAILED502刪除 LiveDoc 失敗
LIVEDOC_NOT_FOUND404找不到 LiveDoc
LIVEDOC_LIST_FAILED502列出 LiveDocs 失敗
LIVEDOC_RESOURCE_CREATE_FAILED502建立資源失敗
LIVEDOC_RESOURCE_UPLOAD_FAILED502上傳資源失敗
LIVEDOC_RESOURCE_DELETE_FAILED502刪除資源失敗
LIVEDOC_RESOURCE_NOT_FOUND404找不到資源
LIVEDOC_RESOURCE_LIST_FAILED502列出資源失敗
LIVEDOC_RESOURCE_RETRIEVE_FAILED502擷取資源失敗
LIVEDOC_RESOURCE_ADD_URLS_FAILED502新增 URL 資源失敗
LIVEDOC_README_GET_FAILED502取得 README 失敗
LIVEDOC_README_UPDATE_FAILED502建立或更新 README 失敗
LIVEDOC_README_DELETE_FAILED502刪除 README 失敗
LIVEDOC_README_NOT_FOUND404找不到 README
LIVEDOC_TASK_LIST_FAILED502列出任務失敗
LIVEDOC_TASK_CREATE_FAILED502建立任務失敗
LIVEDOC_TASK_UPDATE_FAILED502更新任務失敗
LIVEDOC_TASK_DELETE_FAILED502刪除任務失敗
LIVEDOC_TASK_NOT_FOUND404找不到任務
LIVEDOC_TASK_RECORD_LIST_FAILED502列出任務紀錄失敗
LIVEDOC_TASK_COMMENT_CREATE_FAILED502建立任務留言失敗

需要協助嗎?