---
title: "批量更新/插入FAQ条目"
method: POST
path: "/knowledge-bases/{id}/faq/entries"
tags: ["FAQ管理"]
---

# 批量更新/插入FAQ条目

`POST /knowledge-bases/{id}/faq/entries`

异步批量更新或插入FAQ条目。支持 dry_run 模式（设置 dry_run=true），异步验证不实际导入。
dry_run 模式是异步操作，返回 task_id，通过 /faq/import/progress/{task_id} 查询进度和结果。
验证内容包括：1) 条目基本格式 2) 重复问题（批次内和知识库已有） 3) 内容安全检查。

## Path parameters

- `id` string, required

## Request body

- GithubComTencentWeKnoraInternalTypesFAQBatchUpsertPayload
  - `dry_run` boolean — 仅验证，不实际导入
  - `entries` GithubComTencentWeKnoraInternalTypesFAQEntryPayload[], required
    - `answer_strategy` 'all' | 'random'
    - `answers` string[]
    - `id` integer — ID 可选，用于数据迁移时指定 seq_id（必须小于自增起始值 100000000）
    - `is_enabled` boolean
    - `is_recommended` boolean
    - `negative_questions` string[]
    - `similar_questions` string[]
    - `standard_question` string, required
    - `tag_id` integer
    - `tag_name` string
  - `knowledge_id` string
  - `mode` 'append' | 'replace'
  - `task_id` string — 可选，如果不传则自动生成UUID

## Response `200`

任务ID

- object

## Other responses

- `400` — 请求参数错误

---

[API](https://skmtc.net/tencentblueking/apis/weknora-api.md) · [All operations](https://skmtc.net/tencentblueking/apis/weknora-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tencentblueking/weknora-api/revisions/abce9036def5/schema)
