REST API
The web server exposes a JSON API under /api/. You can call these endpoints through the running server or directly from the CLI with dodo api.
CLI Access
The dodo api command calls endpoints without needing a running server:
dodo api tasks # GET /api/tasks
dodo api get tasks # explicit method
dodo api post tasks -d '{"title": "My task"}' # create
dodo api patch tasks/abc123 -d '{"status": "done"}'
dodo api delete tasks/abc123
Endpoints
List Tasks
GET /api/tasks
Query parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status (open, in-progress, blocked, done) |
tag | string | Filter by tag |
parent | string | Filter by parent task ID |
Returns Array<Task>.
Create Task
POST /api/tasks
Body (application/json):
| Field | Type | Required | Description |
|---|---|---|---|
title | string | yes | Task title |
description | string | Task description | |
parent_id | string or null | Parent task ID | |
tags | Array<string> | Tags to assign | |
blocked_by | Array<string> | IDs of blocking tasks |
Returns Task with status 201.
Search Tasks
GET /api/tasks/search
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | yes | Search query |
status | string | Filter by status | |
tag | string | Filter by tag | |
all | boolean | Include done tasks (default: false) | |
limit | number | Max results (default: 20) |
Returns Array<Task & { _score: number }> sorted by relevance.
Get Task
GET /api/tasks/:id
Returns Task or 404.
Update Task
PATCH /api/tasks/:id
Body (application/json):
| Field | Type | Description |
|---|---|---|
title | string | New title |
description | string | New description |
status | TaskStatus | New status |
parent_id | string or null | New parent ID (null to unset) |
add_tags | Array<string> | Tags to add |
remove_tags | Array<string> | Tags to remove |
add_blockers | Array<string> | Blocker IDs to add |
remove_blockers | Array<string> | Blocker IDs to remove |
All fields are optional. Returns the updated Task.
Delete Task
DELETE /api/tasks/:id
Deletes the task and cleans up all references. Returns { "deleted": true }.
Get Prompt Template
GET /api/prompt-template
Returns the current prompt template and available variables:
{
"template": "I need you to work on the following task...",
"variables": ["{{id}} - Task ID", "{{title}} - Task title", "..."]
}
Save Prompt Template
PUT /api/prompt-template
Body (application/json):
| Field | Type | Required | Description |
|---|---|---|---|
template | string | yes | Template text with {{variable}} placeholders |
Saves the template to .dodo/prompt-template.txt. Returns { "ok": true }.
Introspect
GET /api/__introspect
Returns a machine-readable description of all API endpoints, including methods, parameters, body schemas, and response types.
Task Schema
interface Task {
id: string;
title: string;
description: string;
status: "open" | "in-progress" | "blocked" | "done";
parent_id: string | null;
children: Array<string>;
blocked_by: Array<string>;
blocks: Array<string>;
tags: Array<string>;
created_at: string;
updated_at: string;
}