Orq MCP is live: Use natural language to interrogate traces, spot regressions, and experiment your way to optimal AI configurations. Available in Claude Desktop, Claude Code, Cursor, and more. Start now →
Create a new datasource within a knowledge base. Upload files or connect external sources to populate your RAG knowledge base with content.
curl --request POST \
--url https://api.orq.ai/v2/knowledge/{knowledge_id}/datasources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"file_id": "<string>",
"chunking_options": {
"chunking_configuration": {
"type": "default"
},
"chunking_cleanup_options": {
"delete_emails": true,
"delete_credit_cards": true,
"delete_phone_numbers": true,
"clean_bullet_points": true,
"clean_numbered_list": true,
"clean_unicode": true,
"clean_dashes": true,
"clean_whitespaces": true
}
}
}
'{
"display_name": "<string>",
"status": "pending",
"created": "<string>",
"updated": "<string>",
"knowledge_id": "<string>",
"chunks_count": 123,
"_id": "01KPTAPD88EPMB0WNT1641S9KW",
"description": "<string>",
"file_id": "<string>",
"created_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"update_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Documentation Index
Fetch the complete documentation index at: https://docs.orq.ai/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The unique identifier of the knowledge base
The display name for the datasource visible in the UI. If omitted, the display name is derived from the uploaded file. When both display_name and file_id are provided, the provided display_name is prioritized.
The unique identifier of the file used for datasource creation. If provided, the file is immediately queued for chunking.
Configuration options specifying how the datasource file is chunked. Required if file_id is specified. Defaults to standard chunking options if omitted.
Show child attributes
Datasource successfully created
The display name of the datasource. Normally the name of the uploaded file
pending, processing, completed, failed, queued The date and time the datasource was created
The date and time the datasource was updated
The unique identifier of the knowledge base
The number of chunks in the datasource
The unique identifier of the data source
^[0-9A-HJKMNP-TV-Z]{26}$The description of the knowledge base
The unique identifier of the file used to create the datasource.
The user ID of the creator of the knowledge base
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$The user ID of the last user who updated the knowledge base
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Was this page helpful?
curl --request POST \
--url https://api.orq.ai/v2/knowledge/{knowledge_id}/datasources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "<string>",
"file_id": "<string>",
"chunking_options": {
"chunking_configuration": {
"type": "default"
},
"chunking_cleanup_options": {
"delete_emails": true,
"delete_credit_cards": true,
"delete_phone_numbers": true,
"clean_bullet_points": true,
"clean_numbered_list": true,
"clean_unicode": true,
"clean_dashes": true,
"clean_whitespaces": true
}
}
}
'{
"display_name": "<string>",
"status": "pending",
"created": "<string>",
"updated": "<string>",
"knowledge_id": "<string>",
"chunks_count": 123,
"_id": "01KPTAPD88EPMB0WNT1641S9KW",
"description": "<string>",
"file_id": "<string>",
"created_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"update_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}