事件 · 数据源与导入
import.document_failed
导入文档失败
自定义数据源的文档未能导入或未能建立索引(data.reason 为中性代码)。
- 对象类型
- source
- 投递对象
- 具有 admin 角色的 Webhook
有效负载
idstring必填事件 ID(
evt_…),也会作为webhook-id头发送。可用于丢弃重复的投递。typestring必填可选值:
import.document_failedcreated_atstring (date-time)必填变更发生的时间(UTC)。
org_idinteger必填api_versionstring必填data结构定义的契约版本。sequenceinteger在该 Webhook 内的投递序号(测试事件不返回)。
payloadstring必填thin表示没有data:请通过 API 读取对象。可选值:
fullthindataobject字段
documentobject必填自定义数据源的文档;推送 API 的文档结果报告的是相同的处理结果。
字段
external_idstring | null必填titlestring | nullcard_idstring | null必填
run_idintegerjob_idinteger | null索引作业或导出作业。
reasonstring必填中性原因代码(可扩展枚举:将未知代码视为一般性失败)。取值为文档结果代码:
content_invalid、file_rejected、too_large、limit_reached、index_failed。
testboolean必填由
POST /v1/webhooks/{webhook_id}/test发送的测试事件。
投递示例
{
"id": "evt_0123456789abcdef0123456789abcdef",
"type": "import.document_failed",
"created_at": "2026-10-24T10:00:03Z",
"org_id": 1,
"api_version": "1.62.0",
"sequence": 1042,
"object": {
"type": "source",
"id": "5"
},
"payload": "full",
"data": {
"source": {
"id": 5,
"name": "Help center",
"kind": "custom",
"collection_id": 3
},
"document": {
"external_id": "kb-article-118",
"title": "Shipping rates",
"card_id": null
},
"run_id": 902,
"reason": "content_invalid"
},
"test": false
}接收事件
每次投递都是向 Webhook 接收地址发送的 POST 请求,请求体就是这个 JSON。先验证 webhook-signature 头(Standard Webhooks),再信任请求体;在几秒内返回 2xx 状态,之后再处理。投递到同一个 Webhook 的事件保持原有顺序;投递失败时按逐渐拉长的间隔重试。
随时可能新增事件类型和字段:跳过不认识的类型和字段。