# 表單與資料收集

> Form definitions, protected submissions with file uploads, and automatic contact capture.

> Markdown version of https://kanorio.com/zh-Hant/developers/products/forms. Append `.md` to any developer docs URL for this format. Index: https://kanorio.com/llms.txt · MCP: https://app.kanorio.com/api/mcp
>
> Translated from the English original: https://kanorio.com/en/developers/products/forms.md

Status: **Available**

表單用於收集訪客資訊：聯絡請求、申請、預約意向與問卷調查。提交內容為資料，而非訂單。

## 核心物件

- **表單 (Forms)。** 在後台建立的問題、同意設定、可用時段與確認信件。
- **提交內容 (Submissions)。** 每一位訪客的回答與檔案，並連結至 Kanorio 建立或更新的聯絡人。

## API 如何運作

- 使用 `<kanorio-form>` 顯示表單，或在 Content Delivery API 的表單端點上建立您自己的標記，這些端點可處理機器人防護與檔案上傳。
- 預設啟用內建的 proof-of-work 檢查作為機器人防護。網站擁有者可在「網站設定 › 機器人防護」下切換為自己的 Cloudflare Turnstile、Google reCAPTCHA 或 hCaptcha 金鑰；`GET /site` 會回傳 `botProtection` 的選擇，而 `<kanorio-form>` 會自動渲染正確的元件。
- 使用 Management API 讀取提交內容。
- `customers.form.submitted` Webhook 會將每筆提交內容推送到您的系統。

請參閱 [表單](https://kanorio.com/zh-Hant/developers/guides/forms) 指南。

## What the APIs expose

| Capability | Status | API | Elements | Hosted site | Webhooks |
| --- | --- | --- | --- | --- | --- |
| Forms & lead capture | Available | Management API `forms.list/get`, `submissions.list/get`; Delivery `GET /forms/:id`, `GET /forms/:id/challenge`, `POST /forms/:id/upload-request`, `POST /forms/:id/submit`; SDK `forms.client({ siteUrl })` | `<KanorioForm />` (`<kanorio-form>`), `<KanorioBotProtection />`, `useKanorioBotProtection()` | `/marketing/forms`, `/data/form_submissions`; page `form` section | `customers.form.submitted` |

## API reference

- Management API: [Forms](https://kanorio.com/en/developers/management-api/forms) (2 operations)
- Management API: [Submissions](https://kanorio.com/en/developers/management-api/submissions) (3 operations)
- Content Delivery API: [Forms](https://kanorio.com/en/developers/delivery-api/forms) (4 operations)

## Webhook events

- `customers.form.submitted`: Fired when a visitor submits an online form (notifies team and webhooks).

Payloads: https://kanorio.com/en/developers/webhooks/events

## Elements

- `<kanorio-form>`: Interactive form with client validation, an anti-spam challenge, private file uploads and submission handling.

## Guides

- [表單](https://kanorio.com/zh-Hant/developers/guides/forms): 將 Kanorio 表單放置在您自己的前端，並為您處理機器人防護、檔案上傳、同意與聯絡人收集。

## For site owners

Dashboard help: https://kanorio.com/zh-Hant/help/online-forms
