API Reference
Complete REST API reference for the barkcli web server. All endpoints require authentication when --token is used.
Board Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/boards | List all board names |
| POST | /api/boards/create | Create a new board |
| DELETE | /api/boards/:name | Delete a board |
| GET | /api/board?name= | Get board YAML |
| PUT | /api/board | Save board YAML |
Card Endpoints
| Method | Endpoint | Description |
|---|
| POST | /api/board/cards/:id/comments | Add comment to card |
Memory Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/memory?q=&tier=&limit= | List/search memories |
| POST | /api/memory | Add memory entry |
| DELETE | /api/memory/:id | Delete memory |
| GET | /api/memory/stats | Memory statistics |
| POST | /api/memory/fact | Add project fact |
| GET | /api/memory/facts | List project facts |
Specs Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/specs?name= | List specs |
| POST | /api/specs | Create spec |
| GET | /api/specs/:id | Get spec details |
| PUT | /api/specs/:id | Update spec |
| DELETE | /api/specs/:id | Delete spec |
| POST | /api/specs/:id/requirements | Add requirement |
| PUT | /api/specs/:id/requirements/:req_id | Update requirement |
| GET | /api/specs/:id/trace | Traceability view |
| GET | /api/specs/coverage | Coverage report |
| POST | /api/specs/scan-stale | Scan for stale requirements |
Checkpoint Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/checkpoints | List checkpoints |
| POST | /api/checkpoints | Save checkpoint |
| POST | /api/checkpoints/:id/restore | Restore checkpoint |
Undo/Diff/Blame Endpoints
| Method | Endpoint | Description |
|---|
| POST | /api/undo | Undo last change |
| GET | /api/diff | Show diff from last state |
| GET | /api/blame/:card_id | Card change history |
| POST | /api/snapshot | Save named snapshot |
Import/Export Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/export?name=&format= | Export board (yaml/json) |
| POST | /api/import | Import board |
Validate/Doctor Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/validate | Validate all boards |
| POST | /api/doctor | Auto-fix board issues |
Management Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/tasks | List tasks |
| POST | /api/tasks | Create task |
| GET | /api/tasks/:id | Get task |
| PUT | /api/tasks/:id | Update task |
| DELETE | /api/tasks/:id | Delete task |
| POST | /api/tasks/:id/claim | Claim task for agent |
| POST | /api/tasks/:id/complete | Complete task |
| POST | /api/tasks/:id/fail | Fail task |
| GET | /api/agents | List agents |
| POST | /api/agents | Register agent |
| GET | /api/agents/:id | Get agent |
| DELETE | /api/agents/:id | Remove agent |
| GET | /api/agents/:id/status | Agent status |
| POST | /api/orchestrate/next | Dispatch next task |
| POST | /api/orchestrate/cycle | Run orchestration cycle |
| GET | /api/orchestrate/status | Orchestration status |
Sprints Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/sprints | List sprints |
| POST | /api/sprints | Start sprint |
| POST | /api/sprints/end | End sprint |
Autopilot Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/autopilot/status?name= | Loop phase, human gates, agent next action |
| POST | /api/intake | Submit intent → card + spec |
| POST | /api/autopilot/propose | Propose plan (creates approval gate) |
| POST | /api/autopilot/approve | Approve plan (human gate) |
| POST | /api/autopilot/reject | Reject plan (human gate) |
| POST | /api/review | Run review (auto-move passes) |
Mind & Skills Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/mind | Mind snapshot (health, blockers, next) |
| GET | /api/mind/digest | Mind digest markdown |
| GET | /api/skills | List BMAD skills |
| GET | /api/skills/:id | Get skill by id |
| GET | /api/docs | List bundled docs |
| GET | /api/docs/:file | Get doc file |
Other Endpoints
| Method | Endpoint | Description |
|---|
| GET | /api/history?card=&limit=&since= | Operation history |
| GET | /api/sessions?limit=&since= | Agent sessions |
| GET | /api/context?name= | Code context |
| POST | /api/context/sync | Git-aware context refresh |
| POST | /api/context/clear | Clear code context |
| GET | /api/code?q=&top= | Symbol search |
| GET | /api/config | AI configuration |
| GET | /api/checkpoints?name= | List checkpoints (see Timeline) |
| GET | /api/diff?name= | Show diff (see Timeline) |
| WS | /ws | WebSocket for live reload |
Authentication
When the server is started with --token, all API endpoints require:
- Query parameter:
?token=mysecret - Header:
Authorization: Bearer mysecret
Static assets (HTML, JS, CSS) are always public.