Skip to main content
Questions or issues? Contact us at api-support@manus.ai. After creating a task with task.create, the agent runs asynchronously. Use task.listMessages to poll for events and track progress, or set up Webhooks to receive push notifications when task status changes.
curl 'https://api.manus.ai/v2/task.listMessages?task_id=YOUR_TASK_ID&order=desc&limit=10' \
  -H 'x-manus-api-key: YOUR_API_KEY'

Task status

Look for status_update events in the response. The agent_status field tells you what to do next:
agent_statusMeaningAction
runningAgent is workingKeep polling
stoppedTask completedRead assistant_message events for results
waitingNeeds user confirmation or inputHandle based on event type (see below)
errorTask failedRead error_message for details

Handling waiting status

When agent_status is waiting, the status_detail tells you what the agent needs:
{
    "type": "status_update",
    "status_update": {
        "agent_status": "waiting",
        "status_detail": {
            "waiting_for_event_id": "evt_abc123",
            "waiting_for_event_type": "gmailSendAction",
            "waiting_description": "Send email to user@example.com",
            "confirm_input_schema": {
                "type": "object",
                "properties": {
                    "accept": { "type": "boolean" },
                    "save_draft": { "type": "boolean" }
                }
            }
        }
    }
}
There are two ways to respond, depending on waiting_for_event_type:
  • messageAskUser — The agent is asking a question. Reply with task.sendMessage. Do not use task.confirmAction.
  • All other types — Confirm or reject via task.confirmAction. The confirm_input_schema field in the event is a JSON Schema describing the expected input format — use it to validate or dynamically build the confirmation payload.

Using task.confirmAction

curl -X POST 'https://api.manus.ai/v2/task.confirmAction' \
  -H 'x-manus-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "task_id": "YOUR_TASK_ID",
    "event_id": "evt_abc123",
    "input": { "accept": true }
  }'
The input format varies by waiting_for_event_type. The table below lists currently supported event types — new types may be added in the future. Always check the confirm_input_schema returned in each event for the definitive schema.
Event TypeDescriptionExample Input
needConnectMyBrowserSelect a browser from browser.onlineList, or skip{ "action": "select", "client_id": "..." } or { "action": "skip" }
gmailSendActionConfirm send, or save as draft{ "accept": true } or { "accept": true, "save_draft": true }
outlookSendMailsActionConfirm send, or save as draft{ "accept": true } or { "accept": true, "save_draft": true }
deployActionConfirm deploy. Set global_allow to skip future confirmations{ "accept": true, "global_allow": true }
terminalExecuteConfirm command. Set always_allow to skip future confirmations{ "accept": true, "always_allow": true }
videoGenerateSelect video quality: standard (default) or premium{ "choice": "standard" }
apiHighCreditNoticeRespond to high-credit notice: accept, reject, or do_not_show_again{ "action": "accept" }
googleCalendarCreateConfirm calendar event creation{ "accept": true }
googleCalendarUpdateConfirm calendar event update{ "accept": true }
googleCalendarDeleteConfirm calendar event deletion{ "accept": true }
outlookCalendarCreateConfirm calendar event creation{ "accept": true }
outlookCalendarUpdateConfirm calendar event update{ "accept": true }
outlookCalendarDeleteConfirm calendar event deletion{ "accept": true }
metaMarketingActionConfirm marketing action. Optionally select ad accounts via selectedAccountIds{ "accept": true, "selectedAccountIds": ["act_123"] }
metaMarketingActionResultConfirm marketing result. Optionally specify mode{ "accept": true }
webdevRunActionRun web app. mode: quality / speed (default) / max{ "accept": true, "mode": "speed" }
webdevRunAction (deploy)Deploy web app. visibility: owner (default) / team / public{ "accept": true, "visibility": "owner" }
webdevRequestSecretsProvide secrets as [{key, value}] array, or reject with accept: false{ "accept": true, "secrets": [{"key": "X", "value": "Y"}] }
connectorOauthExpiredRe-authorize expired connector{ "accept": true }
mapreduceActionConfirm map-reduce operation{ "accept": true }
For event types that support accept, passing accept: false will not produce any event — the task remains in waiting status. Exception: webdevRequestSecrets where accept: false explicitly rejects the request.

Using My Browser

You can let the agent use your local browser. When the agent needs a browser during execution, it will trigger a needConnectMyBrowser waiting event. Use browser.onlineList to get available clients, then select one via task.confirmAction:
# 1. Get online browser clients
curl 'https://api.manus.ai/v2/browser.onlineList' \
  -H 'x-manus-api-key: YOUR_API_KEY'

# 2. When needConnectMyBrowser event is received, select a browser
curl -X POST 'https://api.manus.ai/v2/task.confirmAction' \
  -H 'x-manus-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "task_id": "YOUR_TASK_ID",
    "event_id": "evt_abc123",
    "input": { "action": "select", "client_id": "0e9ad711-8471-4fcc-a9de-8309f0f12c87" }
  }'
If browser.onlineList returns an empty list, no browser clients are online. Install and enable the Manus Browser Extension first.

Complete flow

1. POST /v2/task.create          → Create task
2. GET  /v2/task.listMessages    → Poll for events
   ├─ agent_status=running       → Keep polling
   ├─ agent_status=waiting       → Check waiting_for_event_type
   │   ├─ messageAskUser         → POST /v2/task.sendMessage
   │   ├─ needConnectMyBrowser   → POST /v2/task.confirmAction (select browser)
   │   └─ Other types            → POST /v2/task.confirmAction (confirm/reject)
   ├─ agent_status=stopped       → Task complete, read results
   └─ agent_status=error         → Task failed, read error details