API Reference
API Endpoints
Complete reference for all EpicContext REST API endpoints, including blocks, export, and sync.
All authenticated endpoints use the base URL https://epiccontext.com/api/v1 and require an X-API-Key header.
Blocks
List Blocks
Retrieve all blocks for a project, optionally filtered by section.
GET /projects/{projectId}/blocks
GET /projects/{projectId}/blocks?section=brand
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
section | string | Filter by section type (e.g., brand, product, users) |
status | string | Filter by status: empty, draft, complete |
Get Block by Key
Retrieve a single block by its key.
GET /projects/{projectId}/blocks/{blockKey}
Response:
{
"data": {
"id": "uuid",
"key": "primary-user-persona",
"type": "persona",
"name": "Primary User",
"status": "complete",
"value": {
"name": "Sarah",
"description": "Product manager at a mid-size SaaS company",
"goals": "Ship features faster with better documentation",
"pain_points": "AI agents lack product context"
}
}
}
Search Blocks
Search across all blocks by text content.
GET /projects/{projectId}/blocks/search?q=persona
Export
Full Export
Export all project data as structured JSON.
GET /projects/{projectId}/export
Returns all sections and blocks in a single response, optimized for AI agent consumption.
Sync
Push content updates to your project.
POST /projects/{projectId}/sync
Request Body:
{
"blocks": [
{
"key": "primary-user-persona",
"type": "persona",
"section": "users",
"name": "Primary User",
"status": "draft",
"value": { ... }
}
]
}
Public Endpoints
These endpoints do not require authentication and use a different base URL:
llms.txt
GET /api/projects/{projectId}/llms.txt
Returns the full project context in llms.txt format.
Markdown
GET /api/projects/{projectId}/markdown
GET /api/projects/{projectId}/markdown/{section}
Returns project documentation as markdown.
Context JSON
GET /api/projects/{projectId}/context
Returns structured JSON for AI consumption.
Error Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad request (invalid parameters) |
401 | Unauthorized (missing/invalid API key) |
403 | Forbidden (no access to project) |
404 | Not found |
429 | Rate limited |
500 | Server error |
Next Steps
- Set up authentication to get started
- Learn about export formats
Last updated: 2026-02-21