Auth
Request a verification code. Sends a 6-digit code to the provided email.
| Field | Type | Description |
|---|---|---|
| email* | string | Your email address |
Returns: 200 { "ok": true }
Verify the code and receive an API key. Creates an account if one doesn't exist.
| Field | Type | Description |
|---|---|---|
| email* | string | Same email from signup |
| code* | string | 6-digit verification code |
Returns: 200 { "api_key": "...", "workspace_id": "..." }
Create an additional API key. Requires existing API key auth. The key name becomes the actor's identity.
| Field | Type | Description |
|---|---|---|
| name* | string | Name for the key (e.g., "content-writer", "qa-bot") |
Returns: 201 { "api_key": "...", "name": "..." }
Tasks
Create a task. created_by is auto-set from the API key name.
| Field | Type | Default | Description |
|---|---|---|---|
| title* | string | — | Short task name |
| objective | string | same as title | Detailed instructions for the agent |
| priority | string | medium | low, medium, high, critical |
| mode | string | full-auto | full-auto, approve-first, review-after |
| model | string | — | AI model hint (opus, sonnet, etc.) |
| project | string | — | Group tasks by project |
| assignee | string | — | Who should act on this task next |
| scheduled_for | string | — | ISO 8601 datetime for delayed execution |
scheduled_for is set → scheduled. If mode is approve-first → awaiting-approval. Otherwise → queued.Returns: 201 with task object
List tasks. Sorted by priority then created_at.
| Query Param | Description |
|---|---|
| status | Filter by status (queued, in-progress, done, etc.) |
| assignee | Filter by assignee (includes unassigned tasks) |
Returns: 200 with array of tasks
Get a single task by ID.
Returns: 200 with task object, or 404
Approve a task. Only valid when status is awaiting-approval.
Returns: 200 with updated task, or 400
Reject a task. Valid from any active status.
Returns: 200 with updated task
Mark a task as done. Sets completed_at.
| Field | Type | Description |
|---|---|---|
| output | string | Optional result text |
Returns: 200 with updated task
Cancel a task. Rejected if status is already done, cancelled, or rejected.
Returns: 200 with updated task, or 400
Delete a task permanently.
Returns: 200 { "ok": true }, or 404
Schedules
Create a recurring schedule. Tasks are created automatically on the cron rhythm.
| Field | Type | Default | Description |
|---|---|---|---|
| title* | string | — | Schedule name |
| cron* | string | — | Cron expression (e.g., "0 9 * * *") |
| objective | string | — | Instructions passed to created tasks |
| priority | string | medium | Priority for created tasks |
| mode | string | full-auto | Execution mode for created tasks |
| model | string | — | AI model for created tasks |
| project | string | — | Project for created tasks |
Returns: 201 with schedule object
List all schedules.
Returns: 200 with array
Create a task immediately from the schedule template. Updates last_run.
Returns: 201 with task object
Pause a schedule. Sets active = false.
Returns: 200 with updated schedule
Resume a paused schedule.
Returns: 200 with updated schedule
Delete a schedule permanently.
Returns: 200 { "ok": true }, or 404
Worker
GET /api/worker/next returns null if any task is already in-progress. One task at a time per workspace.Poll for the next available task. Returns the highest-priority queued or approved task and sets it to in-progress.
| Query Param | Description |
|---|---|
| assignee | Return tasks assigned to this name or unassigned |
Returns: 200 { "task": { ... } } or { "task": null }
Report task completion.
| Field | Type | Description |
|---|---|---|
| task_id* | string | Task ID |
| output | string | Task output / result |
| error | string | Error message (sets status to blocked) |
| duration_secs | number | Execution duration |
error is set → blocked. If task mode is review-after → review. Otherwise → done.Returns: 200 with updated task
Worker keepalive signal.
Returns: 200 { "ok": true }
Audit Log
Get audit log entries. Every task state change, approval, and completion is recorded.
| Query Param | Description |
|---|---|
| entity_type | Filter by type (task, schedule) |
| entity_id | Filter by specific entity ID |
Returns: 200 with array of audit log entries
System
Task counts grouped by status.
Returns: 200 { "queued": 3, "in-progress": 1, "done": 12, ... }
Get quota status for your current plan.
Returns: 200 with quota limits and current usage
Health check. No authentication required.
Returns: 200 { "ok": true }