wikiAutoUpdate must be true. Enabling Wiki requires an enterprise knowledge base with knowledge scene basic_document_qa; enabling and disabling are asynchronous. When modifying wikiConfig on an already-enabled knowledge base, only the provided keys change, omitted keys keep their values, and changes take effect immediately.Re-enabling after disabling requires the full wikiConfig.extraction again (the configuration is not preserved across disable). Passing wikiConfig without wikiEnabled on a not-enabled knowledge base succeeds but does not enable Wiki (silent no-op). Enabling is asynchronous with no status-query endpoint; confirm the search_type=wiki service is published via List Agents before a trial retrieval.Error codes
This endpoint may return the following error codes; for detailed triggers and message, see the error reference.
| code | status_code | Trigger |
|---|---|---|
InvalidParameter | 400 | wikiAutoUpdate missing or not true when enabling |
BadRequest.EmptyInput | 400 | wikiConfig is an empty object {} |
WikiEditionNotSupported | 400 | The knowledge base is not enterprise when enabling; or downgrading to Standard while requesting enable |
WikiSceneNotSupported | 400 | The knowledge scene is not basic_document_qa when enabling |
WikiConfigInvalid | 400 | An invalid Wiki configuration key was provided; locate it by the field name in message |
WikiOperationConflict | 409 | Requesting disable while enabling is in progress, requesting enable while disabling is in progress, or downgrading while Wiki is being enabled |
Authorizations
DashScope API Key, obtained from the API Key page in the console.
Body
application/jsonKnowledge Base ID. The parameter name is id, not index_id or indexId.
Knowledge Base description.
Knowledge Base name. 1 to 20 characters. Supports Unicode letter characters (including English, Chinese, and digits) and may contain a colon (:), underscore (_), period (.), or hyphen (-).
Minimum Rerank score threshold, in the range [0, 1]. Chunks scoring below this value are filtered out.
Wiki switch. Omitted or null leaves it unchanged. true enables (requires enterprise/Flagship and basic_document_qa); false disables. Both operations are asynchronous; success means accepted. Disabling irreversibly deletes all Wiki Pages, the ontology graph, manual edits, and revision history. Re-enabling requires full configuration and regenerates all documents with fees; Pages get new IDs starting at V1. The original Wiki retrieval service and agent_id are preserved, and the same agent_id becomes usable again after re-enabling completes.
Wiki auto-update switch. Omitted or null leaves it unchanged. Only auto-update mode is supported, so it must be true; required when wikiEnabled is true. Existing documents are submitted for generation automatically, and newly imported documents are submitted after import completes.
Wiki configuration. Required with extraction when enabling. For an already-enabled knowledge base, only provided keys change, omitted keys remain, and changes take effect immediately without re-enabling. Disabling does not preserve configuration; re-enabling requires full wikiConfig.extraction or returns WikiConfigInvalid. Passing only wikiConfig without wikiEnabled on a disabled knowledge base succeeds but does not enable Wiki. An empty object {} returns BadRequest.EmptyInput; omitting all Wiki keys or setting all to null leaves configuration unchanged. Validation messages use snake_case field names.