task.listMessages
Lists event messages for a task with cursor-based pagination. Use this to poll for progress after task.create or task.sendMessage. See the Task Lifecycle guide for how to handle each status.
curl --request GET \
--url 'https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10' \
--header 'x-manus-api-key: <api-key>'import requests
url = "https://api.manus.ai/v2/task.listMessages"
headers = {
"x-manus-api-key": "<api-key>"
}
response = requests.get(url, headers=headers, params={
"task_id": "<string>",
"order": "desc",
"limit": "10"
})
print(response.text)const options = {
method: 'GET',
headers: {'x-manus-api-key': '<api-key>'}
};
fetch('https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-manus-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-manus-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10")
.header("x-manus-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-manus-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ok": true,
"request_id": "<string>",
"task_id": "<string>",
"messages": [
{
"id": "<string>",
"timestamp": 123,
"user_message": {
"content": "<string>",
"attachments": [
{
"filename": "<string>",
"url": "<string>",
"content_type": "<string>"
}
]
},
"assistant_message": {
"content": "<string>",
"attachments": [
{
"filename": "<string>",
"url": "<string>",
"content_type": "<string>"
}
]
},
"error_message": {
"error_type": "<string>",
"content": "<string>"
},
"status_update": {
"status_detail": {
"waiting_for_event_id": "<string>",
"waiting_for_event_type": "<string>",
"waiting_description": "<string>",
"confirm_input_schema": {}
},
"brief": "<string>",
"description": "<string>"
},
"tool_used": {
"tool": "<string>",
"action_id": "<string>",
"brief": "<string>",
"description": "<string>",
"message": {
"action": "<string>",
"param": "<string>"
}
},
"plan_update": {
"steps": [
{
"title": "<string>",
"started_at": 123,
"end_at": 123
}
]
},
"new_plan_step": {
"step_id": "<string>",
"title": "<string>"
},
"explanation": {
"content": "<string>"
},
"structured_output_result": {
"success": true,
"value": {},
"error": "<string>"
}
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}create_task or manage_all_tasks — see the Open App guide. With create_task scope, can only access tasks created by this Open App.agent-default-main_task as task_id to read the IM agent’s conversation history.Status handling: Check status_update events — running → keep polling, stopped → read results, waiting → respond with task.sendMessage or task.confirmAction, error → read error details.Structured Output: If the task was created with structured_output_schema, a structured_output_result event appears after the task stops. See the Structured Output guide.See the Task Lifecycle guide for the complete flow.Headers
API key for direct authentication. Provide either this or Authorization, not both. See Authentication.
Query Parameters
The unique identifier of the task to list messages for. Supports the shortcut agent-default-main_task for the IM agent's main task.
Number of messages to return per page. Default: 50, Range: 1-200.
Pagination cursor from the previous response's next_cursor field. Omit for the first page.
Sort direction by timestamp. "desc" (default) returns newest first, "asc" returns oldest first (chronological order).
asc, desc When true, includes detailed events: tool_used (tools the agent invoked), plan_update (full plan snapshots), new_plan_step (individual step additions), and explanation (agent reasoning). Default: false — only returns user_message, assistant_message, error_message, status_update, and user_stop.
Format for slides attachments in the response. "html" (default) returns raw HTML slides. "pptx" auto-converts HTML slides to PowerPoint format.
html, pptx Response
Messages retrieved successfully.
Whether the request was successful.
true
Unique identifier for this API request.
The task ID these messages belong to.
Array of task event objects representing the conversation and agent activity.
Hide child attributes
Hide child attributes
Unique identifier for this event.
Event type. Determines which payload field is present. tool_used, plan_update, new_plan_step, and explanation are only included when verbose=true. structured_output_result appears after task completion when a structured_output_schema was provided.
user_message, assistant_message, error_message, status_update, tool_used, plan_update, new_plan_step, explanation, user_stop, structured_output_result Unix timestamp in milliseconds when this event occurred.
Present when type="user_message". Contains a message sent by the user.
Hide child attributes
Hide child attributes
The text content of the user's message.
How the message was sent. "text" for typed input, "voice" for voice input.
text, voice Files or images the user attached to their message.
Hide child attributes
Hide child attributes
Type of attachment. "image" for images, "file" for documents, "voice" for audio recordings, "slides" for presentation slides.
image, file, voice, slides Display name of the attachment file.
URL to download the attachment content.
MIME type of the attachment (e.g., "application/pdf", "image/png").
Present when type="assistant_message". Contains a response from the agent.
Hide child attributes
Hide child attributes
The text content of the agent's response.
Files, images, or slides the agent generated as output.
Hide child attributes
Hide child attributes
Type of attachment. "image" for images, "file" for documents, "voice" for audio recordings, "slides" for presentation slides.
image, file, voice, slides Display name of the attachment file.
URL to download the attachment content.
MIME type of the attachment (e.g., "application/pdf", "image/png").
Present when type="status_update". Indicates a change in the agent's processing state.
Hide child attributes
Hide child attributes
The agent's current state. "waiting" means the agent needs user confirmation — check status_detail for the event to confirm.
running, stopped, waiting, error Additional details when agent_status is "waiting". Contains the event ID needed for task.confirmAction.
Hide child attributes
Hide child attributes
The event ID to pass as event_id when calling task.confirmAction.
Type of action awaiting confirmation (e.g., "email_send", "calendar_create").
Human-readable description of what the agent is waiting for.
JSON Schema defining the expected input format for the confirmation, if additional input is needed.
Short summary of the current agent activity.
Detailed description of what the agent is doing.
Present when type="tool_used" (verbose=true only). Records a tool invocation by the agent.
Hide child attributes
Hide child attributes
Name of the tool that was used (e.g., "browser", "code_executor").
Unique identifier for this tool action.
Result of the tool invocation.
success, error, rollback Short summary of the tool action.
Detailed description of what the tool did.
Present when type="plan_update" (verbose=true only). A full snapshot of the agent's current execution plan.
Hide child attributes
Hide child attributes
All steps in the current plan with their statuses.
Hide child attributes
Hide child attributes
Current status of this plan step.
todo, doing, done, failed Description of this plan step.
Unix timestamp when this step started. Null if not yet started.
Unix timestamp when this step finished. Null if not yet completed.
Present when type="structured_output_result". Contains the extracted structured data. Appears after the status_update (stopped) event when the task was created with a structured_output_schema.
Hide child attributes
Hide child attributes
Whether the agent produced a meaningful result. When false, value contains schema-conforming defaults and error explains what happened.
The extracted value conforming to the schema provided in structured_output_schema. Always present and valid, even when success is false — see zero-value rules.
Error description when success is false. Null when success is true.
Whether there are more messages beyond this page.
Cursor for fetching the next page. Only present when has_more is true.
Was this page helpful?
curl --request GET \
--url 'https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10' \
--header 'x-manus-api-key: <api-key>'import requests
url = "https://api.manus.ai/v2/task.listMessages"
headers = {
"x-manus-api-key": "<api-key>"
}
response = requests.get(url, headers=headers, params={
"task_id": "<string>",
"order": "desc",
"limit": "10"
})
print(response.text)const options = {
method: 'GET',
headers: {'x-manus-api-key': '<api-key>'}
};
fetch('https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-manus-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-manus-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10")
.header("x-manus-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-manus-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ok": true,
"request_id": "<string>",
"task_id": "<string>",
"messages": [
{
"id": "<string>",
"timestamp": 123,
"user_message": {
"content": "<string>",
"attachments": [
{
"filename": "<string>",
"url": "<string>",
"content_type": "<string>"
}
]
},
"assistant_message": {
"content": "<string>",
"attachments": [
{
"filename": "<string>",
"url": "<string>",
"content_type": "<string>"
}
]
},
"error_message": {
"error_type": "<string>",
"content": "<string>"
},
"status_update": {
"status_detail": {
"waiting_for_event_id": "<string>",
"waiting_for_event_type": "<string>",
"waiting_description": "<string>",
"confirm_input_schema": {}
},
"brief": "<string>",
"description": "<string>"
},
"tool_used": {
"tool": "<string>",
"action_id": "<string>",
"brief": "<string>",
"description": "<string>",
"message": {
"action": "<string>",
"param": "<string>"
}
},
"plan_update": {
"steps": [
{
"title": "<string>",
"started_at": 123,
"end_at": 123
}
]
},
"new_plan_step": {
"step_id": "<string>",
"title": "<string>"
},
"explanation": {
"content": "<string>"
},
"structured_output_result": {
"success": true,
"value": {},
"error": "<string>"
}
}
],
"has_more": true,
"next_cursor": "<string>"
}{
"ok": false,
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}