Skip to main content

Get Document

Get the details of a specific document by its ID.

GET /api/v1/documents/:document_id

Authentication

Requires an API key with the read permission.

HeaderValue
X-API-Keyink_live_abc123...

Path Parameters

ParameterTypeRequiredDescription
document_idstringYesThe unique identifier (UUID) of the document

Code Examples

curl https://api.inherent.systems/api/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "X-API-Key: $INHERENT_API_KEY"

Response

Status: 200 OK

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "API Authentication Guide.md",
"workspace_id": "ws_abc123",
"source_type": "upload",
"mime_type": "text/markdown",
"size_bytes": 32768,
"chunk_count": 24,
"status": "completed",
"created_at": "2026-03-15T10:30:00Z",
"updated_at": "2026-03-15T10:31:45Z",
"metadata": {
"category": "documentation"
}
}

Response Fields

FieldTypeDescription
idstringUnique document identifier (UUID)
namestringOriginal filename
workspace_idstringID of the workspace the document belongs to
source_typestringHow the document was ingested (e.g., "upload")
mime_typestringMIME type of the document
size_bytesintegerFile size in bytes
chunk_countintegerNumber of chunks the document was split into (0 if still processing)
statusstringProcessing status: "pending", "processing", "completed", or "failed"
created_atstringISO 8601 timestamp of when the document was uploaded
updated_atstringISO 8601 timestamp of the last status change
metadataobject | nullUser-provided metadata from upload

Errors

StatusError TypeDescription
401unauthorizedMissing or invalid API key
403forbiddenAPI key does not have read permission
404not-foundNo document with the given ID exists in this workspace
429rate-limit-exceededRate limit exceeded

Example Error Response

{
"type": "https://api.inherent.systems/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Document 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' not found in this workspace.",
"instance": "/api/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"trace_id": "e5f67890-abcd-ef12-3456-789012345678",
"timestamp": "2026-04-03T12:34:56.789Z"
}