curl -X GET https://api.example.com/api/knowledge/documents/doc_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://api.example.com/api/knowledge/documents/doc_abc123',
{
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
import requests
response = requests.get(
'https://api.example.com/api/knowledge/documents/doc_abc123',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
{
"success": true,
"document": {
"id": "doc_abc123",
"projectId": "proj_123",
"fileId": "file_xyz789",
"fileName": "product-guide.pdf",
"fileType": "pdf",
"sourceType": "upload",
"status": "completed",
"chunkCount": 45,
"vectorCount": 45,
"error": null,
"metadata": {
"size": 2048576,
"pages": 23,
"language": "en"
},
"createdAt": "2026-01-15T10:30:00Z",
"updatedAt": "2026-01-15T10:35:00Z"
}
}
{
"success": false,
"document": null
}
Documents
Get RAG Document
Retrieves detailed information about a specific document
GET
/
api
/
knowledge
/
documents
/
{id}
curl -X GET https://api.example.com/api/knowledge/documents/doc_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://api.example.com/api/knowledge/documents/doc_abc123',
{
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
import requests
response = requests.get(
'https://api.example.com/api/knowledge/documents/doc_abc123',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
{
"success": true,
"document": {
"id": "doc_abc123",
"projectId": "proj_123",
"fileId": "file_xyz789",
"fileName": "product-guide.pdf",
"fileType": "pdf",
"sourceType": "upload",
"status": "completed",
"chunkCount": 45,
"vectorCount": 45,
"error": null,
"metadata": {
"size": 2048576,
"pages": 23,
"language": "en"
},
"createdAt": "2026-01-15T10:30:00Z",
"updatedAt": "2026-01-15T10:35:00Z"
}
}
{
"success": false,
"document": null
}
Path Parameters
string
required
Document ID
Response
boolean
Whether the request was successful
object | null
Document details or null if not found
Show Document Object
Show Document Object
string
Document ID
string
Associated project ID
string | null
Associated file ID if applicable
string
Document file name
string
File type (pdf, txt, md, etc.)
string
Source type (upload, url, integration)
string
Processing status: pending, processing, completed, or failed
number
Number of chunks created from this document
number
Number of vectors stored
string | null
Error message if status is failed
object
Additional document metadata
string
ISO 8601 timestamp of creation
string
ISO 8601 timestamp of last update
curl -X GET https://api.example.com/api/knowledge/documents/doc_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://api.example.com/api/knowledge/documents/doc_abc123',
{
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
import requests
response = requests.get(
'https://api.example.com/api/knowledge/documents/doc_abc123',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
{
"success": true,
"document": {
"id": "doc_abc123",
"projectId": "proj_123",
"fileId": "file_xyz789",
"fileName": "product-guide.pdf",
"fileType": "pdf",
"sourceType": "upload",
"status": "completed",
"chunkCount": 45,
"vectorCount": 45,
"error": null,
"metadata": {
"size": 2048576,
"pages": 23,
"language": "en"
},
"createdAt": "2026-01-15T10:30:00Z",
"updatedAt": "2026-01-15T10:35:00Z"
}
}
{
"success": false,
"document": null
}
⌘I

