api/openapi/markdown/service-swagger.md
API for application services
Bearer
| apiKey | API Key |
|---|---|
| Description | Type: Bearer {your-api-key} |
| In | header |
| Name | Authorization |
Service operations
| Code | Description |
|---|---|
| 200 | Success |
Get all feedbacks for the application
Get all feedbacks for the application Returns paginated list of all feedback submitted for messages in this app.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | FeedbackListQuery |
| Code | Description |
|---|---|
| 200 | Feedbacks retrieved successfully |
| 401 | Unauthorized - invalid API token |
Enable or disable annotation reply feature
Enable or disable annotation reply feature
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | AnnotationReplyActionPayload | |
| action | path | Action to perform: 'enable' or 'disable' | Yes | string |
| Code | Description |
|---|---|
| 200 | Action completed successfully |
| 401 | Unauthorized - invalid API token |
Get the status of an annotation reply action job
Get the status of an annotation reply action job
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| action | path | Action type | Yes | string |
| job_id | path | Job ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Job status retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Job not found |
List annotations for the application
List annotations for the application
| Code | Description | Schema |
|---|---|---|
| 200 | Annotations retrieved successfully | AnnotationList |
| 401 | Unauthorized - invalid API token |
Create a new annotation
Create a new annotation
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | AnnotationCreatePayload |
| Code | Description | Schema |
|---|---|---|
| 201 | Annotation created successfully | Annotation |
| 401 | Unauthorized - invalid API token |
Delete an annotation
Delete an annotation
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| annotation_id | path | Annotation ID | Yes | string |
| Code | Description |
|---|---|
| 204 | Annotation deleted successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
| 404 | Annotation not found |
Update an existing annotation
Update an existing annotation
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | AnnotationCreatePayload | |
| annotation_id | path | Annotation ID | Yes | string |
| Code | Description | Schema |
|---|---|---|
| 200 | Annotation updated successfully | Annotation |
| 401 | Unauthorized - invalid API token | |
| 403 | Forbidden - insufficient permissions | |
| 404 | Annotation not found |
Convert audio to text using speech-to-text
Convert audio to text using speech-to-text Accepts an audio file upload and returns the transcribed text.
| Code | Description |
|---|---|
| 200 | Audio successfully transcribed |
| 400 | Bad request - no audio or invalid audio |
| 401 | Unauthorized - invalid API token |
| 413 | Audio file too large |
| 415 | Unsupported audio type |
| 500 | Internal server error |
Send a message in a chat conversation
Send a message in a chat conversation This endpoint handles chat messages for chat, agent chat, and advanced chat applications. Supports conversation management and both blocking and streaming response modes.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | ChatRequestPayload |
| Code | Description |
|---|---|
| 200 | Message sent successfully |
| 400 | Bad request - invalid parameters or workflow issues |
| 401 | Unauthorized - invalid API token |
| 404 | Conversation or workflow not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Stop a running chat message generation
Stop a running chat message generation
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| task_id | path | The ID of the task to stop | Yes | string |
| Code | Description |
|---|---|
| 200 | Task stopped successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Task not found |
Create a completion for the given prompt
Create a completion for the given prompt This endpoint generates a completion based on the provided inputs and query. Supports both blocking and streaming response modes.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | CompletionRequestPayload |
| Code | Description |
|---|---|
| 200 | Completion created successfully |
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - invalid API token |
| 404 | Conversation not found |
| 500 | Internal server error |
Stop a running completion task
Stop a running completion task
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| task_id | path | The ID of the task to stop | Yes | string |
| Code | Description |
|---|---|
| 200 | Task stopped successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Task not found |
List all conversations for the current user
List all conversations for the current user Supports pagination using last_id and limit parameters.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | ConversationListQuery |
| Code | Description |
|---|---|
| 200 | Conversations retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Last conversation not found |
Delete a specific conversation
Delete a specific conversation
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| c_id | path | Conversation ID | Yes | string |
| Code | Description |
|---|---|
| 204 | Conversation deleted successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Conversation not found |
Rename a conversation or auto-generate a name
Rename a conversation or auto-generate a name
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | ConversationRenamePayload | |
| c_id | path | Conversation ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Conversation renamed successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Conversation not found |
List all variables for a conversation
List all variables for a conversation Conversational variables are only available for chat applications.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | ConversationVariablesQuery | |
| c_id | path | Conversation ID | Yes | string |
| Code | Description | Schema |
|---|---|---|
| 200 | Variables retrieved successfully | ConversationVariableInfiniteScrollPaginationResponse |
| 401 | Unauthorized - invalid API token | |
| 404 | Conversation not found |
Update a conversation variable's value
Update a conversation variable's value Allows updating the value of a specific conversation variable. The value must match the variable's expected type.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | ConversationVariableUpdatePayload | |
| c_id | path | Conversation ID | Yes | string |
| variable_id | path | Variable ID | Yes | string |
| Code | Description | Schema |
|---|---|---|
| 200 | Variable updated successfully | ConversationVariableResponse |
| 400 | Bad request - type mismatch | |
| 401 | Unauthorized - invalid API token | |
| 404 | Conversation or variable not found |
Resource for getting datasets
List all datasets
| Code | Description |
|---|---|
| 200 | Datasets retrieved successfully |
| 401 | Unauthorized - invalid API token |
Resource for creating datasets
Create a new dataset
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | DatasetCreatePayload |
| Code | Description |
|---|---|
| 200 | Dataset created successfully |
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - invalid API token |
Upload a file for use in conversations
Upload a file to a knowledgebase pipeline Accepts a single file upload via multipart/form-data.
| Code | Description |
|---|---|
| 201 | File uploaded successfully |
| 400 | Bad request - no file or invalid file |
| 401 | Unauthorized - invalid API token |
| 413 | File too large |
| 415 | Unsupported file type |
Delete a knowledge type tag
Delete a knowledge type tag
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | TagDeletePayload |
| Code | Description |
|---|---|
| 204 | Tag deleted successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
Get all knowledge type tags
Get all knowledge type tags
| Code | Description |
|---|---|
| 200 | Tags retrieved successfully |
| 401 | Unauthorized - invalid API token |
Update a knowledge type tag
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | TagUpdatePayload |
| Code | Description |
|---|---|
| 200 | Tag updated successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
Add a knowledge type tag
Add a knowledge type tag
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | TagCreatePayload |
| Code | Description |
|---|---|
| 200 | Tag created successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
Bind tags to a dataset
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | TagBindingPayload |
| Code | Description |
|---|---|
| 204 | Tags bound successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
Unbind tags from a dataset
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | TagUnbindingPayload |
| Code | Description |
|---|---|
| 204 | Tags unbound successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
Deletes a dataset given its ID
Delete a dataset Args: _: ignore dataset_id (UUID): The ID of the dataset to be deleted.
Returns: dict: A dictionary with a key 'result' and a value 'success' if the dataset was successfully deleted. Omitted in HTTP response. int: HTTP status code 204 indicating that the operation was successful.
Raises: NotFound: If the dataset with the given ID does not exist.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 204 | Dataset deleted successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset not found |
| 409 | Conflict - dataset is in use |
Get a specific dataset by ID
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Dataset retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
| 404 | Dataset not found |
Update an existing dataset
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | DatasetUpdatePayload | |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Dataset updated successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
| 404 | Dataset not found |
Create a new document by uploading a file
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document created successfully |
| 400 | Bad request - invalid file or parameters |
| 401 | Unauthorized - invalid API token |
Create a new document by providing text content
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | DocumentTextCreatePayload | |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document created successfully |
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - invalid API token |
Create a new document by uploading a file
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document created successfully |
| 400 | Bad request - invalid file or parameters |
| 401 | Unauthorized - invalid API token |
DEPRECATED
Deprecated legacy alias for creating a new document by providing text content. Use /datasets/{dataset_id}/document/create-by-text instead.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | DocumentTextCreatePayload | |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document created successfully |
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - invalid API token |
List all documents in a dataset
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Documents retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset not found |
Download selected uploaded documents as a single ZIP archive
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | DocumentBatchDownloadZipPayload | |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | ZIP archive generated successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
| 404 | Document or dataset not found |
Update metadata for multiple documents
Update metadata for multiple documents
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | MetadataOperationData | |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Documents metadata updated successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset not found |
Batch update document status
Batch update document status Args: tenant_id: tenant id dataset_id: dataset id action: action to perform (Literal["enable", "disable", "archive", "un_archive"])
Returns: dict: A dictionary with a key 'result' and a value 'success' int: HTTP status code 200 indicating that the operation was successful.
Raises: NotFound: If the dataset with the given ID does not exist. Forbidden: If the user does not have permission. InvalidActionError: If the action is invalid or cannot be performed.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| action | path | Action to perform: 'enable', 'disable', 'archive', or 'un_archive' | Yes | string |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document status updated successfully |
| 400 | Bad request - invalid action |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
| 404 | Dataset not found |
Get indexing status for documents in a batch
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| batch | path | Batch ID | Yes | string |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Indexing status retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset or documents not found |
Delete document
Delete a document
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| Code | Description |
|---|---|
| 204 | Document deleted successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - document is archived |
| 404 | Document not found |
Get a specific document by ID
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
| 404 | Document not found |
Update an existing document by uploading a file
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document updated successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Document not found |
Get a signed download URL for a document's original uploaded file
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Download URL generated successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - insufficient permissions |
| 404 | Document or upload file not found |
List segments in a document
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | SegmentListQuery | |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Segments retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset or document not found |
Create segments in a document
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | SegmentCreatePayload | |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Segments created successfully |
| 400 | Bad request - segments data is missing |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset or document not found |
Delete a specific segment
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Segment ID to delete | Yes | string |
| Code | Description |
|---|---|
| 204 | Segment deleted successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset, document, or segment not found |
Get a specific segment by ID
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Yes | string | |
| document_id | path | Yes | string | |
| segment_id | path | Yes | string |
| Code | Description |
|---|---|
| 200 | Segment retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset, document, or segment not found |
Update a specific segment
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | SegmentUpdatePayload | |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Segment ID to update | Yes | string |
| Code | Description |
|---|---|
| 200 | Segment updated successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset, document, or segment not found |
List child chunks for a segment
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | ChildChunkListQuery | |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Child chunks retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset, document, or segment not found |
Create a new child chunk for a segment
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | ChildChunkCreatePayload | |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Child chunk created successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset, document, or segment not found |
Delete a specific child chunk
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| child_chunk_id | path | Child chunk ID to delete | Yes | string |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
| Code | Description |
|---|---|
| 204 | Child chunk deleted successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset, document, segment, or child chunk not found |
Update a specific child chunk
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | ChildChunkUpdatePayload | |
| child_chunk_id | path | Child chunk ID to update | Yes | string |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| segment_id | path | Parent segment ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Child chunk updated successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset, document, segment, or child chunk not found |
DEPRECATED
Deprecated legacy alias for updating an existing document by uploading a file. Use PATCH /datasets/{dataset_id}/documents/{document_id} instead.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document updated successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Document not found |
Update an existing document by providing text content
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | DocumentTextUpdate | |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document updated successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Document not found |
DEPRECATED
Deprecated legacy alias for updating an existing document by uploading a file. Use PATCH /datasets/{dataset_id}/documents/{document_id} instead.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document updated successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Document not found |
DEPRECATED
Deprecated legacy alias for updating an existing document by providing text content. Use /datasets/{dataset_id}/documents/{document_id}/update-by-text instead.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | DocumentTextUpdate | |
| dataset_id | path | Dataset ID | Yes | string |
| document_id | path | Document ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Document updated successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Document not found |
Perform hit testing on a dataset
Perform hit testing on a dataset Tests retrieval performance for the specified dataset.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | HitTestingPayload | |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Hit testing results |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset not found |
Get all metadata for a dataset
Get all metadata for a dataset
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Metadata retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset not found |
Create metadata for a dataset
Create metadata for a dataset
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | MetadataArgs | |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 201 | Metadata created successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset not found |
Get all built-in metadata fields
Get all built-in metadata fields
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Yes | string |
| Code | Description |
|---|---|
| 200 | Built-in fields retrieved successfully |
| 401 | Unauthorized - invalid API token |
Enable or disable built-in metadata field
Enable or disable built-in metadata field
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| action | path | Action to perform: 'enable' or 'disable' | Yes | string |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Action completed successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset not found |
Delete metadata
Delete metadata
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| metadata_id | path | Metadata ID | Yes | string |
| Code | Description |
|---|---|
| 204 | Metadata deleted successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset or metadata not found |
Update metadata name
Update metadata name
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | MetadataUpdatePayload | |
| dataset_id | path | Dataset ID | Yes | string |
| metadata_id | path | Metadata ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Metadata updated successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset or metadata not found |
Resource for getting datasource plugins
List all datasource plugins for a rag pipeline
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Yes | string | |
| is_published | query | Whether to get published or draft datasource plugins (true for published, false for draft, default: true) | No | string |
| Code | Description |
|---|---|
| 200 | Datasource plugins retrieved successfully |
| 401 | Unauthorized - invalid API token |
Resource for getting datasource plugins
Run a datasource node for a rag pipeline
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Yes | string | |
| node_id | path | Yes | string |
| Code | Description |
|---|---|
| 200 | Datasource node run successfully |
| 401 | Unauthorized - invalid API token |
Resource for running a rag pipeline
Run a datasource node for a rag pipeline
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Yes | string |
| Code | Description |
|---|---|
| 200 | Pipeline run successfully |
| 401 | Unauthorized - invalid API token |
Perform hit testing on a dataset
Perform hit testing on a dataset Tests retrieval performance for the specified dataset.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | HitTestingPayload | |
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Hit testing results |
| 401 | Unauthorized - invalid API token |
| 404 | Dataset not found |
Get all knowledge type tags
Get tags bound to a specific dataset
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| dataset_id | path | Dataset ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Tags retrieved successfully |
| 401 | Unauthorized - invalid API token |
Get end user detail
Get an end user by ID This endpoint is scoped to the current app token's tenant/app to prevent cross-tenant/app access when an end-user ID is known.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| end_user_id | path | End user ID | Yes | string |
| Code | Description |
|---|---|
| 200 | End user retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | End user not found |
Upload a file for use in conversations
Upload a file for use in conversations Accepts a single file upload via multipart/form-data.
| Code | Description | Schema |
|---|---|---|
| 201 | File uploaded successfully | FileResponse |
| 400 | Bad request - no file or invalid file | |
| 401 | Unauthorized - invalid API token | |
| 413 | File too large | |
| 415 | Unsupported file type |
Preview/Download a file that was uploaded via Service API
Preview or download a file uploaded via Service API Provides secure file preview/download functionality. Files can only be accessed if they belong to messages within the requesting app's context.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | FilePreviewQuery | |
| file_id | path | UUID of the file to preview | Yes | string |
| Code | Description |
|---|---|
| 200 | File retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - file access denied |
| 404 | File not found |
Get a paused human input form by token
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| form_token | path | Human input form token | Yes | string |
| Code | Description |
|---|---|
| 200 | Form retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Form not found |
| 412 | Form already submitted or expired |
Submit a paused human input form by token
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | HumanInputFormSubmitPayload | |
| form_token | path | Human input form token | Yes | string |
| Code | Description |
|---|---|
| 200 | Form submitted successfully |
| 400 | Bad request - invalid submission data |
| 401 | Unauthorized - invalid API token |
| 404 | Form not found |
| 412 | Form already submitted or expired |
Get app information
Get basic application information Returns basic information about the application including name, description, tags, and mode.
| Code | Description |
|---|---|
| 200 | Application info retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Application not found |
List messages in a conversation
List messages in a conversation Retrieves messages with pagination support using first_id.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | MessageListQuery |
| Code | Description |
|---|---|
| 200 | Messages retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Conversation or first message not found |
Submit feedback for a message
Submit feedback for a message Allows users to rate messages as like/dislike and provide optional feedback content.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | MessageFeedbackPayload | |
| message_id | path | Message ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Feedback submitted successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Message not found |
Get suggested follow-up questions for a message
Get suggested follow-up questions for a message Returns AI-generated follow-up questions based on the message content.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| message_id | path | Message ID | Yes | string |
| Code | Description |
|---|---|
| 200 | Suggested questions retrieved successfully |
| 400 | Suggested questions feature is disabled |
| 401 | Unauthorized - invalid API token |
| 404 | Message not found |
| 500 | Internal server error |
Get app metadata
Get application metadata Returns metadata about the application including configuration and settings.
| Code | Description |
|---|---|
| 200 | Metadata retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Application not found |
Retrieve app parameters
Retrieve application input parameters and configuration Returns the input form parameters and configuration for the application.
| Code | Description |
|---|---|
| 200 | Parameters retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Application not found |
Retrieve app site info
Get application site configuration Returns the site configuration for the application including theme, icons, and text.
| Code | Description |
|---|---|
| 200 | Site configuration retrieved successfully |
| 401 | Unauthorized - invalid API token |
| 403 | Forbidden - site not found or tenant archived |
Convert text to audio using text-to-speech
Convert text to audio using text-to-speech Converts the provided text to audio using the specified voice.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | TextToAudioPayload |
| Code | Description |
|---|---|
| 200 | Text successfully converted to audio |
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - invalid API token |
| 500 | Internal server error |
Get workflow execution events stream after resume
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| task_id | path | Workflow run ID | Yes | string |
| continue_on_pause | query | Whether to keep the stream open across workflow_paused events,specify "true" to keep the stream open for workflow_paused events. | No | string |
| include_state_snapshot | query | Whether to replay from persisted state snapshot, specify "true" to include a status snapshot of executed nodes | No | string |
| user | query | End user identifier (query param) | No | string |
| Code | Description |
|---|---|
| 200 | SSE event stream |
| 401 | Unauthorized - invalid API token |
| 404 | Workflow run not found |
Get workflow app logs
Get workflow execution logs Returns paginated workflow execution logs with filtering options.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | WorkflowLogQuery |
| Code | Description | Schema |
|---|---|---|
| 200 | Logs retrieved successfully | WorkflowAppLogPaginationResponse |
| 401 | Unauthorized - invalid API token |
Execute a workflow
Execute a workflow Runs a workflow with the provided inputs and returns the results. Supports both blocking and streaming response modes.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | WorkflowRunPayload |
| Code | Description |
|---|---|
| 200 | Workflow executed successfully |
| 400 | Bad request - invalid parameters or workflow issues |
| 401 | Unauthorized - invalid API token |
| 404 | Workflow not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Get a workflow task running detail
Get workflow run details Returns detailed information about a specific workflow run.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| workflow_run_id | path | Workflow run ID | Yes | string |
| Code | Description | Schema |
|---|---|---|
| 200 | Workflow run details retrieved successfully | WorkflowRunResponse |
| 401 | Unauthorized - invalid API token | |
| 404 | Workflow run not found |
Stop a running workflow task
Stop a running workflow task
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| task_id | path | Task ID to stop | Yes | string |
| Code | Description |
|---|---|
| 200 | Task stopped successfully |
| 401 | Unauthorized - invalid API token |
| 404 | Task not found |
Run specific workflow by ID
Execute a specific workflow by ID Executes a specific workflow version identified by its ID.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| payload | body | Yes | WorkflowRunPayload | |
| workflow_id | path | Workflow ID to execute | Yes | string |
| Code | Description |
|---|---|
| 200 | Workflow executed successfully |
| 400 | Bad request - invalid parameters or workflow issues |
| 401 | Unauthorized - invalid API token |
| 404 | Workflow not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Get available models by model type
Get available models by model type Returns a list of available models for the specified model type.
| Name | Located in | Description | Required | Schema |
|---|---|---|---|---|
| model_type | path | Type of model to retrieve | Yes | string |
| Code | Description |
|---|---|
| 200 | Models retrieved successfully |
| 401 | Unauthorized - invalid API token |
| Name | Type | Description | Required |
|---|---|---|---|
| content | No | ||
| created_at | No | ||
| hit_count | No | ||
| id | string | Yes | |
| question | No |
| Name | Type | Description | Required |
|---|---|---|---|
| answer | string | Annotation answer | Yes |
| question | string | Annotation question | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| data | [ Annotation ] | Yes | |
| has_more | boolean | Yes | |
| limit | integer | Yes | |
| page | integer | Yes | |
| total | integer | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| embedding_model_name | string | Embedding model name | Yes |
| embedding_provider_name | string | Embedding provider name | Yes |
| score_threshold | number | Score threshold for annotation matching | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| auto_generate_name | boolean | Auto generate conversation name | No |
| conversation_id | Conversation UUID | No | |
| files | No | ||
| inputs | object | Yes | |
| query | string | Yes | |
| response_mode | No | ||
| retriever_from | string | No | |
| workflow_id | Workflow ID for advanced chat | No |
| Name | Type | Description | Required |
|---|---|---|---|
| content | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| keyword | No | ||
| limit | integer | No | |
| page | integer | No |
| Name | Type | Description | Required |
|---|---|---|---|
| content | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| files | No | ||
| inputs | object | Yes | |
| query | string | No | |
| response_mode | No | ||
| retriever_from | string | No |
Condition detail
| Name | Type | Description | Required |
|---|---|---|---|
| comparison_operator | string | Enum: "<", "=", ">", "after", "before", "contains", "empty", "end with", "in", "is", "is not", "not contains", "not empty", "not in", "start with", "≠", "≤", "≥" | Yes |
| name | string | Yes | |
| value | No |
| Name | Type | Description | Required |
|---|---|---|---|
| last_id | Last conversation ID for pagination | No | |
| limit | integer | Number of conversations to return | No |
| sort_by | string | Sort order for conversations | |
Enum: "-created_at", "-updated_at", "created_at", "updated_at" | No |
| Name | Type | Description | Required |
|---|---|---|---|
| auto_generate | boolean | No | |
| name | No |
| Name | Type | Description | Required |
|---|---|---|---|
| data | [ ConversationVariableResponse ] | Yes | |
| has_more | boolean | Yes | |
| limit | integer | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| created_at | No | ||
| description | No | ||
| id | string | Yes | |
| name | string | Yes | |
| updated_at | No | ||
| value | No | ||
| value_type | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| value | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| last_id | Last variable ID for pagination | No | |
| limit | integer | Number of variables to return | No |
| variable_name | Filter variables by name | No |
| Name | Type | Description | Required |
|---|---|---|---|
| binding_count | No | ||
| id | string | Yes | |
| name | string | Yes | |
| type | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| description | string | Dataset description (max 400 chars) | No |
| embedding_model | No | ||
| embedding_model_provider | No | ||
| external_knowledge_api_id | No | ||
| external_knowledge_id | No | ||
| indexing_technique | No | ||
| name | string | Yes | |
| permission | No | ||
| provider | string | No | |
| retrieval_model | No | ||
| summary_index_setting | No |
| Name | Type | Description | Required |
|---|---|---|---|
| include_all | boolean | Include all datasets | No |
| keyword | Search keyword | No | |
| limit | integer | Number of items per page | No |
| page | integer | Page number | No |
| tag_ids | [ string ] | Filter by tag IDs | No |
| Name | Type | Description | Required |
|---|---|---|---|
| DatasetPermissionEnum | string |
| Name | Type | Description | Required |
|---|---|---|---|
| description | Dataset description (max 400 chars) | No | |
| embedding_model | No | ||
| embedding_model_provider | No | ||
| external_knowledge_api_id | No | ||
| external_knowledge_id | No | ||
| external_retrieval_model | No | ||
| indexing_technique | No | ||
| name | No | ||
| partial_member_list | No | ||
| permission | No | ||
| retrieval_model | No |
| Name | Type | Description | Required |
|---|---|---|---|
| credential_id | No | ||
| datasource_type | string | Yes | |
| inputs | object | Yes | |
| is_published | boolean | Yes |
Request payload for bulk downloading documents as a zip archive.
| Name | Type | Description | Required |
|---|---|---|---|
| document_ids | [ string (uuid) ] | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| keyword | Search keyword | No | |
| limit | integer | Number of items per page | No |
| page | integer | Page number | No |
| status | Document status filter | No |
| Name | Type | Description | Required |
|---|---|---|---|
| document_id | string | Yes | |
| metadata_list | [ MetadataDetail ] | Yes | |
| partial_update | boolean | No |
| Name | Type | Description | Required |
|---|---|---|---|
| doc_form | string | No | |
| doc_language | string | No | |
| embedding_model | No | ||
| embedding_model_provider | No | ||
| indexing_technique | No | ||
| name | string | Yes | |
| original_document_id | No | ||
| process_rule | No | ||
| retrieval_model | No | ||
| text | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| doc_form | string | No | |
| doc_language | string | No | |
| name | No | ||
| process_rule | No | ||
| retrieval_model | No | ||
| text | No |
| Name | Type | Description | Required |
|---|---|---|---|
| limit | integer | Number of feedbacks per page | No |
| page | integer | Page number | No |
| Name | Type | Description | Required |
|---|---|---|---|
| as_attachment | boolean | Download as attachment | No |
| Name | Type | Description | Required |
|---|---|---|---|
| conversation_id | No | ||
| created_at | No | ||
| created_by | No | ||
| extension | No | ||
| file_key | No | ||
| id | string | Yes | |
| mime_type | No | ||
| name | string | Yes | |
| original_url | No | ||
| preview_url | No | ||
| size | integer | Yes | |
| source_url | No | ||
| tenant_id | No | ||
| user_id | No |
| Name | Type | Description | Required |
|---|---|---|---|
| attachment_ids | No | ||
| external_retrieval_model | No | ||
| query | string | Yes | |
| retrieval_model | No |
| Name | Type | Description | Required |
|---|---|---|---|
| action | string | Yes | |
| inputs | object | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| JsonValue |
| Name | Type | Description | Required |
|---|---|---|---|
| content | No | ||
| rating | No |
| Name | Type | Description | Required |
|---|---|---|---|
| conversation_id | string | Conversation UUID | Yes |
| first_id | First message ID for pagination | No | |
| limit | integer | Number of messages to return (1-100) | No |
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Yes | |
| type | string | Enum: "number", "string", "time" | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | Yes | |
| name | string | Yes | |
| value | No |
Metadata Filtering Condition.
| Name | Type | Description | Required |
|---|---|---|---|
| conditions | No | ||
| logical_operator | No |
Metadata operation data
| Name | Type | Description | Required |
|---|---|---|---|
| operation_data | [ DocumentMetadataOperation ] | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| datasource_info_list | [ object ] | Yes | |
| datasource_type | string | Yes | |
| inputs | object | Yes | |
| is_published | boolean | Yes | |
| response_mode | string | Yes | |
| start_node_id | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| enabled | boolean | Yes | |
| id | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| mode | string | Enum: "automatic", "custom", "hierarchical" | Yes |
| rules | No |
| Name | Type | Description | Required |
|---|---|---|---|
| reranking_model_name | No | ||
| reranking_provider_name | No |
| Name | Type | Description | Required |
|---|---|---|---|
| RetrievalMethod | string |
| Name | Type | Description | Required |
|---|---|---|---|
| metadata_filtering_conditions | No | ||
| reranking_enable | boolean | Yes | |
| reranking_mode | No | ||
| reranking_model | No | ||
| score_threshold | No | ||
| score_threshold_enabled | boolean | Yes | |
| search_method | RetrievalMethod | Yes | |
| top_k | integer | Yes | |
| weights | No |
| Name | Type | Description | Required |
|---|---|---|---|
| parent_mode | No | ||
| pre_processing_rules | No | ||
| segmentation | No | ||
| subchunk_segmentation | No |
| Name | Type | Description | Required |
|---|---|---|---|
| segments | No |
| Name | Type | Description | Required |
|---|---|---|---|
| keyword | No | ||
| status | [ string ] | No |
| Name | Type | Description | Required |
|---|---|---|---|
| answer | No | ||
| attachment_ids | No | ||
| content | No | ||
| enabled | No | ||
| keywords | No | ||
| regenerate_child_chunks | boolean | No | |
| summary | No |
| Name | Type | Description | Required |
|---|---|---|---|
| segment | SegmentUpdateArgs | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| chunk_overlap | integer | No | |
| max_tokens | integer | Yes | |
| separator | string | No |
| Name | Type | Description | Required |
|---|---|---|---|
| string | Yes | ||
| id | string | Yes | |
| name | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | Yes | |
| is_anonymous | boolean | Yes | |
| session_id | No | ||
| type | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| tag_ids | [ string ] | Yes | |
| target_id | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| tag_id | string | Yes |
Accept the legacy single-tag Service API payload while exposing a normalized tag_ids list internally.
| Name | Type | Description | Required |
|---|---|---|---|
| tag_id | No | ||
| tag_ids | [ string ] | No | |
| target_id | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Yes | |
| tag_id | string | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| message_id | Message ID | No | |
| streaming | Enable streaming response | No | |
| text | Text to convert to audio | No | |
| voice | Voice to use for TTS | No |
| Name | Type | Description | Required |
|---|---|---|---|
| keyword_weight | number | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| keyword_setting | No | ||
| vector_setting | No | ||
| weight_type | No |
| Name | Type | Description | Required |
|---|---|---|---|
| embedding_model_name | string | Yes | |
| embedding_provider_name | string | Yes | |
| vector_weight | number | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| data | [ WorkflowAppLogPartialResponse ] | Yes | |
| has_more | boolean | Yes | |
| limit | integer | Yes | |
| page | integer | Yes | |
| total | integer | Yes |
| Name | Type | Description | Required |
|---|---|---|---|
| created_at | No | ||
| created_by_account | No | ||
| created_by_end_user | No | ||
| created_by_role | No | ||
| created_from | No | ||
| details | No | ||
| id | string | Yes | |
| workflow_run | No |
| Name | Type | Description | Required |
|---|---|---|---|
| created_at__after | No | ||
| created_at__before | No | ||
| created_by_account | No | ||
| created_by_end_user_session_id | No | ||
| keyword | No | ||
| limit | integer | No | |
| page | integer | No | |
| status | No |
| Name | Type | Description | Required |
|---|---|---|---|
| created_at | No | ||
| elapsed_time | No | ||
| error | No | ||
| exceptions_count | No | ||
| finished_at | No | ||
| id | string | Yes | |
| status | No | ||
| total_steps | No | ||
| total_tokens | No | ||
| triggered_from | No | ||
| version | No |
| Name | Type | Description | Required |
|---|---|---|---|
| files | No | ||
| inputs | object | Yes | |
| response_mode | No |
| Name | Type | Description | Required |
|---|---|---|---|
| created_at | No | ||
| elapsed_time | No | ||
| error | No | ||
| finished_at | No | ||
| id | string | Yes | |
| inputs | No | ||
| outputs | object | No | |
| status | string | Yes | |
| total_steps | No | ||
| total_tokens | No | ||
| workflow_id | string | Yes |