Error
A valid request URL is required to generate request examples{
"total": 1,
"success": true,
"message": "Sources retrieved successfully",
"sources": [
{
"id": "<id>",
"tenant_id": "tenant_1234",
"sub_tenant_id": "sub_tenant_4567",
"title": "<title>",
"type": "<type>",
"description": "<description>",
"note": "<note>",
"url": "<url>",
"timestamp": "<timestamp>",
"content": {
"text": "<text>",
"html_base64": "<html_base64>",
"csv_base64": "<csv_base64>",
"markdown": "<markdown>",
"files": [
{}
],
"layout": []
},
"tenant_metadata": {},
"document_metadata": {},
"meta": {},
"attachments": []
}
]
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}Knowledge Management
List Sources
Retrieve all sources for a specific tenant and subtenant combination.
Use this endpoint to fetch a complete list of all sources associated with your tenant. This includes documents, files, and other content you’ve uploaded for processing.
You can optionally specify a sub-tenant to narrow down the results to sources within that specific sub-tenant scope.
GET
/
list
/
list-sources
Error
A valid request URL is required to generate request examples{
"total": 1,
"success": true,
"message": "Sources retrieved successfully",
"sources": [
{
"id": "<id>",
"tenant_id": "tenant_1234",
"sub_tenant_id": "sub_tenant_4567",
"title": "<title>",
"type": "<type>",
"description": "<description>",
"note": "<note>",
"url": "<url>",
"timestamp": "<timestamp>",
"content": {
"text": "<text>",
"html_base64": "<html_base64>",
"csv_base64": "<csv_base64>",
"markdown": "<markdown>",
"files": [
{}
],
"layout": []
},
"tenant_metadata": {},
"document_metadata": {},
"meta": {},
"attachments": []
}
]
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
} Hit the
Try it button to try this API now in our playground. It’s the best way to check the full request and response in one place, customize your parameters, and generate ready-to-use code snippets.Examples
- API Request
- TypeScript
- Python (Sync)
curl -X 'GET' \
'https://api.usecortex.ai/list/list-sources?tenant_id=tenant_123' \
-H 'accept: application/json'
const allSources = await client.sources.getAll({
tenant_id: "tenant_1234",
sub_tenant_id: "sub_tenant_4567"
});
# Async usage is similar, just use async_client and await
all_sources = client.sources.get_all(
tenant_id="tenant_1234",
sub_tenant_id="sub_tenant_4567"
)
Error Responses
All endpoints return consistent error responses following the standard format. For detailed error information, see our Error Responses documentation.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Unique identifier for the tenant/organization
Example:
"tenant_1234"
Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used.
Example:
"sub_tenant_4567"