Mission control endpoints
API reference for task management, approval workflows, activity streaming, and dashboard data.
Tasks
List tasks
GET /api/mission-control/tasks
Returns all tasks for the authenticated user, ordered by creation date (newest first).
Query parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: pending, running, review, done, failed, cancelled |
desktopId | string | Filter by target desktop |
Response:
[
{
"id": "task_abc123",
"type": "prompt",
"content": "Install PostgreSQL and create a database",
"status": "running",
"desktopId": "clx...",
"requiresApproval": true,
"createdAt": "2026-03-15T10:00:00Z",
"startedAt": "2026-03-15T10:01:00Z",
"completedAt": null
}
]
Create task
POST /api/mission-control/tasks
Body:
| Field | Type | Required | Description |
|---|---|---|---|
type | "prompt" or "command" | Yes | Task execution mode |
content | string | Yes | Prompt text or shell command |
desktopId | string | Yes | Target desktop ID |
requiresApproval | boolean | No | If true, task pauses at review (default: false, unless global setting is on) |
Response: 201 with the created task.
Run task
POST /api/mission-control/tasks/:id/run
Starts a pending task. The task must be in pending status.
- Prompt tasks are sent to the desktop's AI agent via the chat endpoint
- Command tasks are executed directly on the desktop's shell
Response: 200 with the updated task (status: running).
Error: 409 if the task is not in pending status.
Review task
POST /api/mission-control/tasks/:id/review
Approve or reject a task that is in review status.
Body:
| Field | Type | Required | Description |
|---|---|---|---|
decision | "approve" or "reject" | Yes | Your review decision |
feedback | string | No | Explanation (useful when rejecting) |
Response: 200 with the updated task.
- Approved tasks move to
done - Rejected tasks move to
failed
Error: 409 if the task is not in review status.
Approvals
List approvals
GET /api/mission-control/approvals
Returns all pending approval records.
Response:
[
{
"id": "approval_xyz",
"taskId": "task_abc123",
"status": "pending",
"createdAt": "2026-03-15T10:05:00Z",
"task": {
"id": "task_abc123",
"type": "prompt",
"content": "Install PostgreSQL...",
"desktopId": "clx..."
}
}
]
Resolve approval
POST /api/mission-control/approvals/:id/resolve
Body:
| Field | Type | Required | Description |
|---|---|---|---|
decision | "approve" or "reject" | Yes | Your decision |
feedback | string | No | Optional feedback |
Response: 200 with the resolved approval. The associated task is updated accordingly.
Activity stream
GET /api/mission-control/activity/stream
SSE endpoint that pushes events for tasks, desktops, and approvals in real time. See Streaming endpoints for consumption details and code examples.
Dashboard overview
GET /api/mission-control/overview
Returns aggregate data for the mission control dashboard.
Response:
{
"tasks": {
"pending": 3,
"running": 1,
"review": 2,
"done": 45,
"failed": 3,
"cancelled": 1
},
"activeDesktops": 4,
"resources": {
"cpu": 34.2,
"memory": { "used": 8192, "total": 16384, "percent": 50.0 }
}
}
Error codes
| Status | Meaning |
|---|---|
400 | Invalid request body or parameters |
401 | Not authenticated |
404 | Task or approval not found |
409 | Status conflict -- task is not in the required status for this operation |