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.
| Header | Value |
|---|---|
X-API-Key | ink_live_abc123... |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document_id | string | Yes | The unique identifier (UUID) of the document |
Code Examples
- cURL
- Python
- JavaScript
curl https://api.inherent.systems/api/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "X-API-Key: $INHERENT_API_KEY"
import requests
document_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = requests.get(
f"https://api.inherent.systems/api/v1/documents/{document_id}",
headers={"X-API-Key": "ink_live_abc123..."},
)
doc = response.json()
print(f"{doc['name']} - {doc['status']} ({doc['chunk_count']} chunks)")
const documentId = "a1b2c3d4-e5f6-7890-abcd-ef1234567890";
const response = await fetch(
`https://api.inherent.systems/api/v1/documents/${documentId}`,
{
headers: {
"X-API-Key": "ink_live_abc123...",
},
}
);
const doc = await response.json();
console.log(`${doc.name} - ${doc.status} (${doc.chunk_count} chunks)`);
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
| Field | Type | Description |
|---|---|---|
id | string | Unique document identifier (UUID) |
name | string | Original filename |
workspace_id | string | ID of the workspace the document belongs to |
source_type | string | How the document was ingested (e.g., "upload") |
mime_type | string | MIME type of the document |
size_bytes | integer | File size in bytes |
chunk_count | integer | Number of chunks the document was split into (0 if still processing) |
status | string | Processing status: "pending", "processing", "completed", or "failed" |
created_at | string | ISO 8601 timestamp of when the document was uploaded |
updated_at | string | ISO 8601 timestamp of the last status change |
metadata | object | null | User-provided metadata from upload |
Errors
| Status | Error Type | Description |
|---|---|---|
401 | unauthorized | Missing or invalid API key |
403 | forbidden | API key does not have read permission |
404 | not-found | No document with the given ID exists in this workspace |
429 | rate-limit-exceeded | Rate 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"
}