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
| Method | Path | Description |
|---|---|---|
GET | /api/v1/documents | List documents (paginated) |
GET | /api/v1/documents/:id | Get a single document with full content |
Search
| Method | Path | Description |
|---|---|---|
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"
| Parameter | Default | Max | Description |
|---|---|---|---|
limit | 50 | 100 | Results per page |
offset | 0 | — | Number of results to skip |
Error responses
All errors return a JSON object with an error field:
{
"error": "Missing required query parameter: q"
}
| Status | Meaning |
|---|---|
| 400 | Invalid or missing parameters |
| 401 | Missing or invalid API key |
| 404 | Document not found or not accessible |
| 500 | Server error |
Next steps
- Authentication — API key management
- Documents — List and retrieve documents
- Search — Semantic search endpoint