# Dify Enterprise Docs: English 3.13.x Developer Resources Workspace API ## Workspace API ### Guides - [Get Started with the Dify API](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/get-started.md): Get an API key, make your first call, and find the endpoints for your app type - [Consume Streaming Responses](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/streaming.md): Choose a response mode, parse the SSE stream, dispatch events, and recover when a connection drops - [Human Input API Integration Flow](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/human-input-flow.md): End-to-end sequence for handling a paused Human Input form via the API - [End User Identity](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/end-user-identity.md): What the user field identifies, what it scopes, and why it must stay consistent across calls - [Handle Errors and Rate Limits](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/errors.md): The error envelope, what each status class means, and which failures are worth retrying - [Deployed Environments](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/deployed-environments.md): Call apps running in deployed environments, with the base URL, authentication, and errors specific to them #### API Overviews - [Chatflow App API](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/chatflow.md): API for Chatflow apps, covering chat messages, workflow-level streaming, conversation management, and Human Input pauses - [Workflow App API](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/workflow.md): API for Workflow apps, covering workflow execution, run control and streaming, Human Input pauses, and run history - [Agent API](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/agent.md): API for Agent apps, covering streaming chat messages, conversation management, file uploads, and app configuration - [Knowledge API](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/knowledge.md): API for managing knowledge bases, documents, chunks, metadata, tags, and knowledge pipelines - [Chat App API](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/chat.md): API for Chatbot and Legacy Agent apps, covering chat messages, conversation management, file uploads, voice, and annotations - [Completion App API](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/guides/completion.md): API for Text Generator apps, covering completion messages, file uploads, voice, and feedback ### App APIs #### Chat Messages - [Send Chat Message](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chat-messages/send-chat-message.md): **Available for**: Chatflow, Agent, Chatbot, Legacy Agent apps. - [Stop Chat Message Generation](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chat-messages/stop-chat-message-generation.md): **Available for**: Chatflow, Agent, Chatbot, Legacy Agent apps. - [Get Next Suggested Questions](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chat-messages/get-next-suggested-questions.md): **Available for**: Chatflow, Agent, Chatbot, Legacy Agent apps. #### Completion Messages - [Send Completion Message](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/completion-messages/send-completion-message.md): **Available for**: Text Generator apps. - [Stop Completion Message Generation](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/completion-messages/stop-completion-message-generation.md): **Available for**: Text Generator apps. #### Workflow Runs - [Run Workflow](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/workflow-runs/run-workflow.md): **Available for**: Workflow apps. - [Run Workflow by ID](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/workflow-runs/run-workflow-by-id.md): **Available for**: Workflow apps. - [Stop Workflow Task](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/workflow-runs/stop-workflow-task.md): **Available for**: Workflow apps. - [Get Workflow Run Detail](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/workflow-runs/get-workflow-run-detail.md): **Available for**: Chatflow, Workflow apps. - [List Workflow Logs](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/workflow-runs/list-workflow-logs.md): **Available for**: Chatflow, Workflow apps. - [Stream Workflow Events](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/workflow-runs/stream-workflow-events.md): **Available for**: Chatflow, Workflow apps. #### Conversations - [List Conversations](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/conversations/list-conversations.md): **Available for**: Chatflow, Agent, Chatbot, Legacy Agent apps. - [List Conversation Messages](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/conversations/list-conversation-messages.md): **Available for**: Chatflow, Agent, Chatbot, Legacy Agent apps. - [List Conversation Variables](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/conversations/list-conversation-variables.md): **Available for**: Chatflow, Chatbot, Legacy Agent apps. - [Rename Conversation](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/conversations/rename-conversation.md): **Available for**: Chatflow, Agent, Chatbot, Legacy Agent apps. - [Update Conversation Variable](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/conversations/update-conversation-variable.md): **Available for**: Chatflow, Chatbot, Legacy Agent apps. - [Delete Conversation](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/conversations/delete-conversation.md): **Available for**: Chatflow, Agent, Chatbot, Legacy Agent apps. #### Files - [Upload File](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/files/upload-file.md): **Available for**: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps. - [Download File](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/files/download-file.md): **Available for**: Chatflow, Chatbot, Legacy Agent, Text Generator apps. #### Audio - [Convert Audio to Text](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/audio/convert-audio-to-text.md): **Available for**: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps. - [Convert Text to Audio](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/audio/convert-text-to-audio.md): **Available for**: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps. #### Applications - [Get App Info](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/applications/get-app-info.md): **Available for**: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps. - [Get App Parameters](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/applications/get-app-parameters.md): **Available for**: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps. - [Get App Meta](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/applications/get-app-meta.md): **Available for**: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps. - [Get App WebApp Settings](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/applications/get-app-webapp-settings.md): **Available for**: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps. #### Feedback - [Submit Message Feedback](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/feedback/submit-message-feedback.md): **Available for**: Chatflow, Chatbot, Legacy Agent, Text Generator apps. - [List App Feedbacks](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/feedback/list-app-feedbacks.md): **Available for**: Chatflow, Chatbot, Legacy Agent, Text Generator apps. #### Annotations - [Create Annotation](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/annotations/create-annotation.md): **Available for**: Chatflow, Chatbot, Legacy Agent apps. - [List Annotations](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/annotations/list-annotations.md): **Available for**: Chatflow, Chatbot, Legacy Agent apps. - [Update Annotation](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/annotations/update-annotation.md): **Available for**: Chatflow, Chatbot, Legacy Agent apps. - [Delete Annotation](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/annotations/delete-annotation.md): **Available for**: Chatflow, Chatbot, Legacy Agent apps. - [Configure Annotation Reply](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/annotations/configure-annotation-reply.md): **Available for**: Chatflow, Chatbot, Legacy Agent apps. - [Get Annotation Reply Job Status](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/annotations/get-annotation-reply-job-status.md): **Available for**: Chatflow, Chatbot, Legacy Agent apps. #### End Users - [Get End User Info](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/end-users/get-end-user-info.md): **Available for**: Chatflow, Workflow, Agent, Chatbot, Legacy Agent, Text Generator apps. #### Human Input - [Get Human Input Form](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/human-input/get-human-input-form.md): **Available for**: Chatflow, Workflow apps. - [Submit Human Input Form](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/human-input/submit-human-input-form.md): **Available for**: Chatflow, Workflow apps. #### Deployed Environments - [Send Chat Message](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/send-chat-message.md): **Available for**: Chatflow - [Stop Chat Message Generation](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/stop-chat-message-generation.md): **Available for**: Chatflow - [Run Workflow](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/run-workflow.md): **Available for**: Workflow - [Stop Workflow Task](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/stop-workflow-task.md): **Available for**: Workflow - [List Conversations](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/list-conversations.md): **Available for**: Chatflow - [Delete Conversation](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/delete-conversation.md): **Available for**: Chatflow - [Rename Conversation](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/rename-conversation.md): **Available for**: Chatflow - [List Conversation Messages](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/list-conversation-messages.md): **Available for**: Chatflow - [List Conversation Variables](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/list-conversation-variables.md): **Available for**: Chatflow - [Update Conversation Variable](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/update-conversation-variable.md): **Available for**: Chatflow - [Download File](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/download-file.md): **Available for**: Workflow, Chatflow - [Upload File](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/deployed-environments/upload-file.md): **Available for**: Workflow, Chatflow ### Knowledge APIs #### Knowledge Bases - [Create an Empty Knowledge Base](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/knowledge-bases/create-an-empty-knowledge-base.md): Creates an empty knowledge base. Add documents to it with [Create Document by Text](/en/3.13.x/develop/api/documents/create-document-by-text) or [Create Document by File](/en/3.13.x/develop/api/documents/create-document-by-file). - [List Knowledge Bases](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/knowledge-bases/list-knowledge-bases.md): Returns a paginated list of knowledge bases, optionally filtered by keyword or tags. - [Get Knowledge Base](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/knowledge-bases/get-knowledge-base.md): Returns detailed information about a knowledge base, including its embedding model, retrieval configuration, and document statistics. - [Update Knowledge Base](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/knowledge-bases/update-knowledge-base.md): Updates a knowledge base. Only the fields included in the request body are changed. - [Delete Knowledge Base](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/knowledge-bases/delete-knowledge-base.md): Permanently deletes a knowledge base, all of its documents, and any API key scoped only to it. Keys that also cover other knowledge bases keep working for those. - [Retrieve Chunks from a Knowledge Base / Test Retrieval](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/knowledge-bases/retrieve-chunks-from-a-knowledge-base-test-retrieval.md): Searches a knowledge base and returns the chunks most relevant to the query, for both production retrieval and test retrieval. #### Documents - [Create Document by Text](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/create-document-by-text.md): Creates a document in a knowledge base from raw text. Indexing runs asynchronously; track it with the returned `batch` ID via [Get Document Indexing Status](/en/3.13.x/develop/api/documents/get-document-indexing-status). - [Create Document by File](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/create-document-by-file.md): Creates a document in a knowledge base from an uploaded file. Common formats such as PDF, TXT, and DOCX are supported. Indexing runs asynchronously; track it with the returned `batch` ID via [Get Document Indexing Status](/en/3.13.x/develop/api/documents/get-document-indexing-status). - [List Documents](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/list-documents.md): Returns a paginated list of documents in a knowledge base. - [Get Document](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/get-document.md): Returns detailed information for a single document. - [Delete Document](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/delete-document.md): Permanently deletes a document and all its chunks from the knowledge base. - [Update Document](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/update-document.md): Updates a document by uploading a new file, then re-indexes it. This is the canonical endpoint for file-based document updates. Track progress with the returned `batch` ID via [Get Document Indexing Status](/en/3.13.x/develop/api/documents/get-document-indexing-status). - [Download Document](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/download-document.md): Returns a signed URL for downloading a document's original uploaded file. - [Get Document Indexing Status](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/get-document-indexing-status.md): 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`. - [Update Document by Text](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/update-document-by-text.md): Updates a document's text content, name, or processing configuration. Re-indexes the document when its text changes. - [Update Document by File](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/update-document-by-file.md): Deprecated. Use [Update Document](/en/3.13.x/develop/api/documents/update-document) instead. Updates a document by uploading a new file, then re-indexes it. - [Download Documents as ZIP](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/download-documents-as-zip.md): Downloads one or more documents as a single ZIP archive. Only documents that were uploaded as files can be included. - [Update Document Status in Batch](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/documents/update-document-status-in-batch.md): Enables, disables, archives, or unarchives multiple documents in one request. #### Chunks - [Create Chunks](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chunks/create-chunks.md): Create one or more chunks within a document. - [List Chunks](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chunks/list-chunks.md): Returns a paginated list of chunks within a document, optionally filtered by keyword or indexing status. - [Get Chunk](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chunks/get-chunk.md): Retrieve the full details of a single chunk. - [Update Chunk](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chunks/update-chunk.md): Update a chunk's fields. The update re-triggers indexing for that chunk. - [Delete Chunk](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chunks/delete-chunk.md): Permanently delete a chunk from the document. - [Create Child Chunk](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chunks/create-child-chunk.md): Create a child chunk under a parent chunk. Intended for documents that use the parent-child (`hierarchical_model`) chunking mode. - [List Child Chunks](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chunks/list-child-chunks.md): Returns a paginated list of child chunks under a specific parent chunk. - [Update Child Chunk](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chunks/update-child-chunk.md): Update the content of an existing child chunk. - [Delete Child Chunk](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/chunks/delete-child-chunk.md): Permanently delete a child chunk from its parent chunk. #### Metadata - [Create Metadata Field](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/metadata/create-metadata-field.md): Create a custom metadata field for annotating documents in the knowledge base with structured information. - [List Metadata Fields](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/metadata/list-metadata-fields.md): Returns all metadata fields for the knowledge base, both custom and built-in, with the count of documents using each field. - [Update Metadata Field](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/metadata/update-metadata-field.md): Rename a custom metadata field. - [Delete Metadata Field](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/metadata/delete-metadata-field.md): Permanently delete a custom metadata field. Documents that used the field lose their values for it. - [Get Built-in Metadata Fields](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/metadata/get-built-in-metadata-fields.md): Returns the built-in metadata fields provided by the system. - [Update Built-in Metadata Field](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/metadata/update-built-in-metadata-field.md): Enable or disable built-in metadata fields for the knowledge base. - [Update Document Metadata in Batch](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/metadata/update-document-metadata-in-batch.md): Update metadata values for multiple documents in a single request. #### Tags - [Create Knowledge Tag](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/tags/create-knowledge-tag.md): Create a tag for organizing knowledge bases. - [List Knowledge Tags](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/tags/list-knowledge-tags.md): Returns all knowledge base tags in the workspace. - [Update Knowledge Tag](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/tags/update-knowledge-tag.md): Rename a knowledge base tag. - [Delete Knowledge Tag](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/tags/delete-knowledge-tag.md): Permanently delete a knowledge base tag. Does not delete the knowledge bases that were tagged. - [Create Tag Binding](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/tags/create-tag-binding.md): Bind one or more tags to a knowledge base. A knowledge base can have multiple tags. - [Delete Tag Binding](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/tags/delete-tag-binding.md): Remove one or more tags from a knowledge base. - [Get Knowledge Base Tags](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/tags/get-knowledge-base-tags.md): Returns the tags bound to a knowledge base. #### Models - [Get Available Models](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/models/get-available-models.md): Returns the available models of a given type. Use it to find the `text-embedding` and `rerank` models to configure on a knowledge base. #### Knowledge Pipeline - [Upload Pipeline File](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/knowledge-pipeline/upload-pipeline-file.md): Uploads a file for use in a knowledge pipeline. Use the returned `id` as the `reference` of a `local_file` item in [Run Pipeline](/en/3.13.x/develop/api/knowledge-pipeline/run-pipeline). - [List Datasource Plugins](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/knowledge-pipeline/list-datasource-plugins.md): Returns the datasource nodes configured in the knowledge pipeline, each with the plugin it uses and the metadata needed to run it. - [Run Datasource Node](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/knowledge-pipeline/run-datasource-node.md): Runs a single datasource node in the knowledge pipeline and streams its execution events. - [Run Pipeline](https://enterprise-docs.dify.ai/en/3.13.x/develop/api/knowledge-pipeline/run-pipeline.md): Runs the full knowledge pipeline over one or more datasources. `response_mode` selects a streaming or blocking response. ## OpenAPI Specs - [openapi_service](/en/3.13.x/develop/api/openapi_service.json)