Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).
Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Dify Enterprise Docs","colors":{"primary":"#0060FF","light":"#688FE8","dark":"#0034FF"},"logo":{"light":"https://assets-docs.dify.ai/2025/05/d05cfc6ebe48f725d171dc71c64a5d16.svg","dark":"https://assets-docs.dify.ai/2025/05/c51f1cda47c1d9a4a162d7736f6e4c53.svg"},"favicon":"https://mintcdn.com/dify-enterprise-docs/zvhvyUvEpyoIONBf/logo/dify-logo.png?fit=max\u0026auto=format\u0026n=zvhvyUvEpyoIONBf\u0026q=85\u0026s=e0afd8349b7a272ad12280680a53043c","navbar":{"links":[{"href":"mailto:support@dify.ai","label":"Support"}]},"footer":{"socials":{"x":"https://x.com/dify_ai","github":"https://github.com/langgenius/dify","linkedin":"https://www.linkedin.com/company/langgenius"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"en/3.13.x/deploy/checklist"},{"language":"zh","href":"zh/3.13.x/deploy/checklist"},{"language":"ja","href":"ja/3.13.x/deploy/checklist"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dify-enterprise-docs","hasAudioNarration":false,"actualSubdomain":"dify-enterprise-docs","customDomains":["enterprise-docs.dify.ai"],"gitSource":{"type":"github","owner":"langgenius","repo":"dify-enterprise-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"collectionId":"b23b91b8-bf61-4fb0-bbf3-d55d66c55095","liveDeploymentHistoryId":"6ae4489fc0a5d590d24bfa62","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae4489fc0a5d590d24bfa62"},"entitlements":{},"buildId":"6ae4489fc0a5d590d24bfa62","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"en","tag":"Developer Resources","count":1947},{"language":"ja","tag":"開発者リソース","count":1947},{"language":"zh","tag":"开发者资源","count":1947},{"language":"en","tag":"Use","count":1401},{"language":"ja","tag":"使い方","count":1401},{"language":"zh","tag":"使用","count":1401},{"language":"en","tag":"Workspace API","count":1353},{"language":"ja","tag":"Workspace API","count":1353},{"language":"zh","tag":"Workspace API","count":1353},{"language":"en","tag":"Knowledge APIs","count":639},{"language":"ja","tag":"ナレッジ API","count":639},{"language":"zh","tag":"知识库 API","count":639},{"language":"en","tag":"Orchestrate","count":620},{"language":"ja","tag":"オーケストレーション","count":620},{"language":"zh","tag":"编排","count":620},{"language":"en","tag":"App APIs","count":545},{"language":"ja","tag":"アプリ API","count":545},{"language":"zh","tag":"应用 API","count":545},{"language":"en","tag":"Workflow \u0026 Chatflow","count":533},{"language":"ja","tag":"ワークフローとチャットフロー","count":533},{"language":"zh","tag":"工作流与对话流","count":533},{"language":"en","tag":"Deploy","count":530},{"language":"ja","tag":"デプロイ","count":530},{"language":"zh","tag":"部署","count":530},{"language":"en","tag":"Plugins","count":524},{"language":"ja","tag":"プラグイン開発","count":522},{"language":"zh","tag":"插件开发","count":522},{"language":"ja","tag":"管理","count":470},{"language":"zh","tag":"管理","count":470},{"language":"en","tag":"Administer","count":420}],"searchSettings":{"maxResults":12}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"body{text-autospace:normal}html[data-current-path=\"/\"] .nav-tabs{display:none}"}],"page":{"pagePath":"en/3.12.x/develop/api/documents/update-document-by-text","slug":"/en/3.12.x/develop/api/documents/update-document-by-text","pageMetadata":{"title":"Update Document by Text","description":"Updates a document's text content, name, or processing configuration. Re-indexes the document when its text changes.","deprecated":null,"version":null,"sidebarTitle":"Update Document by Text","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-text","href":"/en/3.12.x/develop/api/documents/update-document-by-text","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Updates a document’s text content, name, or processing configuration. Re-indexes the document when its text changes.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update Document by Text","description":"Updates a document's text content, name, or processing configuration. Re-indexes the document when its text changes.","deprecated":null,"version":null,"sidebarTitle":"Update Document by Text","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-text","href":"/en/3.12.x/develop/api/documents/update-document-by-text","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Documents"],"summary":"Update Document by Text","description":"Updates a document's text content, name, or processing configuration. Re-indexes the document when its text changes.","operationId":"updateDocumentByText","parameters":["27a604ee-4c0e-4df7-9e64-2270b0a9113e","df7951c6-47ca-49cf-9121-2ad9471c0e48"],"requestBody":"2d69d7c2-af57-4951-8dfc-93deee7c67af","responses":{"200":"d4722689-ad14-454b-ae5e-2296134f52a1","400":"730796f5-a826-4eaf-b2af-489ce07553f0","403":"925a2d6a-4d5e-4f64-bc1c-1dbed3bc54c1","404":"ffeb68b9-cf73-4bf3-a285-ce78f1c7de15"},"x-mint":{"href":"/en/3.12.x/develop/api/documents/update-document-by-text","metadata":{"title":"Update Document by Text","sidebarTitle":"Update Document by Text"}},"method":"post","type":"path","servers":["91ce9074-7be0-4099-a4bd-e3a96ca78986"],"security":["11460940-ca60-497c-a7b7-d3a0122f5f16"],"path":"/datasets/{dataset_id}/documents/{document_id}/update-by-text","baseUrlOptions":["https://{api_base_url}"],"title":"Update Document by Text","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"27a604ee-4c0e-4df7-9e64-2270b0a9113e":{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","isRequired":true,"description":"Knowledge base ID. From [List Knowledge Bases](/en/3.12.x/develop/api/knowledge-bases/list-knowledge-bases).","uniqueKey":"","typeLabel":"string\u003cuuid>"},"description":"Knowledge base ID. From [List Knowledge Bases](/en/3.12.x/develop/api/knowledge-bases/list-knowledge-bases)."},"df7951c6-47ca-49cf-9121-2ad9471c0e48":{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","isRequired":true,"description":"Document ID. From [List Documents](/en/3.12.x/develop/api/documents/list-documents).","uniqueKey":"","typeLabel":"string\u003cuuid>"},"description":"Document ID. From [List Documents](/en/3.12.x/develop/api/documents/list-documents)."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Document name. Required when `text` is provided.","uniqueKey":"name","typeLabel":"string"},"text":{"type":"string","description":"Document text content.","uniqueKey":"text","typeLabel":"string"},"process_rule":{"type":"object","description":"Processing rules for chunking.","required":["mode"],"properties":{"mode":{"type":"string","enum":["automatic","custom","hierarchical"],"description":"`automatic` uses built-in rules, `custom` allows manual configuration, `hierarchical` enables parent-child chunk structure (use with `doc_form: hierarchical_model`).","isRequired":true,"uniqueKey":"process_rule.mode","typeLabel":"enum\u003cstring>"},"rules":{"type":"object","properties":{"pre_processing_rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["remove_stopwords","remove_extra_spaces","remove_urls_emails"],"description":"Rule identifier.","uniqueKey":"process_rule.rules.pre_processing_rules.items.[INDEX].id","typeLabel":"enum\u003cstring>"},"enabled":{"type":"boolean","description":"Whether this preprocessing rule is enabled.","uniqueKey":"process_rule.rules.pre_processing_rules.items.[INDEX].enabled","typeLabel":"boolean"}},"uniqueKey":"process_rule.rules.pre_processing_rules.items.[INDEX]","typeLabel":"object"},"uniqueKey":"process_rule.rules.pre_processing_rules","typeLabel":"object[]"},"segmentation":{"type":"object","properties":{"separator":{"type":"string","default":"\n","description":"Custom separator for splitting text.","uniqueKey":"process_rule.rules.segmentation.separator","typeLabel":"string"},"max_tokens":{"type":"integer","description":"Maximum token count per chunk.","uniqueKey":"process_rule.rules.segmentation.max_tokens","typeLabel":"integer"},"chunk_overlap":{"type":"integer","default":0,"description":"Token overlap between chunks.","uniqueKey":"process_rule.rules.segmentation.chunk_overlap","typeLabel":"integer"}},"uniqueKey":"process_rule.rules.segmentation","typeLabel":"object"}},"uniqueKey":"process_rule.rules","typeLabel":"object"}},"uniqueKey":"process_rule","typeLabel":"object"},"doc_form":{"type":"string","enum":["text_model","hierarchical_model","qa_model"],"default":"text_model","description":"`text_model` for standard text chunking, `hierarchical_model` for parent-child chunk structure, `qa_model` for question-answer pair extraction.","uniqueKey":"doc_form","typeLabel":"enum\u003cstring>"},"doc_language":{"type":"string","default":"English","description":"Language of the document for processing optimization.","uniqueKey":"doc_language","typeLabel":"string"},"retrieval_model":{"type":"object","required":["search_method","reranking_enable","top_k","score_threshold_enabled"],"properties":{"search_method":{"type":"string","description":"Search method used for retrieval.","enum":["keyword_search","semantic_search","full_text_search","hybrid_search"],"isRequired":true,"uniqueKey":"retrieval_model.search_method","typeLabel":"enum\u003cstring>"},"reranking_enable":{"type":"boolean","description":"Whether reranking is enabled.","isRequired":true,"uniqueKey":"retrieval_model.reranking_enable","typeLabel":"boolean"},"top_k":{"type":"integer","description":"Maximum number of results to return.","isRequired":true,"uniqueKey":"retrieval_model.top_k","typeLabel":"integer"},"score_threshold_enabled":{"type":"boolean","description":"Whether score threshold filtering is enabled.","isRequired":true,"uniqueKey":"retrieval_model.score_threshold_enabled","typeLabel":"boolean"},"reranking_model":{"type":"object","description":"Reranking model configuration.","properties":{"reranking_provider_name":{"type":"string","description":"Reranking model provider identifier, formatted as `organization/plugin_name/provider_name` (e.g. `langgenius/cohere/cohere`). A bare name like `cohere` expands to `langgenius/\u003cname>/\u003cname>` and works only for langgenius-published plugins.\n\nGet valid values from the `provider` field of [Get Available Models](/en/3.12.x/develop/api/models/get-available-models) with `model_type=rerank`.","uniqueKey":"retrieval_model.reranking_model.reranking_provider_name","typeLabel":"string"},"reranking_model_name":{"type":"string","description":"Name of the reranking model.","uniqueKey":"retrieval_model.reranking_model.reranking_model_name","typeLabel":"string"}},"uniqueKey":"retrieval_model.reranking_model","typeLabel":"object"},"reranking_mode":{"oneOf":[{"type":"string","enum":["reranking_model","weighted_score"],"description":"Reranking mode. Required when `reranking_enable` is `true`.","uniqueKey":"retrieval_model.reranking_mode.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["reranking_model","weighted_score"],"description":"Reranking mode. Required when `reranking_enable` is `true`.","uniqueKey":"retrieval_model.reranking_mode.oneOf.1","typeLabel":"null"}],"uniqueKey":"retrieval_model.reranking_mode","typeLabel":"enum\u003cstring> | null"},"score_threshold":{"oneOf":[{"type":"number","description":"Minimum similarity score for results. Only effective when `score_threshold_enabled` is `true`.","uniqueKey":"retrieval_model.score_threshold.oneOf.0","typeLabel":"number"},{"type":"null","description":"Minimum similarity score for results. Only effective when `score_threshold_enabled` is `true`.","uniqueKey":"retrieval_model.score_threshold.oneOf.1","typeLabel":"null"}],"uniqueKey":"retrieval_model.score_threshold","typeLabel":"number | null"},"weights":{"oneOf":[{"type":"object","description":"Weight configuration for hybrid search.","properties":{"weight_type":{"type":"string","description":"Strategy for balancing semantic and keyword search weights.","enum":["semantic_first","keyword_first","customized"],"uniqueKey":"retrieval_model.weights.oneOf.0.weight_type","typeLabel":"enum\u003cstring>"},"vector_setting":{"type":"object","description":"Semantic search weight settings.","properties":{"vector_weight":{"type":"number","description":"Weight assigned to semantic (vector) search results.","uniqueKey":"retrieval_model.weights.oneOf.0.vector_setting.vector_weight","typeLabel":"number"},"embedding_provider_name":{"type":"string","description":"Provider of the embedding model used for vector search.","uniqueKey":"retrieval_model.weights.oneOf.0.vector_setting.embedding_provider_name","typeLabel":"string"},"embedding_model_name":{"type":"string","description":"Name of the embedding model used for vector search.","uniqueKey":"retrieval_model.weights.oneOf.0.vector_setting.embedding_model_name","typeLabel":"string"}},"uniqueKey":"retrieval_model.weights.oneOf.0.vector_setting","typeLabel":"object"},"keyword_setting":{"type":"object","description":"Keyword search weight settings.","properties":{"keyword_weight":{"type":"number","description":"Weight assigned to keyword search results.","uniqueKey":"retrieval_model.weights.oneOf.0.keyword_setting.keyword_weight","typeLabel":"number"}},"uniqueKey":"retrieval_model.weights.oneOf.0.keyword_setting","typeLabel":"object"}},"uniqueKey":"retrieval_model.weights.oneOf.0","typeLabel":"object"},{"type":"null","description":"Weight configuration for hybrid search.","properties":{"weight_type":{"type":"string","description":"Strategy for balancing semantic and keyword search weights.","enum":["semantic_first","keyword_first","customized"]},"vector_setting":{"type":"object","description":"Semantic search weight settings.","properties":{"vector_weight":{"type":"number","description":"Weight assigned to semantic (vector) search results."},"embedding_provider_name":{"type":"string","description":"Provider of the embedding model used for vector search."},"embedding_model_name":{"type":"string","description":"Name of the embedding model used for vector search."}}},"keyword_setting":{"type":"object","description":"Keyword search weight settings.","properties":{"keyword_weight":{"type":"number","description":"Weight assigned to keyword search results."}}}},"uniqueKey":"retrieval_model.weights.oneOf.1","typeLabel":"null"}],"uniqueKey":"retrieval_model.weights","typeLabel":"object | null"},"metadata_filtering_conditions":{"oneOf":[{"type":"object","description":"Restrict retrieval to chunks whose document metadata matches the given conditions. Conditions are evaluated server-side against document metadata fields.","properties":{"logical_operator":{"oneOf":[{"type":"string","enum":["and","or"],"default":"and","description":"How to combine multiple conditions.","uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.logical_operator.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","enum":["and","or"],"default":"and","description":"How to combine multiple conditions.","uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.logical_operator.oneOf.1","typeLabel":"null"}],"uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.logical_operator","typeLabel":"enum\u003cstring> | null"},"conditions":{"oneOf":[{"type":"array","description":"List of metadata conditions to evaluate.","items":{"type":"object","required":["name","comparison_operator"],"properties":{"name":{"type":"string","description":"Metadata field name to compare against.","isRequired":true,"uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.0.items.[INDEX].name","typeLabel":"string"},"comparison_operator":{"type":"string","description":"Comparison to apply, by metadata type:\n\n- String or array metadata: `contains`, `not contains`, `start with`, `end with`, `is`, `is not`, `empty`, `not empty`, `in`, `not in`\n- Numeric metadata: `=`, `≠`, `>`, `\u003c`, `≥`, `≤`\n- Time metadata: `before`, `after`","enum":["contains","not contains","start with","end with","is","is not","empty","not empty","in","not in","=","≠",">","\u003c","≥","≤","before","after"],"isRequired":true,"uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.0.items.[INDEX].comparison_operator","typeLabel":"enum\u003cstring>"},"value":{"oneOf":[{"type":"string","description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`.","uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.0.items.[INDEX].value.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.0.items.[INDEX].value.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`.","uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.0.items.[INDEX].value.oneOf.1","typeLabel":"string[]"},{"type":"number","description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`.","uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.0.items.[INDEX].value.oneOf.2","typeLabel":"number"},{"type":"null","uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.0.items.[INDEX].value.oneOf.3","typeLabel":"null"}],"uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.0.items.[INDEX].value","typeLabel":"string | string[] | number | null"}},"uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"List of metadata conditions to evaluate.","items":{"type":"object","required":["name","comparison_operator"],"properties":{"name":{"type":"string","description":"Metadata field name to compare against."},"comparison_operator":{"type":"string","description":"Comparison to apply, by metadata type:\n\n- String or array metadata: `contains`, `not contains`, `start with`, `end with`, `is`, `is not`, `empty`, `not empty`, `in`, `not in`\n- Numeric metadata: `=`, `≠`, `>`, `\u003c`, `≥`, `≤`\n- Time metadata: `before`, `after`","enum":["contains","not contains","start with","end with","is","is not","empty","not empty","in","not in","=","≠",">","\u003c","≥","≤","before","after"]},"value":{"oneOf":[{"type":"string","description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`."},{"type":"array","items":{"type":"string"},"description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`."},{"type":"number","description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`."},{"type":"null"}]}}},"uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions.oneOf.1","typeLabel":"null"}],"uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0.conditions","typeLabel":"object[] | null"}},"uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.0","typeLabel":"object"},{"type":"null","description":"Restrict retrieval to chunks whose document metadata matches the given conditions. Conditions are evaluated server-side against document metadata fields.","properties":{"logical_operator":{"oneOf":[{"type":"string","enum":["and","or"],"default":"and","description":"How to combine multiple conditions."},{"type":"null","enum":["and","or"],"default":"and","description":"How to combine multiple conditions."}]},"conditions":{"oneOf":[{"type":"array","description":"List of metadata conditions to evaluate.","items":{"type":"object","required":["name","comparison_operator"],"properties":{"name":{"type":"string","description":"Metadata field name to compare against."},"comparison_operator":{"type":"string","description":"Comparison to apply, by metadata type:\n\n- String or array metadata: `contains`, `not contains`, `start with`, `end with`, `is`, `is not`, `empty`, `not empty`, `in`, `not in`\n- Numeric metadata: `=`, `≠`, `>`, `\u003c`, `≥`, `≤`\n- Time metadata: `before`, `after`","enum":["contains","not contains","start with","end with","is","is not","empty","not empty","in","not in","=","≠",">","\u003c","≥","≤","before","after"]},"value":{"oneOf":[{"type":"string","description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`."},{"type":"array","items":{"type":"string"},"description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`."},{"type":"number","description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`."},{"type":"null"}]}}}},{"type":"null","description":"List of metadata conditions to evaluate.","items":{"type":"object","required":["name","comparison_operator"],"properties":{"name":{"type":"string","description":"Metadata field name to compare against."},"comparison_operator":{"type":"string","description":"Comparison to apply, by metadata type:\n\n- String or array metadata: `contains`, `not contains`, `start with`, `end with`, `is`, `is not`, `empty`, `not empty`, `in`, `not in`\n- Numeric metadata: `=`, `≠`, `>`, `\u003c`, `≥`, `≤`\n- Time metadata: `before`, `after`","enum":["contains","not contains","start with","end with","is","is not","empty","not empty","in","not in","=","≠",">","\u003c","≥","≤","before","after"]},"value":{"oneOf":[{"type":"string","description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`."},{"type":"array","items":{"type":"string"},"description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`."},{"type":"number","description":"Value to compare against. Type depends on `comparison_operator`: string for most string operators, array of strings for `in` and `not in`, number for numeric operators, and omitted for `empty` and `not empty`."},{"type":"null"}]}}}}]}},"uniqueKey":"retrieval_model.metadata_filtering_conditions.oneOf.1","typeLabel":"null"}],"uniqueKey":"retrieval_model.metadata_filtering_conditions","typeLabel":"object | null"}},"description":"Controls how chunks are searched and ranked when querying this knowledge base.","uniqueKey":"retrieval_model","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"\u003cstring>","text":"\u003cstring>","doc_form":"text_model","doc_language":"English"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d4722689-ad14-454b-ae5e-2296134f52a1":{"description":"Document updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"document":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the document.","uniqueKey":"document.id","typeLabel":"string"},"position":{"type":"integer","description":"Display position of the document in the list.","uniqueKey":"document.position","typeLabel":"integer"},"data_source_type":{"type":"string","description":"How the document was created. `upload_file` for file uploads, `notion_import` for Notion imports.","uniqueKey":"document.data_source_type","typeLabel":"string"},"data_source_info":{"type":"object","description":"Raw data source information, varies by `data_source_type`.","uniqueKey":"document.data_source_info","typeLabel":"object"},"data_source_detail_dict":{"type":"object","description":"Detailed data source information including file details.","uniqueKey":"document.data_source_detail_dict","typeLabel":"object"},"dataset_process_rule_id":{"type":"string","description":"ID of the processing rule applied to this document.","uniqueKey":"document.dataset_process_rule_id","typeLabel":"string"},"name":{"type":"string","description":"Document name.","uniqueKey":"document.name","typeLabel":"string"},"created_from":{"type":"string","description":"Origin of the document. `api` for API creation, `web` for UI creation.","uniqueKey":"document.created_from","typeLabel":"string"},"created_by":{"type":"string","description":"ID of the user who created the document.","uniqueKey":"document.created_by","typeLabel":"string"},"created_at":{"type":"number","description":"Creation timestamp (Unix epoch in seconds).","uniqueKey":"document.created_at","typeLabel":"number"},"tokens":{"type":"integer","description":"Total number of tokens in the document.","uniqueKey":"document.tokens","typeLabel":"integer"},"indexing_status":{"type":"string","description":"Current indexing status. `waiting` for queued, `parsing` while extracting content, `cleaning` while removing noise, `splitting` while chunking, `indexing` while building vectors, `completed` when ready, `error` if failed, `paused` if manually paused.","uniqueKey":"document.indexing_status","typeLabel":"string"},"error":{"oneOf":[{"type":"string","description":"Error message if indexing failed. `null` when no error.","uniqueKey":"document.error.oneOf.0","typeLabel":"string"},{"type":"null","description":"Error message if indexing failed. `null` when no error.","uniqueKey":"document.error.oneOf.1","typeLabel":"null"}],"uniqueKey":"document.error","typeLabel":"string | null"},"enabled":{"type":"boolean","description":"Whether the document is enabled for retrieval.","uniqueKey":"document.enabled","typeLabel":"boolean"},"disabled_at":{"oneOf":[{"type":"number","description":"Timestamp when the document was disabled. `null` if enabled.","uniqueKey":"document.disabled_at.oneOf.0","typeLabel":"number"},{"type":"null","description":"Timestamp when the document was disabled. `null` if enabled.","uniqueKey":"document.disabled_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"document.disabled_at","typeLabel":"number | null"},"disabled_by":{"oneOf":[{"type":"string","description":"ID of the user who disabled the document. `null` if enabled.","uniqueKey":"document.disabled_by.oneOf.0","typeLabel":"string"},{"type":"null","description":"ID of the user who disabled the document. `null` if enabled.","uniqueKey":"document.disabled_by.oneOf.1","typeLabel":"null"}],"uniqueKey":"document.disabled_by","typeLabel":"string | null"},"archived":{"type":"boolean","description":"Whether the document is archived.","uniqueKey":"document.archived","typeLabel":"boolean"},"display_status":{"type":"string","description":"User-facing display status derived from `indexing_status` and `enabled` state.","uniqueKey":"document.display_status","typeLabel":"string"},"word_count":{"type":"integer","description":"Total word count of the document.","uniqueKey":"document.word_count","typeLabel":"integer"},"hit_count":{"type":"integer","description":"Number of times the document has been matched in retrieval queries.","uniqueKey":"document.hit_count","typeLabel":"integer"},"doc_form":{"type":"string","description":"Document chunking mode. `text_model` for standard text chunking, `hierarchical_model` for parent-child structure, `qa_model` for QA pair extraction.","uniqueKey":"document.doc_form","typeLabel":"string"},"doc_metadata":{"type":"array","description":"Metadata values assigned to this document.","items":{"type":"object","properties":{"id":{"type":"string","description":"Metadata field identifier.","uniqueKey":"document.doc_metadata.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","description":"Metadata field name.","uniqueKey":"document.doc_metadata.items.[INDEX].name","typeLabel":"string"},"type":{"type":"string","description":"Metadata field value type.","uniqueKey":"document.doc_metadata.items.[INDEX].type","typeLabel":"string"},"value":{"type":"string","description":"Metadata value for this document.","uniqueKey":"document.doc_metadata.items.[INDEX].value","typeLabel":"string"}},"uniqueKey":"document.doc_metadata.items.[INDEX]","typeLabel":"object"},"uniqueKey":"document.doc_metadata","typeLabel":"object[]"},"summary_index_status":{"oneOf":[{"type":"string","description":"Status of the summary index for this document. `null` if summary indexing is not configured.","uniqueKey":"document.summary_index_status.oneOf.0","typeLabel":"string"},{"type":"null","description":"Status of the summary index for this document. `null` if summary indexing is not configured.","uniqueKey":"document.summary_index_status.oneOf.1","typeLabel":"null"}],"uniqueKey":"document.summary_index_status","typeLabel":"string | null"},"need_summary":{"type":"boolean","description":"Whether a summary needs to be generated for this document.","uniqueKey":"document.need_summary","typeLabel":"boolean"}},"uniqueKey":"document","typeLabel":"object"},"batch":{"type":"string","description":"Batch ID for tracking indexing progress.","uniqueKey":"batch","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"success":{"title":"success","value":{"document":{"id":"a8e0e5b5-78c6-4130-a5ce-25feb0e0b4ac","position":1,"data_source_type":"upload_file","data_source_info":{"upload_file_id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"data_source_detail_dict":{"upload_file":{"id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","name":"guide.txt","size":2048,"extension":"txt","mime_type":"text/plain","created_by":"ad313dd6-ef04-4dd1-a5b0-c0f0b9e2e7e4","created_at":1741267200}},"dataset_process_rule_id":"e1f2a3b4-c5d6-7890-ef12-345678901234","name":"guide.txt","created_from":"api","created_by":"ad313dd6-ef04-4dd1-a5b0-c0f0b9e2e7e4","created_at":1741267200,"tokens":512,"indexing_status":"completed","error":null,"enabled":true,"disabled_at":null,"disabled_by":null,"archived":false,"display_status":"available","word_count":350,"hit_count":0,"doc_form":"text_model","doc_metadata":[],"summary_index_status":null,"need_summary":false},"batch":"20250306150245647595"}}},"exampleType":"examples"}},"exampleType":"examples"},"730796f5-a826-4eaf-b2af-489ce07553f0":{"description":"- `provider_not_initialize` : No model provider credentials are configured for the workspace.\n- `invalid_param` : `name` is required when `text` is provided, or `doc_form` is invalid.\n- `invalid_param` : The document is not available for update (only available documents can be updated).","content":{"application/json":{"examples":{"provider_not_initialize":{"title":"provider_not_initialize","value":{"status":400,"code":"provider_not_initialize","message":"No valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials."}},"invalid_param_name":{"title":"invalid_param_name","value":{"status":400,"code":"invalid_param","message":"name is required when text is provided."}},"invalid_param_not_available":{"title":"invalid_param_not_available","value":{"status":400,"code":"invalid_param","message":"Document is not available"}}},"exampleType":"examples"}},"exampleType":"examples"},"925a2d6a-4d5e-4f64-bc1c-1dbed3bc54c1":{"description":"`forbidden` : Knowledge base API access is not enabled.","content":{"application/json":{"examples":{"forbidden_1":{"title":"forbidden_1","value":{"status":403,"code":"forbidden","message":"Dataset api access is not enabled."}}},"exampleType":"examples"}},"exampleType":"examples"},"ffeb68b9-cf73-4bf3-a285-ce78f1c7de15":{"description":"- `not_found` : Knowledge base not found.\n- `not_found` : Document not found.","content":{"application/json":{"examples":{"not_found_1":{"title":"not_found_1","value":{"status":404,"code":"not_found","message":"Dataset not found."}},"not_found_2":{"title":"not_found_2","value":{"status":404,"code":"not_found","message":"Document not found."}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"11460940-ca60-497c-a7b7-d3a0122f5f16":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"API_KEY","description":"Every request authenticates with an API key: `Authorization: Bearer {API_KEY}`. App endpoints take an app API key; knowledge endpoints take a knowledge base API key ([Get Started](/en/3.12.x/develop/api/guides/get-started)).\n\nKeep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP `401` (`unauthorized`).","scopes":[]}}},"servers":{"91ce9074-7be0-4099-a4bd-e3a96ca78986":{"url":"https://{api_base_url}","description":"Base URL of the Dify Service API. Replace it with your deployment's API endpoint.","variables":{"api_base_url":{"default":"api.example.com/v1","description":"Host and path of the API base URL, without the `https://` prefix."}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API_KEY","description":"Every request authenticates with an API key: `Authorization: Bearer {API_KEY}`. App endpoints take an app API key; knowledge endpoints take a knowledge base API key ([Get Started](/en/3.12.x/develop/api/guides/get-started)).\n\nKeep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP `401` (`unauthorized`).","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Every request authenticates with an API key: `Authorization: Bearer {API_KEY}`. App endpoints take an app API key; knowledge endpoints take a knowledge base API key ([Get Started](/en/3.12.x/develop/api/guides/get-started)).\n\nKeep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP `401` (`unauthorized`).","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKeyAuth","name":"Authorization"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"en/3.12.x/develop/api/openapi_service.json"},"subdomain":"dify-enterprise-docs","siteName":"Dify Enterprise Docs","title":"Update Document by Text - Dify Enterprise Docs","navMaps":{"firstHrefInVersion":{"3.13.x":{"href":"/en/3.13.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.12.x":{"href":"/en/3.12.x/develop/api/documents/update-document-by-text","matchLevel":0},"3.11.x":{"href":"/en/3.11.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.10.x":{"href":"/en/3.10.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.9.x":{"href":"/en/3.9.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.8.x":{"href":"/en/3.8.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.7.x":{"href":"/en/3.7.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.6.x":{"href":"/en/3.6.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.5.x":{"href":"/en/3.5.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.4.x":{"href":"/en/3.4.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.3.x":{"href":"/en/3.3.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.2.x":{"href":"/en/3.2.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.1.x":{"href":"/en/3.1.x/develop/api/documents/update-document-by-text","matchLevel":1},"3.0.x":{"href":"/en/3.0.x/develop/api/documents/update-document-by-text","matchLevel":1},"2.8.x":{"href":"/en/2.8.x/develop/api/documents/update-document-by-text","matchLevel":1},"2.7.x":{"href":"/en/2.7.x/develop/api/documents/update-document-by-text","matchLevel":1},"2.6.x":{"href":"/en/2.6.x/develop/api/documents/update-document-by-text","matchLevel":1},"2.5.x":{"href":"/en/2.5.x/develop/api/documents/update-document-by-text","matchLevel":1}},"firstHrefInLanguage":{"en":{"href":"/en/3.12.x/develop/api/documents/update-document-by-text","matchLevel":0},"zh":{"href":"/zh/3.12.x/develop/api/documents/update-document-by-text","matchLevel":1},"ja":{"href":"/ja/3.12.x/develop/api/documents/update-document-by-text","matchLevel":1}}},"lastModified":"2026-09-29T09:44:52.287Z","originalFileLocation":"en/3.12.x/develop/api/documents/update-document-by-text.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Updates a document\u0026#x27;s text content, name, or processing configuration. Re-indexes the document when its text changes.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Dify Enterprise Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update Document by Text - Dify Enterprise Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Updates a document\u0026#x27;s text content, name, or processing configuration. Re-indexes the document when its text changes.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Dify Enterprise Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dify-enterprise-docs.mintlify.app/_mintlify/api/og/v2?division=Documents\u0026amp;title=Update+Document+by+Text\u0026amp;description=Updates+a+document%27s+text+content%2C+name%2C+or+processing+configuration.+Re-indexes+the+document+when+its+text+changes.\u0026amp;theme=fc270d2c96587e5833522f0e\u0026amp;signature=8ef1dfc474826afe4606691e1f21ce2b9e7b76326a48970b50b68ff3421dc47b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update Document by Text - Dify Enterprise Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Updates a document\u0026#x27;s text content, name, or processing configuration. Re-indexes the document when its text changes.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dify-enterprise-docs.mintlify.app/_mintlify/api/og/v2?division=Documents\u0026amp;title=Update+Document+by+Text\u0026amp;description=Updates+a+document%27s+text+content%2C+name%2C+or+processing+configuration.+Re-indexes+the+document+when+its+text+changes.\u0026amp;theme=fc270d2c96587e5833522f0e\u0026amp;signature=8ef1dfc474826afe4606691e1f21ce2b9e7b76326a48970b50b68ff3421dc47b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/dify-enterprise-docs/0-RXGeruZhgwpkgZ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Dify Enterprise Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0060FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/3.12.x/develop/api/documents/update-document-by-text.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://enterprise-docs.dify.ai/zh/3.12.x/develop/api/documents/update-document-by-text\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://enterprise-docs.dify.ai/ja/3.12.x/develop/api/documents/update-document-by-text\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://enterprise-docs.dify.ai/#organization\",\"name\":\"Dify Enterprise Docs\",\"url\":\"https://enterprise-docs.dify.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://assets-docs.dify.ai/2025/05/d05cfc6ebe48f725d171dc71c64a5d16.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://enterprise-docs.dify.ai#website\",\"name\":\"Dify Enterprise Docs\",\"url\":\"https://enterprise-docs.dify.ai\",\"publisher\":{\"@id\":\"https://enterprise-docs.dify.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text#webpage\",\"url\":\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text\",\"name\":\"Update Document by Text\",\"description\":\"Updates a document's text content, name, or processing configuration. Re-indexes the document when its text changes.\",\"dateModified\":\"2026-09-29T09:44:52.287Z\",\"isPartOf\":{\"@id\":\"https://enterprise-docs.dify.ai#website\"},\"breadcrumb\":{\"@id\":\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Knowledge APIs\",\"item\":\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/knowledge-bases/create-an-empty-knowledge-base\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documents\",\"item\":\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/create-document-by-text\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Update Document by Text\",\"item\":\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text#apireference\",\"headline\":\"Update Document by Text\",\"name\":\"Update Document by Text\",\"description\":\"Updates a document's text content, name, or processing configuration. Re-indexes the document when its text changes.\",\"url\":\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text\",\"mainEntityOfPage\":{\"@id\":\"https://enterprise-docs.dify.ai/en/3.12.x/develop/api/documents/update-document-by-text#webpage\"},\"dateModified\":\"2026-09-29T09:44:52.287Z\",\"publisher\":{\"@id\":\"https://enterprise-docs.dify.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://enterprise-docs.dify.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Dify Enterprise Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Dify Enterprise Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"versions":[{"version":"3.13.x","tag":"LTS","pages":[{"title":"3.13.x","href":"/en/3.13.x/develop/api/documents/update-document-by-text"}]},{"version":"3.12.x","tabs":[{"tab":"Deploy","pages":[{"title":"Deploy","href":"/en/3.12.x/deploy/checklist"}]},{"tab":"Administer","pages":[{"title":"Administer","href":"/en/3.12.x/administer/workspace-management"}]},{"tab":"Use","pages":[{"title":"Use","href":"/en/3.12.x/use/build/workflow-chatflow"}]},{"tab":"Developer Resources","menu":[{"item":"Workspace API","groups":[{"group":"Guides","icon":"book-open","pages":[{"title":"Get Started with the Dify API","sidebarTitle":"Get Started","href":"/en/3.12.x/develop/api/guides/get-started"},{"group":"API Overviews","expanded":true,"pages":[{"title":"Chatflow App API","sidebarTitle":"Chatflow","href":"/en/3.12.x/develop/api/guides/chatflow"},{"title":"Workflow App API","sidebarTitle":"Workflow","href":"/en/3.12.x/develop/api/guides/workflow"},{"title":"New Agent API","sidebarTitle":"New Agent","tag":"Beta","href":"/en/3.12.x/develop/api/guides/agent"},{"title":"Knowledge API","sidebarTitle":"Knowledge","href":"/en/3.12.x/develop/api/guides/knowledge"},{"title":"Chat App API","sidebarTitle":"Chatbot and Agent","href":"/en/3.12.x/develop/api/guides/chat"},{"title":"Completion App API","sidebarTitle":"Text Generator","href":"/en/3.12.x/develop/api/guides/completion"}]},{"title":"Consume Streaming Responses","sidebarTitle":"SSE Streaming","href":"/en/3.12.x/develop/api/guides/streaming"},{"title":"Human Input API Integration Flow","sidebarTitle":"Human Input Flow","href":"/en/3.12.x/develop/api/guides/human-input-flow"},{"title":"End User Identity","sidebarTitle":"End User Identity","href":"/en/3.12.x/develop/api/guides/end-user-identity"},{"title":"Handle Errors and Rate Limits","sidebarTitle":"Errors \u0026 Rate Limits","href":"/en/3.12.x/develop/api/guides/errors"}]},{"group":"App APIs","icon":"code","pages":[{"group":"Chat Messages","pages":[{"title":"Send Chat Message","deprecated":null,"version":null,"sidebarTitle":"Send Chat Message","openapi":"/en/3.12.x/develop/api/openapi_service.json post /chat-messages","href":"/en/3.12.x/develop/api/chat-messages/send-chat-message"},{"title":"Stop Chat Message Generation","deprecated":null,"version":null,"sidebarTitle":"Stop Chat Message Generation","openapi":"/en/3.12.x/develop/api/openapi_service.json post /chat-messages/{task_id}/stop","href":"/en/3.12.x/develop/api/chat-messages/stop-chat-message-generation"},{"title":"Get Next Suggested Questions","deprecated":null,"version":null,"sidebarTitle":"Get Next Suggested Questions","openapi":"/en/3.12.x/develop/api/openapi_service.json get /messages/{message_id}/suggested","href":"/en/3.12.x/develop/api/chat-messages/get-next-suggested-questions"}]},{"group":"Completion Messages","pages":[{"title":"Send Completion Message","deprecated":null,"version":null,"sidebarTitle":"Send Completion Message","openapi":"/en/3.12.x/develop/api/openapi_service.json post /completion-messages","href":"/en/3.12.x/develop/api/completion-messages/send-completion-message"},{"title":"Stop Completion Message Generation","deprecated":null,"version":null,"sidebarTitle":"Stop Completion Message Generation","openapi":"/en/3.12.x/develop/api/openapi_service.json post /completion-messages/{task_id}/stop","href":"/en/3.12.x/develop/api/completion-messages/stop-completion-message-generation"}]},{"group":"Workflow Runs","pages":[{"title":"Run Workflow","deprecated":null,"version":null,"sidebarTitle":"Run Workflow","openapi":"/en/3.12.x/develop/api/openapi_service.json post /workflows/run","href":"/en/3.12.x/develop/api/workflow-runs/run-workflow"},{"title":"Run Workflow by ID","deprecated":null,"version":null,"sidebarTitle":"Run Workflow by ID","openapi":"/en/3.12.x/develop/api/openapi_service.json post /workflows/{workflow_id}/run","href":"/en/3.12.x/develop/api/workflow-runs/run-workflow-by-id"},{"title":"Stop Workflow Task","deprecated":null,"version":null,"sidebarTitle":"Stop Workflow Task","openapi":"/en/3.12.x/develop/api/openapi_service.json post /workflows/tasks/{task_id}/stop","href":"/en/3.12.x/develop/api/workflow-runs/stop-workflow-task"},{"title":"Get Workflow Run Detail","deprecated":null,"version":null,"sidebarTitle":"Get Workflow Run Detail","openapi":"/en/3.12.x/develop/api/openapi_service.json get /workflows/run/{workflow_run_id}","href":"/en/3.12.x/develop/api/workflow-runs/get-workflow-run-detail"},{"title":"List Workflow Logs","deprecated":null,"version":null,"sidebarTitle":"List Workflow Logs","openapi":"/en/3.12.x/develop/api/openapi_service.json get /workflows/logs","href":"/en/3.12.x/develop/api/workflow-runs/list-workflow-logs"},{"title":"Stream Workflow Events","deprecated":null,"version":null,"sidebarTitle":"Stream Workflow Events","openapi":"/en/3.12.x/develop/api/openapi_service.json get /workflow/{workflow_run_id}/events","href":"/en/3.12.x/develop/api/workflow-runs/stream-workflow-events"}]},{"group":"Conversations","pages":[{"title":"List Conversations","deprecated":null,"version":null,"sidebarTitle":"List Conversations","openapi":"/en/3.12.x/develop/api/openapi_service.json get /conversations","href":"/en/3.12.x/develop/api/conversations/list-conversations"},{"title":"List Conversation Messages","deprecated":null,"version":null,"sidebarTitle":"List Conversation Messages","openapi":"/en/3.12.x/develop/api/openapi_service.json get /messages","href":"/en/3.12.x/develop/api/conversations/list-conversation-messages"},{"title":"List Conversation Variables","deprecated":null,"version":null,"sidebarTitle":"List Conversation Variables","openapi":"/en/3.12.x/develop/api/openapi_service.json get /conversations/{conversation_id}/variables","href":"/en/3.12.x/develop/api/conversations/list-conversation-variables"},{"title":"Rename Conversation","deprecated":null,"version":null,"sidebarTitle":"Rename Conversation","openapi":"/en/3.12.x/develop/api/openapi_service.json post /conversations/{conversation_id}/name","href":"/en/3.12.x/develop/api/conversations/rename-conversation"},{"title":"Update Conversation Variable","deprecated":null,"version":null,"sidebarTitle":"Update Conversation Variable","openapi":"/en/3.12.x/develop/api/openapi_service.json put /conversations/{conversation_id}/variables/{variable_id}","href":"/en/3.12.x/develop/api/conversations/update-conversation-variable"},{"title":"Delete Conversation","deprecated":null,"version":null,"sidebarTitle":"Delete Conversation","openapi":"/en/3.12.x/develop/api/openapi_service.json delete /conversations/{conversation_id}","href":"/en/3.12.x/develop/api/conversations/delete-conversation"}]},{"group":"Files","pages":[{"title":"Upload File","deprecated":null,"version":null,"sidebarTitle":"Upload File","openapi":"/en/3.12.x/develop/api/openapi_service.json post /files/upload","href":"/en/3.12.x/develop/api/files/upload-file"},{"title":"Download File","deprecated":null,"version":null,"sidebarTitle":"Download File","openapi":"/en/3.12.x/develop/api/openapi_service.json get /files/{file_id}/preview","href":"/en/3.12.x/develop/api/files/download-file"}]},{"group":"Audio","pages":[{"title":"Convert Audio to Text","deprecated":null,"version":null,"sidebarTitle":"Convert Audio to Text","openapi":"/en/3.12.x/develop/api/openapi_service.json post /audio-to-text","href":"/en/3.12.x/develop/api/audio/convert-audio-to-text"},{"title":"Convert Text to Audio","deprecated":null,"version":null,"sidebarTitle":"Convert Text to Audio","openapi":"/en/3.12.x/develop/api/openapi_service.json post /text-to-audio","href":"/en/3.12.x/develop/api/audio/convert-text-to-audio"}]},{"group":"Applications","pages":[{"title":"Get App Info","deprecated":null,"version":null,"sidebarTitle":"Get App Info","openapi":"/en/3.12.x/develop/api/openapi_service.json get /info","href":"/en/3.12.x/develop/api/applications/get-app-info"},{"title":"Get App Parameters","deprecated":null,"version":null,"sidebarTitle":"Get App Parameters","openapi":"/en/3.12.x/develop/api/openapi_service.json get /parameters","href":"/en/3.12.x/develop/api/applications/get-app-parameters"},{"title":"Get App Meta","deprecated":null,"version":null,"sidebarTitle":"Get App Meta","openapi":"/en/3.12.x/develop/api/openapi_service.json get /meta","href":"/en/3.12.x/develop/api/applications/get-app-meta"},{"title":"Get App WebApp Settings","deprecated":null,"version":null,"sidebarTitle":"Get App WebApp Settings","openapi":"/en/3.12.x/develop/api/openapi_service.json get /site","href":"/en/3.12.x/develop/api/applications/get-app-webapp-settings"}]},{"group":"Feedback","pages":[{"title":"Submit Message Feedback","deprecated":null,"version":null,"sidebarTitle":"Submit Message Feedback","openapi":"/en/3.12.x/develop/api/openapi_service.json post /messages/{message_id}/feedbacks","href":"/en/3.12.x/develop/api/feedback/submit-message-feedback"},{"title":"List App Feedbacks","deprecated":null,"version":null,"sidebarTitle":"List App Feedbacks","openapi":"/en/3.12.x/develop/api/openapi_service.json get /app/feedbacks","href":"/en/3.12.x/develop/api/feedback/list-app-feedbacks"}]},{"group":"Annotations","pages":[{"title":"Create Annotation","deprecated":null,"version":null,"sidebarTitle":"Create Annotation","openapi":"/en/3.12.x/develop/api/openapi_service.json post /apps/annotations","href":"/en/3.12.x/develop/api/annotations/create-annotation"},{"title":"List Annotations","deprecated":null,"version":null,"sidebarTitle":"List Annotations","openapi":"/en/3.12.x/develop/api/openapi_service.json get /apps/annotations","href":"/en/3.12.x/develop/api/annotations/list-annotations"},{"title":"Update Annotation","deprecated":null,"version":null,"sidebarTitle":"Update Annotation","openapi":"/en/3.12.x/develop/api/openapi_service.json put /apps/annotations/{annotation_id}","href":"/en/3.12.x/develop/api/annotations/update-annotation"},{"title":"Delete Annotation","deprecated":null,"version":null,"sidebarTitle":"Delete Annotation","openapi":"/en/3.12.x/develop/api/openapi_service.json delete /apps/annotations/{annotation_id}","href":"/en/3.12.x/develop/api/annotations/delete-annotation"},{"title":"Configure Annotation Reply","deprecated":null,"version":null,"sidebarTitle":"Configure Annotation Reply","openapi":"/en/3.12.x/develop/api/openapi_service.json post /apps/annotation-reply/{action}","href":"/en/3.12.x/develop/api/annotations/configure-annotation-reply"},{"title":"Get Annotation Reply Job Status","deprecated":null,"version":null,"sidebarTitle":"Get Annotation Reply Job Status","openapi":"/en/3.12.x/develop/api/openapi_service.json get /apps/annotation-reply/{action}/status/{job_id}","href":"/en/3.12.x/develop/api/annotations/get-annotation-reply-job-status"}]},{"group":"End Users","pages":[{"title":"Get End User Info","deprecated":null,"version":null,"sidebarTitle":"Get End User Info","openapi":"/en/3.12.x/develop/api/openapi_service.json get /end-users/{end_user_id}","href":"/en/3.12.x/develop/api/end-users/get-end-user-info"}]},{"group":"Human Input","pages":[{"title":"Get Human Input Form","deprecated":null,"version":null,"sidebarTitle":"Get Human Input Form","openapi":"/en/3.12.x/develop/api/openapi_service.json get /form/human_input/{form_token}","href":"/en/3.12.x/develop/api/human-input/get-human-input-form"},{"title":"Submit Human Input Form","deprecated":null,"version":null,"sidebarTitle":"Submit Human Input Form","openapi":"/en/3.12.x/develop/api/openapi_service.json post /form/human_input/{form_token}","href":"/en/3.12.x/develop/api/human-input/submit-human-input-form"}]}]},{"group":"Knowledge APIs","icon":"database","pages":[{"group":"Knowledge Bases","pages":[{"title":"Create an Empty Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Create an Empty Knowledge Base","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets","href":"/en/3.12.x/develop/api/knowledge-bases/create-an-empty-knowledge-base"},{"title":"List Knowledge Bases","deprecated":null,"version":null,"sidebarTitle":"List Knowledge Bases","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets","href":"/en/3.12.x/develop/api/knowledge-bases/list-knowledge-bases"},{"title":"Get Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Get Knowledge Base","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}","href":"/en/3.12.x/develop/api/knowledge-bases/get-knowledge-base"},{"title":"Update Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Update Knowledge Base","openapi":"/en/3.12.x/develop/api/openapi_service.json patch /datasets/{dataset_id}","href":"/en/3.12.x/develop/api/knowledge-bases/update-knowledge-base"},{"title":"Delete Knowledge Base","deprecated":null,"version":null,"sidebarTitle":"Delete Knowledge Base","openapi":"/en/3.12.x/develop/api/openapi_service.json delete /datasets/{dataset_id}","href":"/en/3.12.x/develop/api/knowledge-bases/delete-knowledge-base"},{"title":"Retrieve Chunks from a Knowledge Base / Test Retrieval","deprecated":null,"version":null,"sidebarTitle":"Retrieve Chunks from a Knowledge Base / Test Retrieval","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/retrieve","href":"/en/3.12.x/develop/api/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval"}]},{"group":"Documents","pages":[{"title":"Create Document by Text","deprecated":null,"version":null,"sidebarTitle":"Create Document by Text","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/document/create-by-text","href":"/en/3.12.x/develop/api/documents/create-document-by-text"},{"title":"Create Document by File","deprecated":null,"version":null,"sidebarTitle":"Create Document by File","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/document/create-by-file","href":"/en/3.12.x/develop/api/documents/create-document-by-file"},{"title":"List Documents","deprecated":null,"version":null,"sidebarTitle":"List Documents","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/documents","href":"/en/3.12.x/develop/api/documents/list-documents"},{"title":"Get Document","deprecated":null,"version":null,"sidebarTitle":"Get Document","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}","href":"/en/3.12.x/develop/api/documents/get-document"},{"title":"Delete Document","deprecated":null,"version":null,"sidebarTitle":"Delete Document","openapi":"/en/3.12.x/develop/api/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}","href":"/en/3.12.x/develop/api/documents/delete-document"},{"title":"Update Document","deprecated":null,"version":null,"sidebarTitle":"Update Document","openapi":"/en/3.12.x/develop/api/openapi_service.json patch /datasets/{dataset_id}/documents/{document_id}","href":"/en/3.12.x/develop/api/documents/update-document"},{"title":"Download Document","deprecated":null,"version":null,"sidebarTitle":"Download Document","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/download","href":"/en/3.12.x/develop/api/documents/download-document"},{"title":"Get Document Indexing Status","description":"Returns indexing progress for every document in a batch: the current stage and chunk completion counts. Poll until each `indexing_status` reaches `completed` or `error`. Status advances through `waiting` → `parsing` → `cleaning` → `splitting` → `indexing` → `completed`.","deprecated":null,"version":null,"sidebarTitle":"Get Document Indexing Status","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/documents/{batch}/indexing-status","href":"/en/3.12.x/develop/api/documents/get-document-indexing-status"},{"title":"Update Document by Text","deprecated":null,"version":null,"sidebarTitle":"Update Document by Text","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-text","href":"/en/3.12.x/develop/api/documents/update-document-by-text"},{"title":"Update Document by File","description":"Deprecated. Use [Update Document](/en/3.12.x/develop/api/documents/update-document) instead. Updates a document by uploading a new file, then re-indexes it.","deprecated":true,"version":null,"sidebarTitle":"Update Document by File","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/update-by-file","href":"/en/3.12.x/develop/api/documents/update-document-by-file"},{"title":"Download Documents as ZIP","deprecated":null,"version":null,"sidebarTitle":"Download Documents as ZIP","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/documents/download-zip","href":"/en/3.12.x/develop/api/documents/download-documents-as-zip"},{"title":"Update Document Status in Batch","deprecated":null,"version":null,"sidebarTitle":"Update Document Status in Batch","openapi":"/en/3.12.x/develop/api/openapi_service.json patch /datasets/{dataset_id}/documents/status/{action}","href":"/en/3.12.x/develop/api/documents/update-document-status-in-batch"}]},{"group":"Chunks","pages":[{"title":"Create Chunks","deprecated":null,"version":null,"sidebarTitle":"Create Chunks","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments","href":"/en/3.12.x/develop/api/chunks/create-chunks"},{"title":"List Chunks","deprecated":null,"version":null,"sidebarTitle":"List Chunks","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments","href":"/en/3.12.x/develop/api/chunks/list-chunks"},{"title":"Get Chunk","deprecated":null,"version":null,"sidebarTitle":"Get Chunk","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/en/3.12.x/develop/api/chunks/get-chunk"},{"title":"Update Chunk","deprecated":null,"version":null,"sidebarTitle":"Update Chunk","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/en/3.12.x/develop/api/chunks/update-chunk"},{"title":"Delete Chunk","deprecated":null,"version":null,"sidebarTitle":"Delete Chunk","openapi":"/en/3.12.x/develop/api/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}","href":"/en/3.12.x/develop/api/chunks/delete-chunk"},{"title":"Create Child Chunk","deprecated":null,"version":null,"sidebarTitle":"Create Child Chunk","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks","href":"/en/3.12.x/develop/api/chunks/create-child-chunk"},{"title":"List Child Chunks","deprecated":null,"version":null,"sidebarTitle":"List Child Chunks","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks","href":"/en/3.12.x/develop/api/chunks/list-child-chunks"},{"title":"Update Child Chunk","deprecated":null,"version":null,"sidebarTitle":"Update Child Chunk","openapi":"/en/3.12.x/develop/api/openapi_service.json patch /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}","href":"/en/3.12.x/develop/api/chunks/update-child-chunk"},{"title":"Delete Child Chunk","deprecated":null,"version":null,"sidebarTitle":"Delete Child Chunk","openapi":"/en/3.12.x/develop/api/openapi_service.json delete /datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}/child_chunks/{child_chunk_id}","href":"/en/3.12.x/develop/api/chunks/delete-child-chunk"}]},{"group":"Metadata","pages":[{"title":"Create Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Create Metadata Field","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/metadata","href":"/en/3.12.x/develop/api/metadata/create-metadata-field"},{"title":"List Metadata Fields","deprecated":null,"version":null,"sidebarTitle":"List Metadata Fields","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/metadata","href":"/en/3.12.x/develop/api/metadata/list-metadata-fields"},{"title":"Update Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Update Metadata Field","openapi":"/en/3.12.x/develop/api/openapi_service.json patch /datasets/{dataset_id}/metadata/{metadata_id}","href":"/en/3.12.x/develop/api/metadata/update-metadata-field"},{"title":"Delete Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Delete Metadata Field","openapi":"/en/3.12.x/develop/api/openapi_service.json delete /datasets/{dataset_id}/metadata/{metadata_id}","href":"/en/3.12.x/develop/api/metadata/delete-metadata-field"},{"title":"Get Built-in Metadata Fields","deprecated":null,"version":null,"sidebarTitle":"Get Built-in Metadata Fields","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/metadata/built-in","href":"/en/3.12.x/develop/api/metadata/get-built-in-metadata-fields"},{"title":"Update Built-in Metadata Field","deprecated":null,"version":null,"sidebarTitle":"Update Built-in Metadata Field","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/metadata/built-in/{action}","href":"/en/3.12.x/develop/api/metadata/update-built-in-metadata-field"},{"title":"Update Document Metadata in Batch","deprecated":null,"version":null,"sidebarTitle":"Update Document Metadata in Batch","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/documents/metadata","href":"/en/3.12.x/develop/api/metadata/update-document-metadata-in-batch"}]},{"group":"Tags","pages":[{"title":"Create Knowledge Tag","deprecated":null,"version":null,"sidebarTitle":"Create Knowledge Tag","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/tags","href":"/en/3.12.x/develop/api/tags/create-knowledge-tag"},{"title":"List Knowledge Tags","deprecated":null,"version":null,"sidebarTitle":"List Knowledge Tags","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/tags","href":"/en/3.12.x/develop/api/tags/list-knowledge-tags"},{"title":"Update Knowledge Tag","deprecated":null,"version":null,"sidebarTitle":"Update Knowledge Tag","openapi":"/en/3.12.x/develop/api/openapi_service.json patch /datasets/tags","href":"/en/3.12.x/develop/api/tags/update-knowledge-tag"},{"title":"Delete Knowledge Tag","deprecated":null,"version":null,"sidebarTitle":"Delete Knowledge Tag","openapi":"/en/3.12.x/develop/api/openapi_service.json delete /datasets/tags","href":"/en/3.12.x/develop/api/tags/delete-knowledge-tag"},{"title":"Create Tag Binding","deprecated":null,"version":null,"sidebarTitle":"Create Tag Binding","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/tags/binding","href":"/en/3.12.x/develop/api/tags/create-tag-binding"},{"title":"Delete Tag Binding","deprecated":null,"version":null,"sidebarTitle":"Delete Tag Binding","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/tags/unbinding","href":"/en/3.12.x/develop/api/tags/delete-tag-binding"},{"title":"Get Knowledge Base Tags","deprecated":null,"version":null,"sidebarTitle":"Get Knowledge Base Tags","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/tags","href":"/en/3.12.x/develop/api/tags/get-knowledge-base-tags"}]},{"group":"Models","pages":[{"title":"Get Available Models","deprecated":null,"version":null,"sidebarTitle":"Get Available Models","openapi":"/en/3.12.x/develop/api/openapi_service.json get /workspaces/current/models/model-types/{model_type}","href":"/en/3.12.x/develop/api/models/get-available-models"}]},{"group":"Knowledge Pipeline","pages":[{"title":"Upload Pipeline File","deprecated":null,"version":null,"sidebarTitle":"Upload Pipeline File","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/pipeline/file-upload","href":"/en/3.12.x/develop/api/knowledge-pipeline/upload-pipeline-file"},{"title":"List Datasource Plugins","deprecated":null,"version":null,"sidebarTitle":"List Datasource Plugins","openapi":"/en/3.12.x/develop/api/openapi_service.json get /datasets/{dataset_id}/pipeline/datasource-plugins","href":"/en/3.12.x/develop/api/knowledge-pipeline/list-datasource-plugins"},{"title":"Run Datasource Node","deprecated":null,"version":null,"sidebarTitle":"Run Datasource Node","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/pipeline/datasource/nodes/{node_id}/run","href":"/en/3.12.x/develop/api/knowledge-pipeline/run-datasource-node"},{"title":"Run Pipeline","deprecated":null,"version":null,"sidebarTitle":"Run Pipeline","openapi":"/en/3.12.x/develop/api/openapi_service.json post /datasets/{dataset_id}/pipeline/run","href":"/en/3.12.x/develop/api/knowledge-pipeline/run-pipeline"}]}]}]},{"item":"CLI","pages":[{"title":"CLI","href":"/en/3.12.x/develop/cli/introduction"}]},{"item":"Plugins","pages":[{"title":"Plugins","href":"/en/3.12.x/develop/plugins/getting-started/getting-started-dify-plugin"}]}]}]},{"version":"3.11.x","pages":[{"title":"3.11.x","href":"/en/3.11.x/develop/api/documents/update-document-by-text"}]},{"version":"3.10.x","pages":[{"title":"3.10.x","href":"/en/3.10.x/develop/api/documents/update-document-by-text"}]},{"version":"3.9.x","tag":"LTS","pages":[{"title":"3.9.x","href":"/en/3.9.x/develop/api/documents/update-document-by-text"}]},{"version":"3.8.x","pages":[{"title":"3.8.x","href":"/en/3.8.x/develop/api/documents/update-document-by-text"}]},{"version":"3.7.x","pages":[{"title":"3.7.x","href":"/en/3.7.x/develop/api/documents/update-document-by-text"}]},{"version":"3.6.x","pages":[{"title":"3.6.x","href":"/en/3.6.x/develop/api/documents/update-document-by-text"}]},{"version":"3.5.x","pages":[{"title":"3.5.x","href":"/en/3.5.x/develop/api/documents/update-document-by-text"}]},{"version":"3.4.x","pages":[{"title":"3.4.x","href":"/en/3.4.x/develop/api/documents/update-document-by-text"}]},{"version":"3.3.x","pages":[{"title":"3.3.x","href":"/en/3.3.x/develop/api/documents/update-document-by-text"}]},{"version":"3.2.x","pages":[{"title":"3.2.x","href":"/en/3.2.x/develop/api/documents/update-document-by-text"}]},{"version":"3.1.x","pages":[{"title":"3.1.x","href":"/en/3.1.x/develop/api/documents/update-document-by-text"}]},{"version":"3.0.x","pages":[{"title":"3.0.x","href":"/en/3.0.x/develop/api/documents/update-document-by-text"}]},{"version":"2.8.x","pages":[{"title":"2.8.x","href":"/en/2.8.x/develop/api/documents/update-document-by-text"}]},{"version":"2.7.x","pages":[{"title":"2.7.x","href":"/en/2.7.x/develop/api/documents/update-document-by-text"}]},{"version":"2.6.x","pages":[{"title":"2.6.x","href":"/en/2.6.x/develop/api/documents/update-document-by-text"}]},{"version":"2.5.x","pages":[{"title":"2.5.x","href":"/en/2.5.x/develop/api/documents/update-document-by-text"}]}]},{"language":"zh","pages":[{"title":"zh","href":"/zh/3.12.x/develop/api/documents/update-document-by-text"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/3.12.x/develop/api/documents/update-document-by-text"}]}]},"basePath":"","title":"Update Document by Text - Dify Enterprise Docs","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B7XKH4J3.js","utils-lOYzL7z-.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DF6jUUIM.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dpsj5f7C.js","snippetPresets-CYeiDe8v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CUFz1YZ_.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D8H_iLS4.js","shallow-DdluZBHX.js","getApiPlaygroundDisplay-B9922vev.js","CodeSnippet-CMoRNGYs.js","CodeSnippets-DwyrPHuw.js","Page-DSVu9Ucl.js","getPastedJson-G-zIvlHh.js","icon-B03fnEy0.js","MethodPill-CW7teklc.js","DuplicateIcon-CtO8eekd.js","createIcon-DZTKdM_A.js","DynamicMarkdown-D5M2At0B.js","SectionHeading-C_2NaA2U.js","axios-vUo_bRtp.js","Markdown-D7QRHV3m.js","clsx-D1Z-ELXV.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-lvhuD9Du.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CKfC4ywL.js"]}