Skip to main content

Documents

List and retrieve documents from your workspace.


Document fields

Documents returned by the API include:

FieldTypeDescription
idstringUnique document ID
titlestringDocument title
sourcestringOrigin of the document (e.g., slack, github, cli)
statusstringDocument status
authorstringAuthor identifier
folder_idstringFolder the document belongs to (if any)
created_atstringISO 8601 creation timestamp
updated_atstringISO 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:

NameTypeDefaultMaxDescription
limitnumber50100Results per page
offsetnumber0Pagination 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