Documents
List and retrieve documents from your workspace.
Document fields
Documents returned by the API include:
| Field | Type | Description |
|---|---|---|
id | string | Unique document ID |
title | string | Document title |
source | string | Origin of the document (e.g., slack, github, cli) |
status | string | Document status |
author | string | Author identifier |
folder_id | string | Folder the document belongs to (if any) |
created_at | string | ISO 8601 creation timestamp |
updated_at | string | ISO 8601 last-updated timestamp |
The single-document endpoint (GET /api/v1/documents/:id) returns all fields including the full document content.
List documents
GET /api/v1/documents
Returns documents for the authenticated workspace, ordered by updated_at (newest first).
Query parameters:
| Name | Type | Default | Max | Description |
|---|---|---|---|---|
limit | number | 50 | 100 | Results per page |
offset | number | 0 | — | Pagination offset |
Example:
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://lorehq.co/api/v1/documents?limit=10&offset=0"
Response:
{
"results": [
{
"id": "abc123",
"title": "Production Deployment Runbook",
"source": "slack",
"status": "published",
"author": "user@example.com",
"folder_id": null,
"updated_at": "2026-04-01T14:30:00Z",
"created_at": "2026-03-15T10:00:00Z"
}
]
}
Get a document
GET /api/v1/documents/:id
Returns the full document including content. Returns 404 if the document doesn't exist or belongs to a different workspace.
Example:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://lorehq.co/api/v1/documents/abc123