Skip to main content

API Reference

The Lore API provides programmatic access to your workspace's knowledge base. All endpoints return JSON and require authentication via an API key.

Base URL: https://lorehq.co/api/v1


Authentication

All requests require a workspace API key in the Authorization header:

curl -H "Authorization: Bearer YOUR_API_KEY" \
https://lorehq.co/api/v1/documents

API keys are workspace-scoped — they can only access documents within the workspace they were created for. See Authentication for how to generate keys.


Endpoints

Documents

MethodPathDescription
GET/api/v1/documentsList documents (paginated)
GET/api/v1/documents/:idGet a single document with full content
MethodPathDescription
GET/api/v1/search?q=...Semantic search across documents

Common patterns

Pagination

The documents list endpoint supports limit and offset query parameters:

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://lorehq.co/api/v1/documents?limit=20&offset=40"
ParameterDefaultMaxDescription
limit50100Results per page
offset0Number of results to skip

Error responses

All errors return a JSON object with an error field:

{
"error": "Missing required query parameter: q"
}
StatusMeaning
400Invalid or missing parameters
401Missing or invalid API key
404Document not found or not accessible
500Server error

Next steps