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 By ID
Retrieve specific sources by their IDs.
Use this endpoint to fetch one or more sources by providing their unique identifiers. This is useful when you need detailed information about specific documents or content you’ve previously uploaded.
Provide the source IDs in the request body along with your tenant information to get the exact sources you need.
POST
/
list
/
list-sources-by-id
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 'POST' \
'https://api.usecortex.ai/list/list-sources-by-id' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"source_ids": [
"string"
],
"tenant_id": "string",
"sub_tenant_id": "string"
}'
const specificSources = await client.sources.getByIds({
tenant_id: "tenant_1234",
sub_tenant_id: "sub_tenant_4567",
source_ids: ["doc_123", "doc_456"]
});
# Async usage is similar, just use async_client and await
specific_sources = client.sources.get_by_ids(
tenant_id="tenant_1234",
sub_tenant_id="sub_tenant_4567",
source_ids=["doc_123", "doc_456"]
)
Overview
Retrieve specific sources by their IDs. Use this API to fetch one or more sources by providing their unique identifiers. This is useful when you need detailed information about specific documents or content you’ve previously uploaded.Example Request
{
"tenant_id": "tenant_456",
"sub_tenant_id": "subtenant_123",
"source_ids": ["doc_123", "doc_456"]
}
Example Response
{
"sources": [
{
"id": "CortexDoccf0f1ccee4864c679bad5678bb1c515a1757402245",
"title": "ai-2027.pdf",
"type": "file",
"timestamp": "1757402409.7277222",
"description": "### **AI Futures** **Project** # **AI** **2027** ### **AI Futures** ### **Project** ## **`Daniel Kokotajlo`** **`Scott Alexander`** **`Thomas Larsen`** **`Eli Lifland`** **`Romeo Dean`** ``` Originally published on April 3rd 2025 on AI-2027.com ``` ``` Design by Lightcone Infrastructure ``` ## **AI 2027** We predict that the impact of superhuman AI",
"document_metadata": {},
"tenant_metadata": {}
}
],
"success": true,
"message": "Successfully fetched sources"
}
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.
Body
application/json