Skip to content

Mission control endpoints

API reference for task management, approval workflows, activity streaming, and dashboard data.

3 min read

Tasks

List tasks

GET /api/mission-control/tasks

Returns all tasks for the authenticated user, ordered by creation date (newest first).

Query parameters:

ParameterTypeDescription
statusstringFilter by status: pending, running, review, done, failed, cancelled
desktopIdstringFilter 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:

FieldTypeRequiredDescription
type"prompt" or "command"YesTask execution mode
contentstringYesPrompt text or shell command
desktopIdstringYesTarget desktop ID
requiresApprovalbooleanNoIf 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:

FieldTypeRequiredDescription
decision"approve" or "reject"YesYour review decision
feedbackstringNoExplanation (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:

FieldTypeRequiredDescription
decision"approve" or "reject"YesYour decision
feedbackstringNoOptional 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

StatusMeaning
400Invalid request body or parameters
401Not authenticated
404Task or approval not found
409Status conflict -- task is not in the required status for this operation