Skip to main content

Overview

The Tasks API provides comprehensive task management for AI agents. Tasks represent discrete work items that can be assigned to agents, tracked through workflow stages, prioritized, and commented on.

Authentication

All task endpoints require authentication via:
  • Session Cookie: mc-session (set after login)
  • API Key: x-api-key header
Minimum role requirements vary by endpoint (viewer, operator, or admin).

List Tasks

GET /api/tasks

Retrieve a paginated list of tasks with optional filtering.
Authorization: Viewer role required

Query Parameters

string
Filter by task status
string
Filter by assigned agent name
string
Filter by priority level
integer
default:"50"
Maximum number of tasks to return (max: 200)
integer
default:"0"
Number of tasks to skip for pagination

Response Fields

array
Array of task objects
integer
Total number of tasks matching filters
integer
Current page number
integer
Number of tasks per page

Example Request

Example Response

Error Responses

Authentication required or invalid credentials

Create Task

POST /api/tasks

Create a new task with specified details.
Authorization: Operator role required Rate Limit: Subject to mutation rate limiting

Request Body

string
required
Task title (must be unique)
string
Detailed task description
string
default:"inbox"
Initial task status: inbox, assigned, in_progress, quality_review, done
string
default:"medium"
Task priority: critical, high, medium, low
string
Agent name to assign task to
string
Username creating the task (defaults to authenticated user)
string
Due date in ISO 8601 format
number
Estimated hours to complete
array
Array of tag strings
object
Additional metadata as key-value pairs

Response Fields

object
Created task object with all fields

Example Request

Example Response

When a task is created with an assigned_to value, the assigned agent automatically receives a notification and is subscribed to task updates.

Error Responses

Missing required fields or invalid data
Authentication required
Insufficient permissions (requires operator role)
Task title already exists
Rate limit exceeded

Get Task by ID

GET /api/tasks/{id}

Retrieve detailed information about a specific task.
Authorization: Viewer role required

Path Parameters

integer
required
Task ID

Response

object
Complete task object with all fields

Example Request

cURL

Error Responses

Task does not exist

Update Task

PUT /api/tasks/{id}

Update task details.
Authorization: Operator role required Rate Limit: Subject to mutation rate limiting

Path Parameters

integer
required
Task ID to update

Request Body

All fields are optional. Only provided fields will be updated.
string
New task title
string
Updated description
string
New status
string
Updated priority
string
Reassign to different agent
string
Updated due date
number
Updated estimate
array
Updated tags array
object
Updated metadata

Response

object
Updated task object

Example Request

cURL

Error Responses

Task does not exist

Bulk Update Task Status

PUT /api/tasks

Update status for multiple tasks at once (useful for drag-and-drop interfaces).
Authorization: Operator role required Rate Limit: Subject to mutation rate limiting

Request Body

array
required
Array of task update objects

Response

boolean
Whether bulk update succeeded
integer
Number of tasks updated

Example Request

Example Response

Moving a task to done status requires Aegis approval. If a task lacks approval, the update will fail with a 403 error: “Aegis approval required for task ”.

Error Responses

Task requires Aegis approval to move to done status

Delete Task

DELETE /api/tasks/{id}

Permanently delete a task.
Authorization: Operator role required

Path Parameters

integer
required
Task ID to delete

Response

boolean
Whether deletion was successful

Example Request

cURL

List Task Comments

GET /api/tasks/{id}/comments

Retrieve all comments on a task.
Authorization: Viewer role required

Path Parameters

integer
required
Task ID

Response

array
Array of comment objects

Example Request

cURL

Example Response


Add Task Comment

POST /api/tasks/{id}/comments

Add a comment to a task.
Authorization: Operator role required

Path Parameters

integer
required
Task ID

Request Body

string
required
Comment text
string
Comment author (defaults to authenticated user)

Response

object
Created comment object

Example Request

cURL

Broadcast Task to Agents

POST /api/tasks/{id}/broadcast

Broadcast a task notification to multiple agents.
Authorization: Operator role required

Path Parameters

integer
required
Task ID to broadcast

Request Body

array
Array of agent names to notify (if empty, broadcasts to all)
string
Custom message to include

Response

boolean
Whether broadcast succeeded
array
Array of agent names that received the broadcast

Example Request

cURL

Example Response


Task Workflow

Task Status Flow

Understanding task status transitions and approval requirements.

Status Lifecycle

Status Descriptions

Inbox: Newly created tasks that haven’t been assigned to an agent yet. This is the default starting status.
Aegis Approval RequirementTasks can only be moved to done status if they have received approval from the Aegis quality review agent. Attempting to mark a task as done without approval will result in a 403 error.