Retrieve complete details about a specific document including metadata, processing status, and content information.
Path Parameters
Unique identifier of the knowledge base (UUID format)
Unique identifier of the document (UUID format)
Response
Knowledge base ID this document belongs to
Unique identifier for the document (UUID)
URL to access the document file
Processing status: pending, processing, completed, failed
ISO 8601 timestamp of when the document was added
ISO 8601 timestamp of last update
Additional document metadata (file type, size, etc.)
Number of text chunks extracted from the document
Example Request
curl -X GET -H "x-api-key: YOUR_API_KEY" \
"https://api.xpander.ai/v1/knowledge/e21563bd-7c02-4f8f-9520-8c854f5c2ee6/documents/c7e44aac-e347-481d-bef8-8f230adf1a74"
Example Response
{
"kb_id": "4be18afd-ccbd-4092-8686-75e9df2a1bec",
"id": "043210de-52df-4bfd-94bb-c809fcd8d77a",
"document_url": "https://raw.githubusercontent.com/xpander-ai/xpander-sdk/main/README.md",
"organization_id": "91fbe9bc-35b3-41e8-b59d-922fb5a0f031",
"raw_data": "# xpander.ai SDK\n\n[]...",
"local_env": false,
"sync": false
}
Note: The raw_data field contains the complete document content. This can be very large for documents like PDFs or long markdown files.
Notes
- Use this endpoint to check if a document has been fully processed
- The
chunks_count field indicates how many searchable chunks were extracted
- Documents with
status: "failed" may need to be re-uploaded
See Also
- [List Documents](/API reference/v1/knowledge/list-documents) - List all documents in a knowledge base
- [Add Documents](/API reference/v1/knowledge/add-documents) - Add new documents
- [Delete Document](/API reference/v1/knowledge/delete-document) - Remove a document
API Key for authentication
Represents a document item within a Knowledge Base.
Attributes:
kb_id (Optional[str]): KB identifier.
id (str): Document unique identifier.
document_url (str): URL of the document.
raw_data (Optional[str]): Raw textual data of the document.
local_env (Optional[bool]): Indicates if the document is in a local environment. Defaults to False.
Document unique identifier
local_env
boolean | null
default:false
sync
boolean | null
default:false