API reference
Integrate with Epismo through the HTTP API.
The Epismo HTTP API is available at https://api.epismo.ai. Application endpoints live under /v1. OAuth endpoints live under /oauth and well-known metadata paths. The API uses the same object model as the CLI and MCP server: packs, tracks, aliases, suggestions, workspaces, projects, scopes, and credits.
Authentication
Protected endpoints accept OAuth access tokens as bearer tokens.
curl https://api.epismo.ai/v1/packs/search \
-H "authorization: Bearer $EPISMO_TOKEN" \
-H "content-type: application/json" \
-d '{"type":"context","query":"onboarding"}'Read endpoints require read scopes. Mutation endpoints require write scopes. Many /v1 endpoints accept workspaceId as a query parameter. If omitted, the request uses the token's default context or personal space.
curl "https://api.epismo.ai/v1/projects?workspaceId=$WORKSPACE_ID" \
-H "authorization: Bearer $EPISMO_TOKEN"Request conventions
- Use
content-type: application/jsonfor JSON request bodies. - Update endpoints use PATCH semantics. Omitted fields stay unchanged.
- Dates use
YYYY-MM-DD. - Create and update calls use
scope; search calls usescopes. workspaceIdis passed as a query parameter on supported endpoints.
Core endpoint map
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/otp-tokens |
Create an OTP token for sign-in |
| GET/POST | /v1/credits |
Get balance or start checkout |
| GET/POST/PATCH | /v1/workspaces, /v1/workspaces/:workspaceId |
List, create, update workspaces |
| GET/PUT/DELETE | /v1/workspaces/:workspaceId/members, /v1/workspaces/:workspaceId/members/:userId |
List, upsert, or remove workspace members |
| GET/POST/PATCH/DELETE | /v1/projects, /v1/projects/:projectId |
Manage projects |
| POST/PUT/DELETE | /v1/projects/members/list, /v1/projects/:projectId/members, /v1/projects/:projectId/members/:userId |
Manage project members |
| GET/PUT/DELETE | /v1/agents |
List, add, remove installed agents |
| POST/PATCH/GET/DELETE | /v1/tracks, /v1/tracks/:id |
Manage tracks |
| POST | /v1/tracks/search, /v1/tracks/apply |
Search or bulk apply tracks |
| POST | /v1/tracks/review |
Generate a read-only review |
| POST/GET/DELETE | /v1/logs, /v1/logs/:logId |
Manage logs |
| POST/PATCH/GET/DELETE | /v1/packs |
Manage packs by reference query |
| POST | /v1/packs/search, /v1/packs/like, /v1/packs/rate |
Search, like, or rate packs |
| POST | /v1/packs/run |
Expand a workflow pack into a track |
| PUT/GET/DELETE | /v1/aliases, /v1/aliases/:alias |
Manage pack aliases |
| POST/GET/PATCH | /v1/suggestions, /v1/suggestions/search, /v1/suggestions/:id, /v1/suggestions/:id/resolve |
Manage pack suggestions |
| POST | /v1/mcp/tokens, /v1/mcp/tokens/refresh |
Issue and refresh MCP tokens |
| POST | /v1/cli/tokens |
Issue CLI tokens |
Create a context pack
POST /v1/packs
Authorization: Bearer <token>
Content-Type: application/json
{
"type": "context",
"title": "Team onboarding",
"scope": { "type": "personal" },
"blocks": [
{ "title": "Where things live", "content": "Docs in Notion, code in GitHub, designs in Figma." },
{ "title": "How we work", "content": "Weekly planning on Mondays; ship behind feature flags." }
]
}Context packs use blocks. Workflow packs use type: "workflow" and steps. Passing blocks to a workflow or steps to a context pack returns a validation error.
Read packs efficiently
Pack reads return outline data by default. For large packs, do not immediately request full=true unless the client truly needs everything. Read the outline first, then fetch selected blockIds or stepIds.
curl "https://api.epismo.ai/v1/packs?reference=@repo-onboarding" \
-H "authorization: Bearer $EPISMO_TOKEN"curl "https://api.epismo.ai/v1/packs?reference=@repo-onboarding&blockIds=b001,b002" \
-H "authorization: Bearer $EPISMO_TOKEN"Pack references can be UUIDs, @alias, @handle/alias, share URLs, or hub URLs.
API credit costs are listed by operation in Credits API.
Create tracks
Task tracks represent concrete work.
POST /v1/tracks
Authorization: Bearer <token>
Content-Type: application/json
{
"type": "task",
"title": "Review docs",
"scope": { "type": "personal" },
"task": { "status": "todo", "dueDate": "2026-06-05" }
}Goal tracks represent outcomes.
{
"type": "goal",
"title": "Ship documentation v1",
"scope": { "type": "projects", "ids": ["project-id"] },
"goal": { "status": "on_track", "progress": 40 }
}Task statuses are backlog, todo, in_progress, and done. Goal statuses are not_started, on_track, at_risk, postponed, and completed.
Search and filters
Pack search supports type, query, page, searchMode, scopes, and filter fields such as category, like, visibility, ownerId, minLikeCount, minSuccessCount, updatedAtFrom, and updatedAtTo.
Track search supports task-specific filters such as assignee, goalId, parentId, dependsOn, and doneAtFrom / doneAtTo, plus goal-specific filters such as progressMin and progressMax. It also accepts searchMode.
searchMode selects the ranking mode: keyword (default) or semantic (keyword matching plus vector similarity). Omit it for keyword search.
{
"type": "task",
"query": "docs",
"scopes": [{ "type": "personal" }],
"filter": { "status": ["todo", "in_progress"] }
}Bulk apply tracks
POST /v1/tracks/apply can create, update, and delete multiple tracks in one request. Non-UUID ids create new records and can be referenced by other upserts in the same request.
{
"scope": { "type": "personal" },
"upserts": [
{ "id": "t001", "title": "Task A", "task": { "status": "todo" } },
{ "id": "t002", "title": "Task B", "task": { "status": "todo", "dependsOn": ["t001"] } }
]
}Errors
Errors are returned as JSON. Validation errors may include schema parsing details.
| Status | Meaning |
|---|---|
| 400 | Invalid input, route parameter, or query parameter |
| 401 | Missing or invalid bearer token |
| 402 | Not enough credits for a credit-gated operation |
| 403 | Authenticated but not allowed in the selected scope/workspace |
| 404 | Requested record or reference was not found |
| 409 | Conflict, such as an invalid state transition or duplicate constraint |
| 429 | Rate limited, especially OTP creation |
| 500 | Unexpected server error |
| 502 | Upstream service returned an invalid or failed response |
Retry only 429 and transient 5xx responses, and use backoff.