Skip to main content

Get Version

Retrieve a specific version of a document.

GET /v1/documents/:id/versions/:version

Path Parameters

ParameterTypeDescription
idstringDocument ID
versionintegerVersion number

Example Request

curl https://api.inherent.systems/v1/documents/doc_abc123/versions/2 \
-H "Authorization: Bearer $INHERENT_API_KEY"

Response

{
"id": "doc_abc123",
"version": 2,
"content": "# API Authentication\n\nAll API requests require...",
"metadata": {
"title": "API Authentication Guide",
"category": "documentation"
},
"stats": {
"size_bytes": 28672,
"chunks": 20,
"tokens": 7168
},
"created_at": "2024-01-15T10:30:00Z",
"created_by": "api_key_xyz"
}

Errors

CodeDescription
404Document not found
404Version not found