Documents
Create Document by Text
Changed onCreates a document in a knowledge base from raw text. Indexing runs asynchronously; track it with the returned batch ID via Get Document Indexing Status.
post/datasets/{dataset_id}/document/create-by-text
Request
- Base URLhttps://api.dify.ai/v1
- URLhttps://api.dify.ai/v1/datasets/{dataset_id}/document/create-by-text
- AuthHTTP bearer
Path parameters
dataset_idstring uuid required
Knowledge base ID, from List Knowledge Bases. For a scoped key, copy the ID from the Dify URL.
Request body
Response
Document created successfully.
Changes
- info
added the non-success response with the status
- info