{
    "openapi": "3.1.0",
    "info": {
        "title": "Manus OpenAPI v2",
        "description": "API for integrating Manus into your workflow. All responses are wrapped with {\"ok\": true, \"request_id\": \"...\", ...} for success and {\"ok\": false, \"request_id\": \"...\", \"error\": {\"code\": \"...\", \"message\": \"...\"}} for errors.",
        "version": "2.0.0"
    },
    "servers": [
        {
            "url": "https://api.manus.ai"
        }
    ],
    "security": [
        {
            "ApiKeyAuth": []
        }
    ],
    "paths": {
        "/v2/user.me": {
            "get": {
                "summary": "GetCurrentUser",
                "description": "Returns the Manus user ID associated with the authenticated API key or OAuth2 access token. API Key and Trusted client callers also receive the user's display name, email, and avatar. This endpoint is read-only and does not require an OAuth scope.",
                "operationId": "openapi.v2.OpenapiV2Service.GetCurrentUser",
                "responses": {
                    "200": {
                        "description": "Current user retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "ok",
                                            "description": "Always \"ok\" for a successful response."
                                        },
                                        "user_id": {
                                            "type": "string",
                                            "description": "Manus user ID associated with the authenticated credential. Stable; use it for account linking."
                                        },
                                        "name": {
                                            "type": "string",
                                            "description": "Display name shown in Manus. Returned only for API Key or Trusted client. Omitted when the user has no display name."
                                        },
                                        "email": {
                                            "type": "string",
                                            "description": "Email address of the user. Returned only for API Key or Trusted client. For a team identity, this is the email the member joined the team with. Omitted when the account has no email address."
                                        },
                                        "avatar_url": {
                                            "type": "string",
                                            "description": "URL of the user's avatar image. Returned only for API Key or Trusted client. The URL can expire; call `user.me` again for a fresh link. Omitted when the user has no avatar."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. No OAuth scope is required. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/task.create": {
            "post": {
                "summary": "CreateTask",
                "description": "Creates a new task. The task runs asynchronously. Poll for progress with [task.listMessages](https://open.manus.ai/docs/v2/task.listMessages), send follow-ups with [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage). See the [Task Lifecycle](https://open.manus.ai/docs/v2/task-lifecycle) guide for the complete flow.",
                "operationId": "openapi.v2.OpenapiV2Service.CreateTask",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "message": {
                                        "$ref": "#/components/schemas/Message",
                                        "description": "The message to start the task with. Contains the prompt text, optional file attachments, and connector/skill configuration."
                                    },
                                    "website": {
                                        "type": "object",
                                        "title": "Website",
                                        "description": "Optional. An existing website for the new task to edit — the same as attaching the website in the Manus app. `message.content` must also contain a non-empty text instruction; a `hidden` text part also counts. Only web websites owned by the authorized user are accepted; mobile apps and games are not. Only task.create has this field: follow-up messages through [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage) only need the instruction. See [Edit a website in a new task](https://open.manus.ai/docs/v2/website#edit-a-website-in-a-new-task).",
                                        "properties": {
                                            "id": {
                                                "type": "string",
                                                "description": "Website ID — the same `website_id` that the `website.*` endpoints use, as returned by [website.status](https://open.manus.ai/docs/v2/website.status) or [website.publish](https://open.manus.ai/docs/v2/website.publish). Must not have surrounding whitespace. An OAuth client with only the `create_task` scope can use only websites whose source task it created."
                                            }
                                        },
                                        "required": [
                                            "id"
                                        ]
                                    },
                                    "project_id": {
                                        "type": "string",
                                        "description": "Project ID to associate this task with. The project's instruction will be automatically applied. Use [project.list](https://open.manus.ai/docs/v2/project.list) to get available project IDs."
                                    },
                                    "locale": {
                                        "type": "string",
                                        "description": "Locale for the task output language (e.g., \"en\", \"zh-CN\", \"ja\"). Defaults to the user's account locale setting."
                                    },
                                    "interactive_mode": {
                                        "type": "boolean",
                                        "description": "When enabled, the agent may pause and ask follow-up questions if the input is insufficient. When disabled (default), the agent proceeds with best-effort execution without asking.",
                                        "default": false
                                    },
                                    "hide_in_task_list": {
                                        "type": "boolean",
                                        "description": "When true, the task does not appear in the Manus webapp task list. It remains accessible through the `task_url` in the response.",
                                        "default": false
                                    },
                                    "share_visibility": {
                                        "type": "string",
                                        "enum": [
                                            "private",
                                            "team",
                                            "public"
                                        ],
                                        "description": "Who can view the task.\n\n- `private` (default) — only the task creator.\n- `team` — all team members.\n- `public` — anyone with the `share_url`, without authentication.",
                                        "default": "private"
                                    },
                                    "agent_profile": {
                                        "type": "string",
                                        "anyOf": [
                                            {
                                                "enum": [
                                                    "standard",
                                                    "lite",
                                                    "max",
                                                    "max-medium",
                                                    "max-high",
                                                    "max-extra",
                                                    "max-ultra"
                                                ]
                                            },
                                            {
                                                "pattern": "^(?:(?:manus-)?[0-9]+(?:\\.[0-9]+)+(?:-(?:standard|lite|max(?:-(?:medium|high|extra|ultra))?))?)?$"
                                            }
                                        ],
                                        "description": "Agent profile to use for the task. Use the stable values `standard` (default), `lite`, or `max`. For `max`, you can also choose a thinking level with `max-medium`, `max-high`, `max-extra`, or `max-ultra` (deepest reasoning, slowest, and highest credit usage); plain `max` uses the default Max thinking level, currently equivalent to `max-extra`. Versioned aliases such as `1.6-lite`, `2.0-max`, `2.0-max-ultra`, and the legacy `manus-1.6-lite` form are also accepted; the version segment is ignored because model versions are not selected independently. A version without a suffix, such as `1.6` or `manus-1.6`, means `standard`. Omit the field (or pass an empty string) to use `standard`. Free personal accounts are downgraded to `lite` regardless of the requested value.",
                                        "default": "standard"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Custom title for the task. If not provided, a title is generated from the input message. If generation times out, `task_title` is the placeholder `generating title...`; fetch `task.detail` later for the updated title."
                                    },
                                    "async_title": {
                                        "type": "boolean",
                                        "description": "When `true` and `title` is omitted, the task is created without waiting for title generation. `task_title` is the placeholder `generating title...` until the title is ready; fetch `task.detail` later for the updated title. Ignored when `title` is provided.",
                                        "default": false
                                    },
                                    "structured_output_schema": {
                                        "type": "object",
                                        "description": "JSON Schema for structured output extraction. When provided, the agent runs normally, then a post-processing step extracts a result conforming to your schema. The schema must follow the [Structured Output](https://open.manus.ai/docs/v2/structured-output) subset of JSON Schema: all object properties must be listed in `required`, and `additionalProperties` must be `false`. See the [Structured Output](https://open.manus.ai/docs/v2/structured-output) guide."
                                    },
                                    "clear_connectors": {
                                        "type": "boolean",
                                        "description": "Clears the connector selection for the new task. The task starts without connectors; the project's default connectors and your default connectors are not loaded. Cannot be combined with a non-empty `message.connectors`. Other task features may still provide tools. See the [Connectors](https://open.manus.ai/docs/v2/connectors) guide.",
                                        "default": false
                                    }
                                },
                                "required": [
                                    "message"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Task created successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request, useful for debugging."
                                        },
                                        "task_id": {
                                            "type": "string",
                                            "description": "Unique identifier for the created task. Use this to track, update, or delete the task."
                                        },
                                        "task_title": {
                                            "type": "string",
                                            "description": "Title for the task. Returns the custom title if one was provided in the request, otherwise the generated title, or the placeholder `generating title...` until the title is ready. See `title`."
                                        },
                                        "task_url": {
                                            "type": "string",
                                            "description": "URL to view the task in the Manus webapp (e.g., https://manus.im/app/{task_id})."
                                        },
                                        "share_url": {
                                            "type": "string",
                                            "description": "Publicly accessible URL for sharing. Only present when share_visibility is not \"private\"."
                                        },
                                        "share_visibility": {
                                            "type": "string",
                                            "enum": [
                                                "private",
                                                "team",
                                                "public"
                                            ],
                                            "description": "The actual visibility state of the task."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/task.detail": {
            "get": {
                "summary": "GetTask",
                "description": "Retrieves a task's status and metadata. Use [task.listMessages](https://open.manus.ai/docs/v2/task.listMessages) for the full event history, or [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage) to continue the conversation.",
                "operationId": "openapi.v2.OpenapiV2Service.GetTask",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "label": "cURL",
                        "source": "curl --request GET \\\n  --url 'https://api.manus.ai/v2/task.detail?task_id=<string>' \\\n  --header 'x-manus-api-key: <api-key>'"
                    },
                    {
                        "lang": "python",
                        "label": "Python",
                        "source": "import requests\n\nurl = \"https://api.manus.ai/v2/task.detail\"\n\nheaders = {\n    \"x-manus-api-key\": \"<api-key>\"\n}\n\nresponse = requests.get(url, headers=headers, params={\"task_id\": \"<string>\"})\n\nprint(response.text)"
                    },
                    {
                        "lang": "javascript",
                        "label": "JavaScript",
                        "source": "const options = {\n  method: 'GET',\n  headers: {'x-manus-api-key': '<api-key>'}\n};\n\nfetch('https://api.manus.ai/v2/task.detail?task_id=<string>', options)\n  .then(res => res.json())\n  .then(res => console.log(res))\n  .catch(err => console.error(err));"
                    },
                    {
                        "lang": "php",
                        "label": "PHP",
                        "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.manus.ai/v2/task.detail?task_id=<string>\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"x-manus-api-key: <api-key>\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
                    },
                    {
                        "lang": "go",
                        "label": "Go",
                        "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.manus.ai/v2/task.detail?task_id=<string>\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"x-manus-api-key\", \"<api-key>\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
                    },
                    {
                        "lang": "java",
                        "label": "Java",
                        "source": "HttpResponse<String> response = Unirest.get(\"https://api.manus.ai/v2/task.detail?task_id=<string>\")\n  .header(\"x-manus-api-key\", \"<api-key>\")\n  .asString();"
                    },
                    {
                        "lang": "ruby",
                        "label": "Ruby",
                        "source": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.manus.ai/v2/task.detail?task_id=<string>\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"x-manus-api-key\"] = '<api-key>'\n\nresponse = http.request(request)\nputs response.read_body"
                    }
                ],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "task_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The unique identifier of the task to retrieve. Supports the shortcut `agent-default-main_task` for the IM agent's main task."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Task retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "task": {
                                            "$ref": "#/components/schemas/Task",
                                            "description": "The task object with current status and metadata."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/task.list": {
            "get": {
                "summary": "ListTasks",
                "description": "Lists tasks with optional filtering and cursor-based pagination. Use `scope` to filter by task type, e.g. `agent_subtask` with `agent_id` for agent subtasks. See [task.detail](https://open.manus.ai/docs/v2/task.detail) for full details on a specific task.",
                "operationId": "openapi.v2.OpenapiV2Service.ListTasks",
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "description": "Number of tasks to return per page. Default: 20, Max: 100."
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Pagination cursor from the previous response's next_cursor field. Omit for the first page."
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "description": "Sort direction by creation time. \"desc\" (default) returns newest first, \"asc\" returns oldest first."
                        }
                    },
                    {
                        "name": "scope",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all",
                                "agent_subtask",
                                "project",
                                "standard"
                            ],
                            "description": "Filter by task type.\n\n- `all` (default) — all tasks.\n- `standard` — regular tasks.\n- `project` — tasks in a project. Requires `project_id`.\n- `agent_subtask` — subtasks created by an agent. Requires `agent_id`."
                        }
                    },
                    {
                        "name": "agent_id",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Filter tasks by agent. Required when scope=\"agent_subtask\". Supports the shortcut `agent-default` for the IM agent. Use [agent.list](https://open.manus.ai/docs/v2/agent.list) to get available agent IDs."
                        }
                    },
                    {
                        "name": "project_id",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Filter tasks by project. Required when scope=\"project\". Use [project.list](https://open.manus.ai/docs/v2/project.list) to get available project IDs."
                        }
                    },
                    {
                        "name": "oauth_client_id",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Return only tasks created by this Open App. Mutually exclusive with `api_key_id`; passing both returns `invalid_argument`. Unknown IDs return an empty list.\n\n- **API Key or Trusted client:** any client ID.\n- **Standard OAuth client:** any client ID with `manage_all_tasks`; its own client ID only with `create_task`, and another ID returns `permission_denied`."
                        }
                    },
                    {
                        "name": "api_key_id",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Return only tasks created by this API key. Mutually exclusive with `oauth_client_id`; passing both returns `invalid_argument`. Unknown IDs return an empty list.\n\n- **API Key or Trusted client:** any key ID.\n- **Standard OAuth client:** any key ID with `manage_all_tasks`; not available with `create_task` only, which returns `permission_denied`."
                        }
                    },
                    {
                        "name": "include_deleted",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "description": "Include deleted tasks in the results. Default: `false`.\n\nWhen `true`, deleted tasks are returned in the same order and pages as other tasks, with `status: \"deleted\"` and `deleted_at`. All other filters and the same task visibility rules still apply.\n\nA deleted task contains only `id`, `status`, `created_at`, `updated_at`, `deleted_at`, `task_type`, and `task_url`. `title` and `share_visibility` are empty strings, and optional fields such as `credit_usage` and `agent_profile` are omitted.\n\nUse this to reconcile deletions your endpoint missed. See the `task_deleted` event in [Webhooks](https://open.manus.ai/docs/v2/webhooks-overview)."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Tasks retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Task"
                                            },
                                            "description": "Array of task objects matching the filter criteria."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "Whether there are more tasks beyond this page. If true, use next_cursor to fetch the next page."
                                        },
                                        "next_cursor": {
                                            "type": "string",
                                            "description": "Cursor to pass as the cursor parameter for the next page. Only present when has_more is true."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/task.stop": {
            "post": {
                "summary": "StopTask",
                "description": "Stops a running task. The task status will change to `stopped`. A stopped task can still be resumed with [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage).",
                "operationId": "openapi.v2.OpenapiV2Service.StopTask",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "task_id": {
                                        "type": "string",
                                        "description": "The unique identifier of the running task to stop. Supports the shortcut `agent-default-main_task` for the IM agent's main task."
                                    }
                                },
                                "required": [
                                    "task_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Task stopped successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/task.delete": {
            "post": {
                "summary": "DeleteTask",
                "description": "Deletes a task permanently. If the task is still running, use [task.stop](https://open.manus.ai/docs/v2/task.stop) first.",
                "operationId": "openapi.v2.OpenapiV2Service.DeleteTask",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "task_id": {
                                        "type": "string",
                                        "description": "The unique identifier of the task to delete. Agent-related tasks cannot be deleted."
                                    }
                                },
                                "required": [
                                    "task_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Task deleted successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "id": {
                                            "type": "string",
                                            "description": "The ID of the deleted task."
                                        },
                                        "deleted": {
                                            "type": "boolean",
                                            "description": "Always true when the deletion was successful."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/task.update": {
            "post": {
                "summary": "UpdateTask",
                "description": "Updates a task's metadata (title, sharing, visibility). Use [task.detail](https://open.manus.ai/docs/v2/task.detail) to see the current values before updating.",
                "operationId": "openapi.v2.OpenapiV2Service.UpdateTask",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "task_id": {
                                        "type": "string",
                                        "description": "The unique identifier of the task to update. Supports the shortcut `agent-default-main_task` for the IM agent's main task."
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "New title for the task. Replaces the auto-generated title."
                                    },
                                    "share_visibility": {
                                        "type": "string",
                                        "enum": [
                                            "private",
                                            "team",
                                            "public"
                                        ],
                                        "description": "Controls who can view the task. \"private\" — only the task creator can view. \"team\" — all team members can view. \"public\" — anyone with the share_url can view."
                                    },
                                    "enable_visible_in_task_list": {
                                        "type": "boolean",
                                        "description": "When true, the task appears in the Manus webapp task list. When false, hides the task from the list (still accessible via direct URL)."
                                    }
                                },
                                "required": [
                                    "task_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Task updated successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "task_id": {
                                            "type": "string",
                                            "description": "The ID of the updated task."
                                        },
                                        "task_title": {
                                            "type": "string",
                                            "description": "The current title of the task."
                                        },
                                        "task_url": {
                                            "type": "string",
                                            "description": "URL to view the task in the Manus webapp."
                                        },
                                        "share_url": {
                                            "type": "string",
                                            "description": "Public share URL. Only present when share_visibility is not \"private\"."
                                        },
                                        "share_visibility": {
                                            "type": "string",
                                            "enum": [
                                                "private",
                                                "team",
                                                "public"
                                            ],
                                            "description": "The actual visibility state of the task."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/task.sendMessage": {
            "post": {
                "summary": "SendMessage",
                "description": "Sends a follow-up message to a task for multi-turn conversation. Use this after [task.create](https://open.manus.ai/docs/v2/task.create) to continue talking, or to answer `messageAskUser` / `cascadeAskUser` questions with ordinary message.content. For supported action confirmations, review confirm_input_schema and the target tool event, then use [task.confirmAction](https://open.manus.ai/docs/v2/task.confirmAction). Do not automatically confirm unrecognized waiting types.",
                "operationId": "openapi.v2.OpenapiV2Service.SendMessage",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "task_id": {
                                        "type": "string",
                                        "description": "The unique identifier of the task to send the message to. Supports the shortcut `agent-default-main_task` for the IM agent's main task."
                                    },
                                    "message": {
                                        "$ref": "#/components/schemas/Message",
                                        "description": "The follow-up message. Supports the same content formats as task.create (plain text or multi-part with files). A non-empty `message.connectors` replaces the task's connector selection; omitting it or passing an empty array keeps the task's current selection. To clear the selection, use the top-level `clear_connectors` field."
                                    },
                                    "agent_profile": {
                                        "type": "string",
                                        "anyOf": [
                                            {
                                                "enum": [
                                                    "standard",
                                                    "lite",
                                                    "max",
                                                    "max-medium",
                                                    "max-high",
                                                    "max-extra",
                                                    "max-ultra"
                                                ]
                                            },
                                            {
                                                "pattern": "^(?:(?:manus-)?[0-9]+(?:\\.[0-9]+)+(?:-(?:standard|lite|max(?:-(?:medium|high|extra|ultra))?))?)?$"
                                            }
                                        ],
                                        "description": "Agent profile override for this turn and subsequent turns. Use the stable values `standard`, `lite`, or `max`, or a Max thinking level: `max-medium`, `max-high`, `max-extra`, or `max-ultra`. The thinking level also applies to subsequent turns; plain `max` keeps the level the task already uses; a task that has never selected a level uses the default, currently equivalent to `max-extra`. Versioned aliases such as `1.6-lite`, `2.0-max`, `2.0-max-ultra`, and the legacy `manus-1.6-lite` form are also accepted; the version segment is ignored because model versions are not selected independently. A version without a suffix, such as `1.6` or `manus-1.6`, means `standard`. Omit the field (or pass an empty string) to keep the task's current profile and thinking level; unlike [task.create](https://open.manus.ai/docs/v2/task.create), this endpoint does not default to `standard`. Free personal accounts are downgraded to `lite` when an override is provided."
                                    },
                                    "structured_output_schema": {
                                        "type": "object",
                                        "description": "JSON Schema for structured output extraction, armed for the next time this task finishes (`stop_reason: finish`).\n\n- A new schema replaces any previous one.\n- Omitted — the current schema state is unchanged; an armed schema is not cleared.\n\nSee the [Structured Output](https://open.manus.ai/docs/v2/structured-output) guide."
                                    },
                                    "clear_connectors": {
                                        "type": "boolean",
                                        "description": "Clears the task's connector selection for this and subsequent turns. Cannot be combined with a non-empty `message.connectors`. Other task features may still provide tools. See the [Connectors](https://open.manus.ai/docs/v2/connectors) guide.",
                                        "default": false
                                    }
                                },
                                "required": [
                                    "task_id",
                                    "message"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Message sent successfully. The task will resume processing.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "task_id": {
                                            "type": "string",
                                            "description": "The ID of the task the message was sent to."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/task.listMessages": {
            "get": {
                "summary": "ListMessages",
                "description": "Lists event messages for a task with cursor-based pagination. Use this to poll for progress after [task.create](https://open.manus.ai/docs/v2/task.create) or [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage). See the [Task Lifecycle](https://open.manus.ai/docs/v2/task-lifecycle) guide for how to handle each status.",
                "operationId": "openapi.v2.OpenapiV2Service.ListMessages",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "label": "cURL",
                        "source": "curl --request GET \\\n  --url 'https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10' \\\n  --header 'x-manus-api-key: <api-key>'"
                    },
                    {
                        "lang": "python",
                        "label": "Python",
                        "source": "import requests\n\nurl = \"https://api.manus.ai/v2/task.listMessages\"\n\nheaders = {\n    \"x-manus-api-key\": \"<api-key>\"\n}\n\nresponse = requests.get(url, headers=headers, params={\n    \"task_id\": \"<string>\",\n    \"order\": \"desc\",\n    \"limit\": \"10\"\n})\n\nprint(response.text)"
                    },
                    {
                        "lang": "javascript",
                        "label": "JavaScript",
                        "source": "const options = {\n  method: 'GET',\n  headers: {'x-manus-api-key': '<api-key>'}\n};\n\nfetch('https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10', options)\n  .then(res => res.json())\n  .then(res => console.log(res))\n  .catch(err => console.error(err));"
                    },
                    {
                        "lang": "php",
                        "label": "PHP",
                        "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"x-manus-api-key: <api-key>\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
                    },
                    {
                        "lang": "go",
                        "label": "Go",
                        "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"x-manus-api-key\", \"<api-key>\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
                    },
                    {
                        "lang": "java",
                        "label": "Java",
                        "source": "HttpResponse<String> response = Unirest.get(\"https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10\")\n  .header(\"x-manus-api-key\", \"<api-key>\")\n  .asString();"
                    },
                    {
                        "lang": "ruby",
                        "label": "Ruby",
                        "source": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.manus.ai/v2/task.listMessages?task_id=<string>&order=desc&limit=10\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"x-manus-api-key\"] = '<api-key>'\n\nresponse = http.request(request)\nputs response.read_body"
                    }
                ],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "task_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The unique identifier of the task to list messages for. Supports the shortcut `agent-default-main_task` for the IM agent's main task."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "description": "Number of messages to return per page. Default: 50, Range: 1-200."
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Pagination cursor from the previous response's next_cursor field. Omit for the first page."
                        }
                    },
                    {
                        "name": "start_event_id",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Start at this event, inclusive. Use a value from `messages[].id`. Cannot be combined with `cursor`. The response may still include `next_cursor` for following pages. If the ID appears only in `verbose=true` responses, use `verbose=true` or the event is not found."
                        }
                    },
                    {
                        "name": "order",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "asc",
                                "desc"
                            ],
                            "description": "Sort direction by timestamp.\n\n- `desc` (default) — newest first.\n- `asc` — oldest first."
                        }
                    },
                    {
                        "name": "verbose",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "description": "Include detailed events.\n\n- `false` (default) — `user_message`, `assistant_message`, `error_message`, `status_update`, and `user_stop` only.\n- `true` — also `tool_used` (tools the agent invoked), `plan_update` (plan snapshots), `new_plan_step` (step additions), and `explanation` (agent reasoning)."
                        }
                    },
                    {
                        "name": "slides_format",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "html",
                                "pptx"
                            ],
                            "description": "Format of slides attachments in the response.\n\n- `html` (default) — raw HTML slides.\n- `pptx` — slides converted to PowerPoint."
                        }
                    },
                    {
                        "name": "markdown_format",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "markdown",
                                "pdf",
                                "docx"
                            ],
                            "description": "Format of Markdown attachments in `assistant_message.attachments`. An attachment is treated as Markdown when its filename ends in `.md` or `.markdown`, or its `content_type` contains `markdown`.\n\n- `markdown` (default) — the original Markdown file.\n- `pdf` — Markdown converted to PDF.\n- `docx` — Markdown converted to Word.\n\nOnly `url` changes: `filename`, `content_type`, `file_uid`, and `version_uid` still describe the source Markdown file. If conversion fails, `url` remains the original Markdown download.\n\nConversion runs before the response is returned, so response time grows with the number and size of Markdown attachments on the page. Pair it with `start_event_id` and `limit=1` to convert only the message you need; do not use it for routine polling or full-page reads."
                        }
                    },
                    {
                        "name": "include_cover",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "description": "Include cover images for `assistant_message.attachments`.\n\n- `false` (default) — attachments carry no cover fields.\n- `true` — each attachment carries `cover_image_status`, and `cover_image` when the cover is ready. Both are omitted when the cover lookup fails for a response.\n\nCovers exist for Manus Slides (first slide), PDF (first page), and spreadsheets `xls`, `xlsx`, `csv`, `ods` (first sheet). They are generated when the file is produced, so most are `ready` on the first request. A `pending` PDF or spreadsheet starts generating on this request; call again with `include_cover=true` after 10 to 15 seconds. Images and all other types normally report `unsupported`; always follow `cover_image_status` rather than the file type. Send this parameter only when rendering covers; routine polling does not need it. See [Cover images](https://open.manus.ai/docs/v2/attachments#cover-images)."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Messages retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "task_id": {
                                            "type": "string",
                                            "description": "The task ID these messages belong to."
                                        },
                                        "messages": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/TaskEvent"
                                            },
                                            "description": "Array of task event objects representing the conversation and agent activity."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "Whether there are more messages beyond this page."
                                        },
                                        "next_cursor": {
                                            "type": "string",
                                            "description": "Cursor for fetching the next page. Only present when has_more is true."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/task.confirmAction": {
            "post": {
                "summary": "ConfirmAction",
                "description": "Confirms a supported pending action when [task.listMessages](https://open.manus.ai/docs/v2/task.listMessages) shows agent_status: waiting. Build input according to confirm_input_schema and review the event identified by waiting_for_event_id for tool params and result. For messageAskUser / cascadeAskUser questions, use [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage) instead. See the [Task Lifecycle](https://open.manus.ai/docs/v2/task-lifecycle#using-task-confirmaction) guide; do not automatically confirm unrecognized waiting types.",
                "operationId": "openapi.v2.OpenapiV2Service.ConfirmAction",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "task_id": {
                                        "type": "string",
                                        "description": "The unique identifier of the task with a pending action. Supports the shortcut `agent-default-main_task` for the IM agent's main task."
                                    },
                                    "event_id": {
                                        "type": "string",
                                        "description": "The waiting_for_event_id value from the status_update event that triggered the confirmation request. This identifies which specific action to confirm."
                                    },
                                    "input": {
                                        "type": "object",
                                        "description": "Optional input data for the pending action. Build it according to status_update.confirm_input_schema. For simple confirmations, input can be omitted."
                                    }
                                },
                                "required": [
                                    "task_id",
                                    "event_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Confirmation request processed. Check confirmed to determine whether a confirmation event was submitted.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "task_id": {
                                            "type": "string",
                                            "description": "The ID of the task that was confirmed."
                                        },
                                        "confirmed": {
                                            "type": "boolean",
                                            "description": "True when a confirmation event was submitted. False when the input was valid but the pending action did not consume it; the task remains waiting. True does not mean the external operation completed successfully."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/project.create": {
            "post": {
                "summary": "CreateProject",
                "description": "Creates a new project. Projects let you group related tasks and apply shared instructions. Pass the returned ID as `project_id` in [task.create](https://open.manus.ai/docs/v2/task.create) to create tasks within this project.",
                "operationId": "openapi.v2.OpenapiV2Service.CreateProject",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Display name for the project."
                                    },
                                    "instruction": {
                                        "type": "string",
                                        "description": "Default instruction that will be automatically prepended to all tasks created within this project. Use this to enforce consistent behavior across related tasks (e.g., \"Always respond in formal English\" or \"Focus on financial analysis\")."
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Project created successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "project": {
                                            "$ref": "#/components/schemas/Project",
                                            "description": "The created project object."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_project` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/project.list": {
            "get": {
                "summary": "ListProjects",
                "description": "Lists all projects. Use the returned IDs as `project_id` in [task.create](https://open.manus.ai/docs/v2/task.create) or [task.list](https://open.manus.ai/docs/v2/task.list).",
                "operationId": "openapi.v2.OpenapiV2Service.ListProjects",
                "responses": {
                    "200": {
                        "description": "Projects retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Project"
                                            },
                                            "description": "Array of project objects."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_project` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/project.detail": {
            "get": {
                "summary": "GetProject",
                "description": "Retrieves a project's full configuration: name, instruction, default connectors, and default skills. [project.list](https://open.manus.ai/docs/v2/project.list) returns only each project's ID, name, and creation time; call this endpoint before [project.update](https://open.manus.ai/docs/v2/project.update) to read the current values.",
                "operationId": "openapi.v2.OpenapiV2Service.GetProject",
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`; `create_project` alone is not sufficient. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "project_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The unique identifier of the project to retrieve. Use [project.list](https://open.manus.ai/docs/v2/project.list) to get project IDs."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Project retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "project": {
                                            "$ref": "#/components/schemas/Project",
                                            "description": "The project with its full configuration."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/project.update": {
            "post": {
                "summary": "UpdateProject",
                "description": "Updates a project's name, instruction, default connectors, or default skills. Omitted fields are unchanged; a request with no updatable field returns `400 invalid_argument`. `connector_ids` and `skill_ids` replace the entire list. Returns the full updated configuration in the same shape as [project.detail](https://open.manus.ai/docs/v2/project.detail).",
                "operationId": "openapi.v2.OpenapiV2Service.UpdateProject",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "project_id": {
                                        "type": "string",
                                        "description": "The unique identifier of the project to update. Use [project.list](https://open.manus.ai/docs/v2/project.list) to get project IDs."
                                    },
                                    "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 255,
                                        "description": "New display name, 1–255 characters. Cannot be empty or whitespace only."
                                    },
                                    "instruction": {
                                        "type": "string",
                                        "description": "New default instruction applied to tasks in this project, up to 65,535 UTF-8 bytes. Pass an empty string to clear it."
                                    },
                                    "connector_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "maxItems": 500,
                                        "description": "Replaces the project's default connectors with this list. Pass `[]` to remove all default connectors; omit the field to keep them unchanged. Accepts up to 500 connector IDs from [connector.list](https://open.manus.ai/docs/v2/connector.list); duplicates are ignored. Each connector must be installed and authorized in the user's account. A Standard OAuth client can set only connectors the user granted to the app, and the My Browser connector also requires the `use_my_browsers` scope."
                                    },
                                    "skill_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "maxItems": 50,
                                        "description": "Replaces the project's default skills with this list. Pass `[]` to remove all default skills; omit the field to keep them unchanged. Accepts up to 50 skill IDs from [skill.list](https://open.manus.ai/docs/v2/skill.list); duplicates are ignored. Each skill must be an official skill, a Skill Hub skill, a skill of the user's team, or a skill of this project; other skills, including personal and Open App skills, return `404 not_found`. Project members' individual skill preferences are kept."
                                    }
                                },
                                "required": [
                                    "project_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Project updated successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "project": {
                                            "$ref": "#/components/schemas/Project",
                                            "description": "The updated project with its full configuration."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`; `create_project` alone is not sufficient. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/skill.list": {
            "get": {
                "summary": "ListSkills",
                "description": "Lists installed skills available for task selection.",
                "operationId": "openapi.v2.OpenapiV2Service.ListSkills",
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth access token. Standard OAuth clients require `create_task` or `manage_all_tasks`. Trusted clients bypass endpoint scope restrictions. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "project_id",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Only API Keys and trusted OAuth clients can pass `project_id`; when provided, the response also includes project skills. Standard OAuth clients that pass this parameter receive InvalidArgument (HTTP 400). Use [project.list](https://open.manus.ai/docs/v2/project.list) to get available project IDs."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Skills retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Skill"
                                            },
                                            "description": "Array of installed skill objects, regardless of enabled state. Listing a skill does not enable it. Use the id field in enable_skills or force_skills in task.create or task.sendMessage to select skills."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/skill.detail": {
            "get": {
                "summary": "GetSkill",
                "description": "Retrieves one skill's details and a temporary download URL for its current archive.",
                "operationId": "openapi.v2.OpenapiV2Service.GetSkill",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "label": "cURL",
                        "source": "curl --request GET \\\n  --url 'https://api.manus.ai/v2/skill.detail?skill_id=<string>' \\\n  --header 'x-manus-api-key: <api-key>'"
                    }
                ],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth access token. Standard OAuth clients require `create_task` or `manage_all_tasks`. Trusted clients bypass endpoint scope restrictions. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "skill_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Use [skill.list](https://open.manus.ai/docs/v2/skill.list) to get skill IDs."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Skill retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "skill": {
                                            "$ref": "#/components/schemas/Skill"
                                        },
                                        "download_info": {
                                            "type": "object",
                                            "description": "Download link for the skill's current archive.",
                                            "properties": {
                                                "download_url": {
                                                    "type": "string",
                                                    "format": "uri",
                                                    "description": "Presigned GET URL for the current version's `.skill` archive (zip). Use it as returned, without Manus credentials. Valid for 24 hours; call `skill.detail` again for a fresh link."
                                                },
                                                "filename": {
                                                    "type": "string",
                                                    "example": "web-system-design.skill",
                                                    "description": "File name of the archive."
                                                },
                                                "expires_at": {
                                                    "type": "string",
                                                    "pattern": "^[0-9]+$",
                                                    "example": "1893456000",
                                                    "description": "Unix timestamp in seconds when download_url expires, serialized as a decimal string by protobuf JSON."
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "ok": true,
                                    "request_id": "<request_id>",
                                    "skill": {
                                        "id": "<skill_id>",
                                        "name": "Web System Design",
                                        "description": "Design scalable web systems.",
                                        "owner_type": "personal",
                                        "creator_info": {
                                            "user_id": "<user_id>",
                                            "name": "Alex"
                                        },
                                        "created_at": 1767225600,
                                        "updated_at": 1767225600
                                    },
                                    "download_info": {
                                        "download_url": "https://<presigned-url>",
                                        "filename": "web-system-design.skill",
                                        "expires_at": "1893456000"
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/agent.list": {
            "get": {
                "summary": "ListAgents",
                "description": "Lists all custom agents in your account. Use the returned IDs in [task.list](https://open.manus.ai/docs/v2/task.list) with `scope=agent_subtask` to view subtasks, or in [agent.detail](https://open.manus.ai/docs/v2/agent.detail) for full details. See the [Agents](https://open.manus.ai/docs/v2/agents-overview) guide.",
                "operationId": "openapi.v2.OpenapiV2Service.ListAgents",
                "responses": {
                    "200": {
                        "description": "Agents retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Agent"
                                            },
                                            "description": "Array of agent objects."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth token from a `Trusted team client` or `Trusted public client`. Other OAuth clients cannot access this endpoint. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/agent.detail": {
            "get": {
                "summary": "GetAgent",
                "description": "Retrieves an agent's details including its nickname, description, and associated task. Use [agent.update](https://open.manus.ai/docs/v2/agent.update) to modify, or [task.list](https://open.manus.ai/docs/v2/task.list) with `scope=agent_subtask` to view this agent's subtasks.",
                "operationId": "openapi.v2.OpenapiV2Service.GetAgent",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "label": "cURL",
                        "source": "curl --request GET \\\n  --url 'https://api.manus.ai/v2/agent.detail?agent_id=<string>' \\\n  --header 'x-manus-api-key: <api-key>'"
                    },
                    {
                        "lang": "python",
                        "label": "Python",
                        "source": "import requests\n\nurl = \"https://api.manus.ai/v2/agent.detail\"\n\nheaders = {\n    \"x-manus-api-key\": \"<api-key>\"\n}\n\nresponse = requests.get(url, headers=headers, params={\"agent_id\": \"<string>\"})\n\nprint(response.text)"
                    },
                    {
                        "lang": "javascript",
                        "label": "JavaScript",
                        "source": "const options = {\n  method: 'GET',\n  headers: {'x-manus-api-key': '<api-key>'}\n};\n\nfetch('https://api.manus.ai/v2/agent.detail?agent_id=<string>', options)\n  .then(res => res.json())\n  .then(res => console.log(res))\n  .catch(err => console.error(err));"
                    },
                    {
                        "lang": "php",
                        "label": "PHP",
                        "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.manus.ai/v2/agent.detail?agent_id=<string>\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"x-manus-api-key: <api-key>\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
                    },
                    {
                        "lang": "go",
                        "label": "Go",
                        "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.manus.ai/v2/agent.detail?agent_id=<string>\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"x-manus-api-key\", \"<api-key>\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
                    },
                    {
                        "lang": "java",
                        "label": "Java",
                        "source": "HttpResponse<String> response = Unirest.get(\"https://api.manus.ai/v2/agent.detail?agent_id=<string>\")\n  .header(\"x-manus-api-key\", \"<api-key>\")\n  .asString();"
                    },
                    {
                        "lang": "ruby",
                        "label": "Ruby",
                        "source": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.manus.ai/v2/agent.detail?agent_id=<string>\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"x-manus-api-key\"] = '<api-key>'\n\nresponse = http.request(request)\nputs response.read_body"
                    }
                ],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth token from a `Trusted team client` or `Trusted public client`. Other OAuth clients cannot access this endpoint. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "agent_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The unique identifier of the agent to retrieve."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Agent retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "agent": {
                                            "$ref": "#/components/schemas/Agent",
                                            "description": "The agent object with full details."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/agent.update": {
            "post": {
                "summary": "UpdateAgent",
                "description": "Updates an agent's nickname and description. Use [agent.detail](https://open.manus.ai/docs/v2/agent.detail) to view current values before updating.",
                "operationId": "openapi.v2.OpenapiV2Service.UpdateAgent",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "agent_id": {
                                        "type": "string",
                                        "description": "The unique identifier of the agent to update."
                                    },
                                    "nickname": {
                                        "type": "string",
                                        "description": "New display name for the agent."
                                    },
                                    "about": {
                                        "type": "string",
                                        "description": "New description or bio for the agent."
                                    }
                                },
                                "required": [
                                    "agent_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Agent updated successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "agent": {
                                            "$ref": "#/components/schemas/Agent",
                                            "description": "The updated agent object."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth token from a `Trusted team client` or `Trusted public client`. Other OAuth clients cannot access this endpoint. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/artifact.list": {
            "get": {
                "summary": "ListArtifacts",
                "description": "Lists generated task artifacts from the authenticated user's Manus Library, newest first. Temporary input files from file.upload are not included. See the [Artifacts](https://open.manus.ai/docs/v2/artifacts) guide.",
                "operationId": "openapi.v2.OpenapiV2Service.ListArtifacts",
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or Authorization, not both."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token. Requires create_task or manage_all_tasks unless the client is trusted. Restricted create_task clients are always filtered to their own app, even without explicit source filters; older artifacts without indexed source metadata may be omitted. Provide either this or x-manus-api-key, not both."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 20
                        },
                        "description": "Maximum artifacts per page. Default 20, maximum 100. A page can be short or empty while `has_more` is true."
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Opaque `next_cursor` from the previous page. Omit for the first page.\n\n- Keep the user, credential scope, filters, and `limit` unchanged.\n- Continue until `has_more` is false.\n- Cursors expire after 5 minutes idle or 15 minutes total; an expired cursor returns `400 invalid_argument`. Restart without a cursor.\n\nSee [Pagination and ordering](https://open.manus.ai/docs/v2/artifacts#pagination-and-ordering)."
                    },
                    {
                        "name": "name",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Search the artifact display name. Results stay ordered by creation time."
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "all",
                                "website",
                                "mobile_app",
                                "game",
                                "documents",
                                "slides",
                                "spreadsheets",
                                "images",
                                "videos",
                                "audio",
                                "others"
                            ],
                            "default": "all",
                            "example": "spreadsheets"
                        },
                        "description": "Filter by Library category. Default `all`. The ten specific categories are mutually exclusive. See [Artifact categories](https://open.manus.ai/docs/v2/artifacts#artifact-categories)."
                    },
                    {
                        "name": "favorite",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "When `true`, return only favorited artifacts. Omitted or `false` applies no favorite filter."
                    },
                    {
                        "name": "oauth_client_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Return only artifacts from tasks created by this Open App. Mutually exclusive with `api_key_id`; passing both returns `400 invalid_argument`.\n\n- **API Key or Trusted client:** any client ID.\n- **Standard OAuth client:** any client ID with `manage_all_tasks`; always filtered to its own app with `create_task`, and another ID returns `403 permission_denied`.\n\nOlder artifacts without indexed source metadata may be omitted. See [Filters](https://open.manus.ai/docs/v2/artifacts#filters)."
                    },
                    {
                        "name": "api_key_id",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Return only artifacts from tasks created by this API key. Mutually exclusive with `oauth_client_id`; passing both returns `400 invalid_argument`.\n\n- **API Key or Trusted client:** any key ID.\n- **Standard OAuth client:** any key ID with `manage_all_tasks`; not available with `create_task` only, which returns `403 permission_denied`.\n\nOlder artifacts without indexed source metadata may be omitted. See [Filters](https://open.manus.ai/docs/v2/artifacts#filters)."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Artifacts retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Artifact"
                                            },
                                            "description": "Array of generated artifacts matching the filters."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "Whether more artifacts are available."
                                        },
                                        "next_cursor": {
                                            "type": "string",
                                            "description": "Cursor for the next page. Present only when has_more is true."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "A search, metadata, or pagination-state dependency is unavailable. Retry the same request and cursor.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "5XX": {
                        "description": "Server error.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/file.upload": {
            "post": {
                "summary": "UploadFile",
                "description": "Creates a file record and returns a presigned upload URL. Upload the file content to the returned `upload_url` via PUT before it expires. Use [file.detail](https://open.manus.ai/docs/v2/file.detail) to check upload status or download the file. Then use the `file.id` as `file_id` in [task.create](https://open.manus.ai/docs/v2/task.create) or [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage) message content. See [Limits](https://open.manus.ai/docs/v2/file.upload#limits).",
                "operationId": "openapi.v2.OpenapiV2Service.UploadFile",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "filename": {
                                        "type": "string",
                                        "description": "Name of the file to upload, including extension (e.g., \"report.pdf\", \"data.csv\"). The extension helps determine the file type."
                                    }
                                },
                                "required": [
                                    "filename"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "File record created successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "file": {
                                            "$ref": "#/components/schemas/File",
                                            "description": "The created file record. Status will be pending until the upload completes."
                                        },
                                        "upload_url": {
                                            "type": "string",
                                            "description": "Presigned S3 URL for uploading the file content. Send a PUT request with the file bytes as the body. Expires in 3 minutes."
                                        },
                                        "upload_expires_at": {
                                            "type": "string",
                                            "description": "Unix timestamp in seconds when upload_url expires, encoded as a decimal string. Complete the upload before this time.",
                                            "pattern": "^[0-9]+$",
                                            "example": "1893456180"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/file.detail": {
            "get": {
                "summary": "GetFile",
                "description": "Retrieves a file's details including upload status, size, and expiration time. For an uploaded, unexpired file, also returns a temporary GET download URL and its expiration time at the top level of the response. Use this to download an uploaded attachment for validation before creating a task. Check that `file.status` is `uploaded` before using the file in [task.create](https://open.manus.ai/docs/v2/task.create). Files expire 48 hours after upload.",
                "operationId": "openapi.v2.OpenapiV2Service.GetFile",
                "x-codeSamples": [
                    {
                        "lang": "bash",
                        "label": "cURL",
                        "source": "curl --request GET \\\n  --url 'https://api.manus.ai/v2/file.detail?file_id=<string>' \\\n  --header 'x-manus-api-key: <api-key>'"
                    },
                    {
                        "lang": "python",
                        "label": "Python",
                        "source": "import requests\n\nurl = \"https://api.manus.ai/v2/file.detail\"\n\nheaders = {\n    \"x-manus-api-key\": \"<api-key>\"\n}\n\nresponse = requests.get(url, headers=headers, params={\"file_id\": \"<string>\"})\n\nprint(response.text)"
                    },
                    {
                        "lang": "javascript",
                        "label": "JavaScript",
                        "source": "const options = {\n  method: 'GET',\n  headers: {'x-manus-api-key': '<api-key>'}\n};\n\nfetch('https://api.manus.ai/v2/file.detail?file_id=<string>', options)\n  .then(res => res.json())\n  .then(res => console.log(res))\n  .catch(err => console.error(err));"
                    },
                    {
                        "lang": "php",
                        "label": "PHP",
                        "source": "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.manus.ai/v2/file.detail?file_id=<string>\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"x-manus-api-key: <api-key>\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
                    },
                    {
                        "lang": "go",
                        "label": "Go",
                        "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.manus.ai/v2/file.detail?file_id=<string>\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"x-manus-api-key\", \"<api-key>\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}"
                    },
                    {
                        "lang": "java",
                        "label": "Java",
                        "source": "HttpResponse<String> response = Unirest.get(\"https://api.manus.ai/v2/file.detail?file_id=<string>\")\n  .header(\"x-manus-api-key\", \"<api-key>\")\n  .asString();"
                    },
                    {
                        "lang": "ruby",
                        "label": "Ruby",
                        "source": "require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://api.manus.ai/v2/file.detail?file_id=<string>\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"x-manus-api-key\"] = '<api-key>'\n\nresponse = http.request(request)\nputs response.read_body"
                    }
                ],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "file_id",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "The unique identifier of the file to retrieve."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "File retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "file": {
                                            "$ref": "#/components/schemas/FileDetail",
                                            "description": "The file object with full details."
                                        },
                                        "download_url": {
                                            "type": "string",
                                            "format": "uri",
                                            "description": "Presigned GET URL for the uploaded file. Returned with `download_expires_at` only when `file.status` is `uploaded` and the file has not expired. Use it as returned, without Manus credentials. Valid for at most 3 minutes, shortened to the file's remaining lifetime; call `file.detail` again for a fresh link."
                                        },
                                        "download_expires_at": {
                                            "type": "string",
                                            "pattern": "^[0-9]+$",
                                            "example": "1893456180",
                                            "description": "Unix timestamp in seconds when download_url expires, serialized as a decimal string by protobuf JSON. Returned only with download_url. This is the download link's expiration, distinct from file.expires_at, which describes the file's lifetime."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "5XX": {
                        "description": "Server error.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/file.delete": {
            "post": {
                "summary": "DeleteFile",
                "description": "Deletes a file. Files are automatically deleted 48 hours after upload, so manual deletion is only needed for early cleanup.",
                "operationId": "openapi.v2.OpenapiV2Service.DeleteFile",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file_id": {
                                        "type": "string",
                                        "description": "The unique identifier of the file to delete."
                                    }
                                },
                                "required": [
                                    "file_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "File deleted successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/webhook.create": {
            "post": {
                "summary": "CreateWebhook",
                "description": "Creates a webhook for receiving task event notifications. Use [webhook.publicKey](https://open.manus.ai/docs/v2/webhook.publicKey) to get the key for verifying signatures. See the [Webhooks](https://open.manus.ai/docs/v2/webhooks-overview) guide for event types.",
                "operationId": "openapi.v2.OpenapiV2Service.CreateWebhook",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "description": "The HTTPS endpoint URL that will receive POST webhook notifications. Must be publicly accessible and return a 2xx status code."
                                    }
                                },
                                "required": [
                                    "url"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Webhook created successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "webhook": {
                                            "$ref": "#/components/schemas/Webhook",
                                            "description": "The created webhook object."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth token from a `Trusted team client` or `Trusted public client`. Other OAuth clients cannot access this endpoint. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/webhook.list": {
            "get": {
                "summary": "ListWebhooks",
                "description": "Lists all webhooks in your account. Use the returned IDs with [webhook.delete](https://open.manus.ai/docs/v2/webhook.delete) to remove a webhook.",
                "operationId": "openapi.v2.OpenapiV2Service.ListWebhooks",
                "responses": {
                    "200": {
                        "description": "Webhooks retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Webhook"
                                            },
                                            "description": "Array of webhook objects."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth token from a `Trusted team client` or `Trusted public client`. Other OAuth clients cannot access this endpoint. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/webhook.delete": {
            "post": {
                "summary": "DeleteWebhook",
                "description": "Deletes a webhook. The endpoint will stop receiving notifications immediately. Use [webhook.list](https://open.manus.ai/docs/v2/webhook.list) to find the webhook ID.",
                "operationId": "openapi.v2.OpenapiV2Service.DeleteWebhook",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "webhook_id": {
                                        "type": "string",
                                        "description": "The unique identifier of the webhook to delete."
                                    }
                                },
                                "required": [
                                    "webhook_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Webhook deleted successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth token from a `Trusted team client` or `Trusted public client`. Other OAuth clients cannot access this endpoint. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/browser.onlineList": {
            "get": {
                "summary": "ListOnlineBrowserClients",
                "description": "Lists the user's online browser clients. Use the returned `client_id` with [task.confirmAction](https://open.manus.ai/docs/v2/task.confirmAction) when the agent triggers a `needConnectMyBrowser` waiting event. See the [Task Lifecycle](https://open.manus.ai/docs/v2/task-lifecycle#using-my-browser) guide.",
                "operationId": "openapi.v2.OpenapiV2Service.ListOnlineBrowserClients",
                "responses": {
                    "200": {
                        "description": "Online browser clients retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/BrowserClient"
                                            },
                                            "description": "Array of online browser client objects."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `use_my_browsers` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/webhook.publicKey": {
            "get": {
                "summary": "GetWebhookPublicKey",
                "description": "Gets the public key for verifying webhook signatures. See the [Webhook Security](https://open.manus.ai/docs/v2/webhooks-security) guide for verification examples.",
                "operationId": "openapi.v2.OpenapiV2Service.GetWebhookPublicKey",
                "responses": {
                    "200": {
                        "description": "Public key retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "public_key": {
                                            "type": "string",
                                            "description": "PEM-encoded RSA public key for verifying webhook signatures."
                                        },
                                        "algorithm": {
                                            "type": "string",
                                            "description": "Signature algorithm. Always \"RSA-SHA256\".",
                                            "example": "RSA-SHA256"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. No OAuth scope is required. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/usage.list": {
            "get": {
                "summary": "ListUsage",
                "description": "Lists the current user's credit change history at session granularity, sorted by change time (newest first).",
                "operationId": "openapi.v2.OpenapiV2Service.ListUsage",
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth token from a `Trusted team client` or `Trusted public client`. Other OAuth clients cannot access this endpoint. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "description": "Number of records to return per page. Default: 20, Max: 100."
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Pagination cursor from the previous response's next_cursor field. Omit for the first page."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Usage records retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/UsageRecord"
                                            },
                                            "description": "Array of credit consumption records, one per task."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "Whether there are more records beyond this page. If true, use next_cursor to fetch the next page."
                                        },
                                        "next_cursor": {
                                            "type": "string",
                                            "description": "Cursor to pass as the cursor parameter for the next page. Only present when has_more is true."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/usage.teamStatistic": {
            "get": {
                "summary": "GetTeamUsageStatistic",
                "description": "Returns daily credit consumption totals for the team over a date range. Owners and admins see the whole team; members see only their own consumption.",
                "operationId": "openapi.v2.OpenapiV2Service.GetTeamUsageStatistic",
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth token from a `Trusted team client` or `Trusted public client`. Other OAuth clients cannot access this endpoint. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "start_date",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "description": "Filter start time as a Unix timestamp in seconds."
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "description": "Filter end time as a Unix timestamp in seconds."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Daily usage statistics retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/DailyStatistic"
                                            },
                                            "description": "Array of daily statistics sorted by date in ascending order."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/usage.teamLog": {
            "get": {
                "summary": "ListTeamUsageLog",
                "description": "Lists team members' task counts and total credit consumption over the requested range, one row per user. Owners and admins see every member; members see only their own row. Enterprise teams have T+1 latency: today's data is visible the next day. Other teams aggregate in real time.",
                "operationId": "openapi.v2.OpenapiV2Service.ListTeamUsageLog",
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth token from a `Trusted team client` or `Trusted public client`. Other OAuth clients cannot access this endpoint. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "description": "Number of records to return per page. Default: 20, Max: 100."
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Pagination cursor from the previous response's next_cursor field. Omit for the first page."
                        }
                    },
                    {
                        "name": "start_date",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "description": "Filter start time as a Unix timestamp in seconds."
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "description": "Filter end time as a Unix timestamp in seconds."
                        }
                    },
                    {
                        "name": "sort_by",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "description": "Field to sort by. Default: `task_count`.",
                            "enum": [
                                "task_count",
                                "credits"
                            ]
                        }
                    },
                    {
                        "name": "is_asc",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "description": "Sort in ascending order. Default: false (descending)."
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Team usage log retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/TeamUsageLog"
                                            },
                                            "description": "Array of per-user daily consumption records."
                                        },
                                        "has_more": {
                                            "type": "boolean",
                                            "description": "Whether there are more records beyond this page. If true, use next_cursor to fetch the next page."
                                        },
                                        "next_cursor": {
                                            "type": "string",
                                            "description": "Cursor to pass as the cursor parameter for the next page. Only present when has_more is true."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/usage.availableCredits": {
            "get": {
                "summary": "GetAvailableCredits",
                "description": "Returns the credit balance, subscription period, and refresh information for the authenticated caller. For a team sub-account, the team's shared pool balance is returned; for a personal account, the personal balance is returned. Standard OAuth clients cannot access this endpoint; trusted clients can.",
                "operationId": "openapi.v2.OpenapiV2Service.GetAvailableCredits",
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth token from a `Trusted team client` or `Trusted public client`. Other OAuth clients cannot access this endpoint. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Available credits retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "$ref": "#/components/schemas/AvailableCredits"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/connector.list": {
            "get": {
                "summary": "ListConnectors",
                "description": "Lists connectors installed in the current user's account. Use the returned IDs in the `connectors` array of [task.create](https://open.manus.ai/docs/v2/task.create) or [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage). See the [Connectors](https://open.manus.ai/docs/v2/connectors) guide for setup.",
                "operationId": "openapi.v2.OpenapiV2Service.ListConnectors",
                "responses": {
                    "200": {
                        "description": "Connectors retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ConnectorInfo"
                                            },
                                            "description": "Array of connectors installed in the user's account."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. An OAuth client requires the `create_task` or `manage_all_tasks` scope unless it is a `Trusted team client` or `Trusted public client`. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/website.status": {
            "get": {
                "summary": "GetWebsiteStatus",
                "description": "Retrieves a website's current title, publish status, live URL, screenshot, and visibility. Use [website.listCheckpoints](https://open.manus.ai/docs/v2/website.listCheckpoints) to browse version history, or [website.publish](https://open.manus.ai/docs/v2/website.publish) to deploy changes. See the [Website](https://open.manus.ai/docs/v2/website) guide. When called with `task_id`, also returns the sandbox `preview_url` and `sandbox_status`.",
                "operationId": "openapi.v2.OpenapiV2Service.GetWebsiteStatus",
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. No OAuth scope is required. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "task_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Session UID. Mutually exclusive with `website_id` — exactly one must be provided. The session must contain exactly one website."
                    },
                    {
                        "name": "website_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Unique website ID. Mutually exclusive with `task_id` — exactly one must be provided. Obtain from the response of `website.status` or `website.publish`."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Web status retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "website_id": {
                                            "type": "string",
                                            "description": "Unique website ID."
                                        },
                                        "title": {
                                            "type": "string",
                                            "description": "Current display title of the website. For historical websites without a stored title, this falls back to the internal project name. Always present."
                                        },
                                        "publish_status": {
                                            "type": "string",
                                            "enum": [
                                                "unpublished",
                                                "publishing",
                                                "published",
                                                "failed"
                                            ],
                                            "description": "Deployment state.\n\n- `unpublished` — never published or taken down. Call `website.publish` to bring it online.\n- `publishing` — deployment in progress. Poll again.\n- `published` — live; `site_urls` is reachable.\n- `failed` — the last deployment failed."
                                        },
                                        "site_urls": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "Public URLs where the live site can be reached, ordered from default to most specific: the space URL (`https://{space_id}.manus.space`, always present when published), an optional sub-domain URL (`https://{sub_domain}.manus.space`), and any active custom domains bound by the owner. All entries include the `https://` scheme. Returned as an empty array unless `publish_status` is `published`."
                                        },
                                        "version_id": {
                                            "type": "string",
                                            "description": "**Optional.** Checkpoint `version_id` currently deployed. Present only when the site has been published."
                                        },
                                        "screenshot_url": {
                                            "type": "string",
                                            "description": "**Optional.** The screenshot shown on the website card, as a signed temporary URL. Fetch the image when you need it instead of storing the address. Omitted when no screenshot is available."
                                        },
                                        "status_updated_at": {
                                            "type": "integer",
                                            "format": "int64",
                                            "description": "**Optional.** Last time the publish status changed (Unix seconds). Present only when the site has been published."
                                        },
                                        "visibility": {
                                            "type": "string",
                                            "enum": [
                                                "public",
                                                "team",
                                                "private"
                                            ],
                                            "description": "Who can access the published site.\n\n- `public` — anyone.\n- `team` — current team members only.\n- `private` — owner and invited collaborators only."
                                        },
                                        "auto_publish": {
                                            "type": "boolean",
                                            "description": "Whether newly created checkpoints are published automatically. Always present; false means disabled."
                                        },
                                        "preview_url": {
                                            "type": "string",
                                            "description": "**Optional.** Live preview URL served by the task's cloud sandbox. Present only when the request uses `task_id` and the task has an active preview binding for this website. The URL stays listed while the sandbox sleeps, but it does not respond until the sandbox is `running`. This is a temporary address independent of `site_urls`: do not store or share it."
                                        },
                                        "sandbox_status": {
                                            "type": "string",
                                            "description": "**Optional.** Current state of the task's cloud sandbox. Present only when the request uses `task_id`.\n\n- `running` — the sandbox is up. The site inside it may still be starting.\n- `paused` — asleep; `preview_url` does not respond. To bring it back, send a message with [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage); the agent runs and resumes the sandbox. This requires permission to send messages to the task and consumes credits.\n- `resuming`, `starting`, `creating`, `resetting`, `migrating` — in progress; poll again with an upper bound.\n- `pausing`, `stopping` — going to sleep; ends in `paused`.\n- `failed`, `reset_failed`, `deleted`, `deleting` — the sandbox will not recover on its own; stop polling and check the task in the Manus app.\n- `not_created` — the task has no cloud sandbox, for example a task that runs on a local device.\n- `unknown` — the state could not be read right now. Read it again later.\n\nReading this field never creates, wakes, or extends a sandbox."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/website.listCheckpoints": {
            "get": {
                "summary": "ListWebsiteCheckpoints",
                "description": "Returns the website's current title and lists all of its checkpoints, newest first. Match `published_version_id` against `data[].version_id` to identify the live checkpoint, or call [website.publish](https://open.manus.ai/docs/v2/website.publish) to deploy the latest. See the [Website](https://open.manus.ai/docs/v2/website) guide.",
                "operationId": "openapi.v2.OpenapiV2Service.ListWebsiteCheckpoints",
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. No OAuth scope is required. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    },
                    {
                        "name": "task_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Session UID. Mutually exclusive with `website_id` — exactly one must be provided. The session must contain exactly one website."
                    },
                    {
                        "name": "website_id",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Unique website ID. Mutually exclusive with `task_id` — exactly one must be provided. Obtain from the response of `website.status` or `website.publish`."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Checkpoints retrieved successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "website_id": {
                                            "type": "string",
                                            "description": "Unique website ID."
                                        },
                                        "title": {
                                            "type": "string",
                                            "description": "Current display title of the website. This is website-level metadata and does not belong to an individual checkpoint. For historical websites without a stored title, this falls back to the internal project name. Always present."
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/WebsiteCheckpoint"
                                            },
                                            "description": "Checkpoints in reverse chronological order (newest first). Empty array if the site has no checkpoints yet."
                                        },
                                        "published_version_id": {
                                            "type": "string",
                                            "description": "**Optional.** `version_id` of the checkpoint currently published. Present only when the site has been published. Match against `data[].version_id` to find the live checkpoint."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/v2/website.publish": {
            "post": {
                "summary": "PublishWebsite",
                "description": "Deploys the latest checkpoint of a website and sets its visibility. Deployment is asynchronous — poll [website.status](https://open.manus.ai/docs/v2/website.status) until `publish_status` becomes `published` or `failed`. To change metadata (title, visibility) without redeploying, use [website.update](https://open.manus.ai/docs/v2/website.update) instead. See the [Website](https://open.manus.ai/docs/v2/website) guide.",
                "operationId": "openapi.v2.OpenapiV2Service.PublishWebsite",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "task_id": {
                                        "type": "string",
                                        "description": "Session UID. Mutually exclusive with `website_id` — exactly one must be provided."
                                    },
                                    "website_id": {
                                        "type": "string",
                                        "description": "Unique website ID. Mutually exclusive with `task_id` — exactly one must be provided."
                                    },
                                    "visibility": {
                                        "type": "string",
                                        "enum": [
                                            "public",
                                            "team",
                                            "private"
                                        ],
                                        "description": "Who can access the published site. Replaces the site's current visibility.\n\n- `public` (default) — anyone. An empty string also means `public`.\n- `team` — current team members only. Requires a team account.\n- `private` — owner and invited collaborators only.\n\nSites may cap the maximum allowed visibility; requests above the cap return `403 permission_denied`."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Publish triggered successfully. The response includes the website title current when the request was accepted. Deployment is still in progress — poll `website.status` for the final state and effective visibility. This response does not echo `visibility`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        },
                                        "website_id": {
                                            "type": "string",
                                            "description": "Unique website ID."
                                        },
                                        "title": {
                                            "type": "string",
                                            "description": "Display title of the website when the publish request was accepted. For historical websites without a stored title, this falls back to the internal project name. Always present."
                                        },
                                        "version_id": {
                                            "type": "string",
                                            "description": "`version_id` of the checkpoint being deployed — always the latest checkpoint of the site."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. No OAuth scope is required. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        },
        "/v2/website.update": {
            "post": {
                "summary": "UpdateWebsite",
                "description": "Updates website configuration without deploying. Omitted fields are unchanged; a request with no updatable field returns `400 invalid_argument`. Use [website.publish](https://open.manus.ai/docs/v2/website.publish) to deploy a new version. See the [Website](https://open.manus.ai/docs/v2/website) guide.",
                "operationId": "openapi.v2.OpenapiV2Service.UpdateWebsite",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "task_id": {
                                        "type": "string",
                                        "description": "Session UID. Mutually exclusive with `website_id` — exactly one must be provided."
                                    },
                                    "website_id": {
                                        "type": "string",
                                        "description": "Unique website ID. Mutually exclusive with `task_id` — exactly one must be provided."
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "New title for the website. Omit to leave unchanged; an empty string is invalid."
                                    },
                                    "visibility": {
                                        "type": "string",
                                        "enum": [
                                            "public",
                                            "team",
                                            "private"
                                        ],
                                        "description": "New visibility. Omit to leave unchanged; an empty string is invalid.\n\n- `public` — anyone.\n- `team` — current team members only. Requires a team account.\n- `private` — owner and invited collaborators only.\n\nThe same visibility caps as `website.publish` apply."
                                    },
                                    "auto_publish": {
                                        "type": "boolean",
                                        "description": "Optional. Enable or disable automatic publishing for new checkpoints. Automatic publishing preserves the website's current visibility. Omit to leave unchanged; changing this setting does not publish existing checkpoints or cancel an in-flight deployment."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Site updated successfully.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "ok": {
                                            "type": "boolean",
                                            "example": true,
                                            "description": "Whether the request was successful."
                                        },
                                        "request_id": {
                                            "type": "string",
                                            "description": "Unique identifier for this API request."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "4XX": {
                        "description": "Error response.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [],
                "parameters": [
                    {
                        "name": "x-manus-api-key",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "API key for direct authentication. Provide either this or `Authorization`, not both. See [Authentication](https://open.manus.ai/docs/v2/authentication)."
                    },
                    {
                        "name": "Authorization",
                        "in": "header",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "example": "Bearer {access_token}"
                        },
                        "description": "OAuth2 access token in `Bearer {token}` format. No OAuth scope is required. Provide either this or `x-manus-api-key`, not both. See the [Open App](https://open.manus.ai/docs/v2/open-app) guide."
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "ApiKeyAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "x-manus-api-key"
            }
        },
        "schemas": {
            "Message": {
                "type": "object",
                "description": "A message to send to a task.",
                "properties": {
                    "content": {
                        "description": "String (plain text) or array of ContentPart objects. User text is limited to approximately 5,000 estimated tokens per request; the exact character count varies by language and content. For an array, the limit applies to the combined text of all text parts; file parts do not count. Input over the limit returns InvalidArgument (HTTP 400). Each message must contain at least one non-empty visible text part or valid visible file/voice part.",
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/ContentPart"
                                }
                            },
                            {
                                "type": "string"
                            }
                        ]
                    },
                    "connectors": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Connector IDs for this task. A non-empty list replaces the task's connector selection. An empty array is treated the same as omitting the field. When omitted:\n\n- On `task.create` with `project_id`, the task uses the project's default connectors.\n- On `task.create` without `project_id`, the task uses the connectors you enabled by default in your account. Connectors that are installed but not enabled are not loaded.\n- On `task.sendMessage`, the task keeps its current selection.\n\nTo start or continue without connectors, set the top-level `clear_connectors: true`. Use [connector.list](https://open.manus.ai/docs/v2/connector.list) to get connector IDs."
                    },
                    "enable_skills": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Skill IDs to enable for this task. Use [skill.list](https://open.manus.ai/docs/v2/skill.list) to retrieve available skill IDs. An empty list is treated the same as omitting this field.\n\n- **API Key:** The user's enabled skills are loaded by default.\n- **Standard OAuth client:** All App-owned skills are loaded by default, and user skills are not loaded. When a non-empty list is supplied, every ID must be App-owned; the request is rejected otherwise.\n- **Trusted client:** The user's enabled skills are loaded by default. The client's App skills are always added. IDs of another App's skills are rejected."
                    },
                    "force_skills": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Skill IDs the agent must invoke during this task. Forced skills are automatically available even if not listed in `enable_skills`. Standard OAuth clients can force only App-owned IDs, and Trusted clients cannot force another App's skills; the request is rejected otherwise."
                    },
                    "task_references": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9]{22}$"
                        },
                        "maxItems": 20,
                        "description": "IDs of existing tasks the agent can browse on demand.\n\n- Bare 22-character task IDs only; up to 20 per request.\n- On task.sendMessage, IDs are added to the task's existing references and cannot be cleared.\n\nSee the [Task references](https://open.manus.ai/docs/v2/task-references) guide."
                    }
                },
                "required": [
                    "content"
                ]
            },
            "ContentPart": {
                "oneOf": [
                    {
                        "type": "object",
                        "title": "Text",
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "text"
                                ],
                                "description": "Must be \"text\"."
                            },
                            "text": {
                                "type": "string",
                                "description": "The text content of the message. Across a ContentPart array, all text parts must contain no more than approximately 5,000 estimated tokens in total."
                            },
                            "visibility": {
                                "type": "string",
                                "enum": [
                                    "visible",
                                    "hidden"
                                ],
                                "default": "visible",
                                "description": "Optional. Most integrations can omit this field. A `Trusted public client` can set it to `hidden` to pass additional application context without displaying it to users. See [Hidden application context](https://open.manus.ai/docs/v2/hidden-application-context)."
                            }
                        },
                        "required": [
                            "type",
                            "text"
                        ]
                    },
                    {
                        "type": "object",
                        "title": "File",
                        "description": "**Provide the file via one of: file_id, file_url, or file_data.**",
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "file"
                                ],
                                "description": "Must be \"file\"."
                            },
                            "file_id": {
                                "type": "string",
                                "description": "ID of a file uploaded with [file.upload](https://open.manus.ai/docs/v2/file.upload). Up to 512 MB per file; see [Limits](https://open.manus.ai/docs/v2/file.upload#limits)."
                            },
                            "file_url": {
                                "type": "string",
                                "description": "Publicly accessible URL to the file. Manus downloads it directly. Up to 20 MB."
                            },
                            "file_data": {
                                "type": "string",
                                "description": "Base64 encoded file content in the form `data:<mime_type>;base64,<encoded_content>`. Up to 20 MB after decoding."
                            },
                            "filename": {
                                "type": "string",
                                "description": "Display name of the file including extension (e.g., \"report.pdf\"). Required when using file_data; recommended for file_url."
                            },
                            "mime_type": {
                                "type": "string",
                                "description": "MIME type of the file (e.g., \"application/pdf\", \"image/png\"). Optional; auto-detected from filename if omitted."
                            },
                            "visibility": {
                                "type": "string",
                                "enum": [
                                    "visible"
                                ],
                                "default": "visible",
                                "description": "Optional. Most integrations can omit this field. Only `visible` is supported for this content type."
                            }
                        },
                        "required": [
                            "type"
                        ]
                    },
                    {
                        "type": "object",
                        "title": "Voice",
                        "description": "**Provide the audio via one of: file_id, file_url, or file_data.**",
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "voice"
                                ],
                                "description": "Must be \"voice\"."
                            },
                            "file_id": {
                                "type": "string",
                                "description": "ID of an audio file uploaded with [file.upload](https://open.manus.ai/docs/v2/file.upload). Up to 512 MB per file; see [Limits](https://open.manus.ai/docs/v2/file.upload#limits)."
                            },
                            "file_url": {
                                "type": "string",
                                "description": "Publicly accessible URL to the audio file. Manus downloads and transcribes it. Up to 20 MB."
                            },
                            "file_data": {
                                "type": "string",
                                "description": "Base64 encoded audio content in the form `data:<mime_type>;base64,<encoded_content>`. Up to 20 MB after decoding."
                            },
                            "filename": {
                                "type": "string",
                                "description": "Display name of the audio file including extension (e.g., \"recording.wav\"). Required when using file_data."
                            },
                            "mime_type": {
                                "type": "string",
                                "description": "MIME type of the audio file (e.g., \"audio/wav\", \"audio/mp3\"). Optional; auto-detected from filename if omitted."
                            },
                            "visibility": {
                                "type": "string",
                                "enum": [
                                    "visible"
                                ],
                                "default": "visible",
                                "description": "Optional. Most integrations can omit this field. Only `visible` is supported for this content type."
                            }
                        },
                        "required": [
                            "type"
                        ]
                    }
                ]
            },
            "Task": {
                "type": "object",
                "description": "Represents a task with its current status and metadata.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique identifier for the task."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "running",
                            "stopped",
                            "waiting",
                            "error",
                            "deleted"
                        ],
                        "description": "Current main-agent status.\n\n- `running` — the agent is working.\n- `stopped` — the main agent stopped. Read the results; `has_running_background_jobs` tells you whether background work may wake the task again.\n- `waiting` — the agent needs user input or a confirmation.\n- `error` — the task hit an unrecoverable error.\n- `deleted` — the task was deleted. Only returned by [task.list](https://open.manus.ai/docs/v2/task.list) with `include_deleted=true`."
                    },
                    "created_at": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Unix timestamp (seconds) when the task was created."
                    },
                    "updated_at": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Unix timestamp (seconds) when the task was last updated."
                    },
                    "task_type": {
                        "type": "string",
                        "enum": [
                            "standard",
                            "project",
                            "agent_subtask"
                        ],
                        "description": "Type of the task. \"standard\" — a regular standalone task. \"project\" — a task within a project. \"agent_subtask\" — a subtask created by an agent. Use [task.list](https://open.manus.ai/docs/v2/task.list) with `scope` to filter by task type."
                    },
                    "share_visibility": {
                        "type": "string",
                        "enum": [
                            "private",
                            "team",
                            "public"
                        ],
                        "description": "Who can view the task. \"private\" — only the task creator. \"team\" — all team members. \"public\" — anyone with the share link. Empty for deleted tasks."
                    },
                    "title": {
                        "type": "string",
                        "description": "Title of the task. Empty for deleted tasks."
                    },
                    "credit_usage": {
                        "type": "integer",
                        "format": "int32",
                        "description": "Total credits consumed by the task. Only present when the task has consumed credits."
                    },
                    "task_url": {
                        "type": "string",
                        "description": "URL to view the task in the Manus webapp (e.g., https://manus.im/app/{task_id})."
                    },
                    "created_by_api_key": {
                        "type": "object",
                        "nullable": true,
                        "description": "The API key that created this task. Present when the task was created via the API; null or absent when created through the UI or other means. The name reflects the API key's current name, not a snapshot from creation time.",
                        "properties": {
                            "id": {
                                "type": "string",
                                "description": "The API key ID."
                            },
                            "name": {
                                "type": "string",
                                "description": "The current display name of the API key."
                            }
                        }
                    },
                    "agent_profile": {
                        "type": "string",
                        "enum": [
                            "manus-1.6",
                            "manus-1.6-lite",
                            "manus-1.6-max",
                            "manus-1.6-max-medium",
                            "manus-1.6-max-high",
                            "manus-1.6-max-extra",
                            "manus-1.6-max-ultra"
                        ],
                        "description": "Agent profile most recently used by the task — reflects the latest turn (e.g. a [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage) override), not just the value supplied at task creation. For backward compatibility, responses retain the legacy `manus-1.6`, `manus-1.6-lite`, or `manus-1.6-max` form even though requests should use the stable `standard`, `lite`, or `max` names. When a Max task has a thinking level selected, the level is appended, for example `manus-1.6-max-ultra`. This includes tasks whose level was chosen in the Manus web app, not only tasks created with `max-<level>`. Clients that check for Max should match the `manus-1.6-max` prefix instead of the exact value, and should tolerate new values. Omitted when this information is not available (e.g. older tasks)."
                    },
                    "has_running_background_jobs": {
                        "type": "boolean",
                        "description": "Whether background work is still running after the main agent stopped. When `true`, a background process may wake the task again later, add messages, and change the results; keep polling if you want them. Older tasks do not report this field."
                    },
                    "deleted_at": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Unix timestamp (seconds) when the task was deleted. Only present on deleted tasks returned by [task.list](https://open.manus.ai/docs/v2/task.list) with `include_deleted=true`."
                    }
                }
            },
            "TaskEvent": {
                "type": "object",
                "description": "A task event representing a message, status change, or agent activity. Only one payload field (user_message, assistant_message, etc.) will be present, determined by the type field.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique identifier for this event."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "user_message",
                            "assistant_message",
                            "error_message",
                            "status_update",
                            "tool_used",
                            "plan_update",
                            "new_plan_step",
                            "explanation",
                            "user_stop",
                            "structured_output_result"
                        ],
                        "description": "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."
                    },
                    "timestamp": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Unix timestamp in milliseconds when this event occurred."
                    },
                    "user_message": {
                        "type": "object",
                        "description": "Present when type=\"user_message\". Contains a message sent by the user.",
                        "properties": {
                            "content": {
                                "type": "string",
                                "description": "The text content of the user's message."
                            },
                            "message_type": {
                                "type": "string",
                                "enum": [
                                    "text",
                                    "voice"
                                ],
                                "description": "How the message was sent. \"text\" for typed input, \"voice\" for voice input."
                            },
                            "attachments": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/TaskAttachment"
                                },
                                "description": "Files or images the user attached to their message."
                            },
                            "hidden_content": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "description": "Most integrations can ignore this field. A `Trusted public client` receives additional application context here when `verbose=true`. See [Hidden application context](https://open.manus.ai/docs/v2/hidden-application-context)."
                            },
                            "sender": {
                                "type": "object",
                                "description": "The user who sent this message. In a shared task, use `user_id` to tell collaborators apart. Omitted for older events and for messages that Manus generates instead of a user, such as scheduled-task runs or meeting records.",
                                "properties": {
                                    "user_id": {
                                        "type": "string",
                                        "description": "Manus user ID of the sender."
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Display name of the sender. Returned only for API Key or Trusted client; other OAuth clients receive only `user_id`. Omitted when the user has no display name."
                                    },
                                    "avatar_url": {
                                        "type": "string",
                                        "description": "URL of the sender's avatar image. Returned only for API Key or Trusted client. The URL can expire; list the messages again for a fresh link. Omitted when the user has no avatar."
                                    }
                                },
                                "required": [
                                    "user_id"
                                ]
                            },
                            "source_task": {
                                "type": "object",
                                "description": "Present only when another task sent this message, for example with [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage) from inside a Manus task. Replies forwarded from this task's own side chat do not include it. Returned only for API Key or Trusted client; other OAuth clients do not receive it. `sender` is still the user on whose behalf the message was sent.",
                                "properties": {
                                    "task_id": {
                                        "type": "string",
                                        "description": "ID of the task that sent the message."
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Display name of the source at the time the message was sent: the agent's name when an agent sent it, otherwise the source task's title. Omitted when empty."
                                    },
                                    "agent_id": {
                                        "type": "string",
                                        "description": "ID of the agent that sent the message. Present only when an agent sent it."
                                    }
                                },
                                "required": [
                                    "task_id"
                                ]
                            }
                        }
                    },
                    "assistant_message": {
                        "type": "object",
                        "description": "Present when type=\"assistant_message\". Contains a response from the agent.",
                        "properties": {
                            "content": {
                                "type": "string",
                                "description": "The text content of the agent's response."
                            },
                            "attachments": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/TaskAttachment"
                                },
                                "description": "Files, images, or slides the agent generated as output."
                            },
                            "question_expectation": {
                                "type": "object",
                                "description": "Present only for agent questions with non-empty choices. Reply with task.sendMessage, not task.confirmAction. Use the enclosing message id to identify this message; nested event_id is webhook-only and is not required for replies.",
                                "properties": {
                                    "options": {
                                        "type": "array",
                                        "minItems": 1,
                                        "description": "Candidate display text, not option IDs or mandatory exact-match answers. Free-text replies are allowed. Send a non-empty answer in message.content; when there are no choices, listMessages omits question_expectation (webhooks may instead use options: []).",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "selection_mode": {
                                        "type": "string",
                                        "description": "UI selection hint: single for one candidate or multiple for several. Combine multiple selections into one readable message.content (for example, 'Please export PDF and DOCX.'); no delimiter or structured option-ID array is required. Empty or unknown upstream values normalize to single.",
                                        "enum": [
                                            "single",
                                            "multiple"
                                        ]
                                    },
                                    "response_method": {
                                        "type": "string",
                                        "description": "Fixed to send_message for ordinary questions, including when the upstream value is absent. This does not invoke task.confirmAction. If an unknown value is encountered, stop automatic dispatch and consult the current documentation; do not fall back to action confirmation.",
                                        "enum": [
                                            "send_message"
                                        ]
                                    }
                                }
                            },
                            "delivery_kind": {
                                "type": "string",
                                "example": "progress",
                                "description": "Optional display recommendation. `opening` and `progress` are primarily useful during execution and may be collapsed after the step completes. `result` is more important and should remain visible. If the value is absent or unrecognized, keep the message visible rather than hiding it."
                            }
                        }
                    },
                    "error_message": {
                        "type": "object",
                        "description": "Present when type=\"error_message\". Indicates the task encountered an error.",
                        "properties": {
                            "error_type": {
                                "type": "string",
                                "description": "Category of the error."
                            },
                            "content": {
                                "type": "string",
                                "description": "Human-readable error description."
                            }
                        }
                    },
                    "status_update": {
                        "type": "object",
                        "description": "Present when type=\"status_update\". Indicates a change in the agent's processing state.",
                        "properties": {
                            "agent_status": {
                                "type": "string",
                                "enum": [
                                    "running",
                                    "stopped",
                                    "waiting",
                                    "error"
                                ],
                                "description": "The agent's current state. waiting means it needs a question answered or an action confirmed; inspect status_detail.waiting_for_event_type to choose the response endpoint."
                            },
                            "status_detail": {
                                "type": "object",
                                "description": "Additional details when agent_status is waiting. For action confirmations, use waiting_for_event_id with task.confirmAction. Agent questions use task.sendMessage instead.",
                                "properties": {
                                    "waiting_for_event_id": {
                                        "type": "string",
                                        "description": "Identifies the waiting event. For action confirmations, pass it as event_id to task.confirmAction; question replies use task.sendMessage without this parameter."
                                    },
                                    "waiting_for_event_type": {
                                        "type": "string",
                                        "description": "Waiting event type: messageAskUser / cascadeAskUser are questions answered with task.sendMessage; supported action types such as gmailSendAction use task.confirmAction, even without confirm_input_schema. Do not automatically confirm unrecognized types."
                                    },
                                    "waiting_description": {
                                        "type": "string",
                                        "description": "Human-readable description of what the agent is waiting for."
                                    },
                                    "confirm_input_schema": {
                                        "type": "object",
                                        "description": "JSON Schema defining the expected input format for the confirmation, if additional input is needed."
                                    }
                                }
                            },
                            "brief": {
                                "type": "string",
                                "description": "Short summary of the current agent activity."
                            },
                            "description": {
                                "type": "string",
                                "description": "Detailed description of what the agent is doing."
                            }
                        }
                    },
                    "tool_used": {
                        "type": "object",
                        "description": "Present when type=\"tool_used\". Tool events normally require verbose=true. A confirmation target can be fetched with verbose=true and start_event_id=waiting_for_event_id only when the target projects to tool_used. Configuration and OAuth targets do not; attempting this lookup for them returns Event not found.",
                        "properties": {
                            "tool": {
                                "type": "string",
                                "description": "Name of the tool that was used (e.g., \"browser\", \"code_executor\")."
                            },
                            "action_id": {
                                "type": "string",
                                "description": "Unique identifier for this tool action."
                            },
                            "status": {
                                "type": "string",
                                "enum": [
                                    "success",
                                    "error",
                                    "rollback",
                                    "pending_confirmation"
                                ],
                                "description": "Tool projection status. pending_confirmation means the operation has not executed and is waiting for task.confirmAction, but some confirmation targets such as Gmail and Calendar retain success while waiting. Determine confirmation state from agent_status=waiting and waiting_for_event_id, not from this field alone."
                            },
                            "brief": {
                                "type": "string",
                                "description": "Short summary of the tool action."
                            },
                            "description": {
                                "type": "string",
                                "description": "Detailed description of what the tool did."
                            },
                            "message": {
                                "type": "object",
                                "description": "Human-readable display summary for the tool invocation. This is not the structured tool input.",
                                "properties": {
                                    "action": {
                                        "type": "string",
                                        "description": "Human-readable label describing the tool action. The action may still be awaiting confirmation."
                                    },
                                    "param": {
                                        "type": "string",
                                        "description": "Optional human-readable detail shown with the action. This is not the structured tool input; use tool_used.params for structured parameters."
                                    }
                                }
                            },
                            "params": {
                                "type": "object",
                                "description": "Structured parameters supplied to the tool. Returned when the confirmation target is fetched with verbose=true and start_event_id=waiting_for_event_id, or when that target and its waiting status are returned on the same page. Use them to review the proposed operation; do not submit them directly as task.confirmAction input."
                            },
                            "result": {
                                "type": "object",
                                "description": "Optional structured tool result used as confirmation context for result-driven operations, such as selecting an account or publishing prepared media. Returned under the same conditions as params."
                            }
                        }
                    },
                    "plan_update": {
                        "type": "object",
                        "description": "Present when type=\"plan_update\" (verbose=true only). A full snapshot of the agent's current execution plan.",
                        "properties": {
                            "steps": {
                                "type": "array",
                                "description": "All steps in the current plan with their statuses.",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "enum": [
                                                "todo",
                                                "doing",
                                                "done",
                                                "failed"
                                            ],
                                            "description": "Current status of this plan step."
                                        },
                                        "title": {
                                            "type": "string",
                                            "description": "Description of this plan step."
                                        },
                                        "started_at": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "format": "int64",
                                            "description": "Unix timestamp when this step started. Null if not yet started."
                                        },
                                        "end_at": {
                                            "type": [
                                                "integer",
                                                "null"
                                            ],
                                            "format": "int64",
                                            "description": "Unix timestamp when this step finished. Null if not yet completed."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "new_plan_step": {
                        "type": "object",
                        "description": "Present when type=\"new_plan_step\" (verbose=true only). A new step was added to the plan.",
                        "properties": {
                            "step_id": {
                                "type": "string",
                                "description": "Unique identifier for the new plan step."
                            },
                            "title": {
                                "type": "string",
                                "description": "Description of the new plan step."
                            }
                        }
                    },
                    "explanation": {
                        "type": "object",
                        "description": "Present when type=\"explanation\" (verbose=true only). The agent's internal reasoning or thought process.",
                        "properties": {
                            "content": {
                                "type": "string",
                                "description": "The agent's explanation of its reasoning or approach."
                            }
                        }
                    },
                    "structured_output_result": {
                        "type": "object",
                        "description": "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.",
                        "properties": {
                            "success": {
                                "type": "boolean",
                                "description": "Whether the agent produced a meaningful result. When false, value contains schema-conforming defaults and error explains what happened."
                            },
                            "value": {
                                "type": "object",
                                "description": "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](https://open.manus.ai/docs/v2/structured-output#when-success-is-false)."
                            },
                            "error": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "description": "Error description when success is false. Null when success is true."
                            }
                        }
                    }
                }
            },
            "TaskAttachment": {
                "type": "object",
                "description": "A file or media attachment in a task message.",
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "image",
                            "file",
                            "voice",
                            "slides"
                        ],
                        "description": "Type of attachment.\n\n- `image` — image.\n- `file` — document.\n- `voice` — audio recording.\n- `slides` — presentation slides."
                    },
                    "filename": {
                        "type": "string",
                        "description": "Display name of the attachment file."
                    },
                    "url": {
                        "type": "string",
                        "description": "URL to download the attachment content."
                    },
                    "path": {
                        "type": "string",
                        "description": "Optional execution-environment path referenced by the message body. Match it to a Markdown link or image destination, then use url to download the attachment. This path is not itself downloadable."
                    },
                    "content_type": {
                        "type": "string",
                        "description": "MIME type of the attachment (e.g., \"application/pdf\", \"image/png\")."
                    },
                    "file_uid": {
                        "type": "string",
                        "description": "Stable identifier of the backing output file. Present with `version_uid` when the attachment has a download URL and file identity. See [Attachments](https://open.manus.ai/docs/v2/attachments#file-paths)."
                    },
                    "version_uid": {
                        "type": "string",
                        "description": "Stable identifier of the backing output file version. Present with `file_uid`. See [Attachments](https://open.manus.ai/docs/v2/attachments#file-paths)."
                    },
                    "cover_image": {
                        "type": "string",
                        "description": "Signed URL of the attachment cover image. Present only on `assistant_message.attachments` when `include_cover=true` and `cover_image_status` is `ready`; never present on `user_message.attachments`. Each URL is valid for 48 hours and is re-signed on every response; read a fresh URL from the next response instead of storing one. See [Cover images](https://open.manus.ai/docs/v2/attachments#cover-images)."
                    },
                    "cover_image_status": {
                        "type": "string",
                        "enum": [
                            "ready",
                            "pending",
                            "unsupported"
                        ],
                        "description": "Cover image state. Present only on `assistant_message.attachments` when `include_cover=true`; never present on `user_message.attachments`. Omitted together with `cover_image` when the cover lookup fails for a response.\n\n- `ready` — `cover_image` holds the cover URL.\n- `pending` — a cover is supported but not available yet; request again later.\n- `unsupported` — this attachment has no cover.\n\nSee [Cover images](https://open.manus.ai/docs/v2/attachments#cover-images)."
                    }
                }
            },
            "Project": {
                "type": "object",
                "description": "A project for organizing tasks with a shared instruction, default connectors, and default skills. [project.detail](https://open.manus.ai/docs/v2/project.detail) and [project.update](https://open.manus.ai/docs/v2/project.update) return every field; [project.create](https://open.manus.ai/docs/v2/project.create) and [project.list](https://open.manus.ai/docs/v2/project.list) return only `id`, `name`, and `created_at`.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique identifier for the project."
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name of the project."
                    },
                    "created_at": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Unix timestamp (seconds) when the project was created."
                    },
                    "instruction": {
                        "type": "string",
                        "description": "Default instruction applied to all tasks in this project. Omitted when the project has no instruction."
                    },
                    "connector_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "IDs of the project's default connectors. Tasks in this project use them when `message.connectors` is omitted; see [task.create](https://open.manus.ai/docs/v2/task.create). Omitted when the project has no default connectors."
                    },
                    "skill_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "IDs of the project's default skills. Omitted when the project has no default skills."
                    },
                    "updated_at": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Unix timestamp (seconds) when the project configuration was last updated."
                    }
                }
            },
            "Skill": {
                "type": "object",
                "description": "A skill that extends the agent's capabilities.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique identifier for the skill. Use this in enable_skills or force_skills when creating tasks."
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name of the skill."
                    },
                    "description": {
                        "type": "string",
                        "description": "What the skill does and when it's useful."
                    },
                    "owner_type": {
                        "type": "string",
                        "enum": [
                            "personal",
                            "official",
                            "team",
                            "project",
                            "app",
                            "hub",
                            "device",
                            "unknown"
                        ],
                        "description": "Who owns the skill.\n\n- `personal` — user-created skill.\n- `official` — built-in system skill.\n- `team` — team-shared skill.\n- `project` — project-specific skill.\n- `app` — private skill owned by an Open App.\n- `hub` — skill installed from Skill Hub.\n- `device` — skill discovered on the user's connected device.\n- `unknown` — ownership not recognized.\n\nTreat any unrecognized value as `unknown`; new values may be added."
                    },
                    "creator_info": {
                        "type": "object",
                        "description": "Information about who created the skill.",
                        "properties": {
                            "user_id": {
                                "type": "string",
                                "description": "User ID of the skill creator."
                            },
                            "name": {
                                "type": "string",
                                "description": "Display name of the skill creator."
                            }
                        }
                    },
                    "created_at": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Unix timestamp (seconds) when the skill was created."
                    },
                    "updated_at": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Unix timestamp (seconds) when the skill was last updated."
                    }
                }
            },
            "Agent": {
                "type": "object",
                "description": "A custom agent with its own identity (nickname and description) that can be customized for specific use cases. See the [Agents](https://open.manus.ai/docs/v2/agents-overview) guide.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique identifier for the agent. Use this as `agent_id` in [task.list](https://open.manus.ai/docs/v2/task.list) (with `scope=agent_subtask`) to view this agent's subtasks."
                    },
                    "task_id": {
                        "type": "string",
                        "description": "The agent's main task, which is its persistent conversation thread. Pass it as `task_id` to [task.sendMessage](https://open.manus.ai/docs/v2/task.sendMessage) to talk to the agent, or to [task.listMessages](https://open.manus.ai/docs/v2/task.listMessages) to read the conversation. For the IM agent, the shortcut `agent-default-main_task` resolves to this value."
                    },
                    "nickname": {
                        "type": "string",
                        "description": "Display name of the agent. Can be updated via [agent.update](https://open.manus.ai/docs/v2/agent.update)."
                    },
                    "about": {
                        "type": "string",
                        "description": "Description or bio of the agent explaining its purpose and specialization. Can be updated via [agent.update](https://open.manus.ai/docs/v2/agent.update)."
                    }
                }
            },
            "ArtifactSource": {
                "type": "object",
                "description": "Credential attributable to the artifact's creation task. Omitted when no API key or OAuth client ID is available, including UI-created tasks and API-created tasks without recorded credential IDs.",
                "properties": {
                    "kind": {
                        "type": "string",
                        "enum": [
                            "oauth_client",
                            "api_key"
                        ],
                        "description": "Credential type that created the source task."
                    },
                    "oauth_client_id": {
                        "type": "string",
                        "description": "Open App client ID. Present when kind is oauth_client."
                    },
                    "api_key_id": {
                        "type": "string",
                        "description": "API key ID. Present when kind is api_key."
                    },
                    "name": {
                        "type": "string",
                        "description": "Current credential display name when available."
                    }
                }
            },
            "Artifact": {
                "type": "object",
                "description": "A generated task artifact indexed by Manus Library.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Stable Library file ID."
                    },
                    "task_id": {
                        "type": "string",
                        "description": "Task that produced the artifact."
                    },
                    "task_title": {
                        "type": "string",
                        "description": "Current title of the task that produced the artifact."
                    },
                    "filename": {
                        "type": "string",
                        "description": "Physical filename, including its extension when available."
                    },
                    "display_name": {
                        "type": "string",
                        "description": "User-facing artifact name shown in Manus Library."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "website",
                            "mobile_app",
                            "game",
                            "documents",
                            "slides",
                            "spreadsheets",
                            "images",
                            "videos",
                            "audio",
                            "others"
                        ],
                        "description": "Library category, as used by the `type` filter. Based on the indexed file type and extension. See [Artifact categories](https://open.manus.ai/docs/v2/artifacts#artifact-categories).",
                        "example": "spreadsheets"
                    },
                    "file_type": {
                        "type": "string",
                        "enum": [
                            "file",
                            "image",
                            "slide",
                            "website",
                            "webdev"
                        ],
                        "description": "Underlying Manus SessionFile type."
                    },
                    "content_type": {
                        "type": "string",
                        "description": "MIME type inferred from the filename when available."
                    },
                    "url": {
                        "type": "string",
                        "description": "Download or site URL when the artifact has a public API-consumable URL."
                    },
                    "cover_image": {
                        "type": "string",
                        "description": "Cover or preview image URL when available."
                    },
                    "cover_image_status": {
                        "type": "string",
                        "enum": [
                            "ready",
                            "pending",
                            "unsupported"
                        ],
                        "description": "Cover image state. This endpoint never starts PDF or spreadsheet cover generation.\n\n- `ready` — `cover_image` holds the cover URL.\n- `pending` — a cover is supported but not available yet.\n- `unsupported` — this artifact has no cover.\n\nSee [Cover images](https://open.manus.ai/docs/v2/attachments#cover-images)."
                    },
                    "favorite": {
                        "type": "boolean",
                        "description": "Whether the user favorited the artifact in Manus Library."
                    },
                    "updated_at": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Unix timestamp in seconds."
                    },
                    "platform_type": {
                        "type": "integer",
                        "format": "int32",
                        "description": "WebDev platform.\n\n- `1` — Web.\n- `2` — Mobile.\n- `3` — Game.\n\nTreat other values as unknown."
                    },
                    "logo": {
                        "type": "string",
                        "description": "WebDev application logo. Present for mobile WebDev artifacts when available."
                    },
                    "resource_uri": {
                        "type": "string",
                        "description": "Addon Resource identity. Returned instead of treating an internal resource URI as a download URL."
                    },
                    "source": {
                        "$ref": "#/components/schemas/ArtifactSource",
                        "description": "Credential attributable to the producing task. Omitted when no API key or OAuth client ID is available; omission does not imply that the task was created in the UI."
                    }
                }
            },
            "File": {
                "type": "object",
                "description": "Basic file information returned in lists and upload responses.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique identifier for the file. Use this as file_id when attaching to tasks."
                    },
                    "filename": {
                        "type": "string",
                        "description": "Name of the file."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "uploaded",
                            "deleted",
                            "error"
                        ],
                        "description": "File status. \"pending\" — waiting for upload. \"uploaded\" — ready to use. \"deleted\" — file has been deleted. \"error\" — upload failed."
                    },
                    "created_at": {
                        "type": "string",
                        "description": "Unix timestamp in seconds when the file record was created, encoded as a decimal string.",
                        "pattern": "^[0-9]+$",
                        "example": "1893456000"
                    }
                }
            },
            "FileDetail": {
                "type": "object",
                "description": "Full file information returned by file.detail.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique identifier for the file."
                    },
                    "filename": {
                        "type": "string",
                        "description": "Name of the file."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "uploaded",
                            "deleted",
                            "error"
                        ],
                        "description": "File status. \"pending\" — waiting for upload. \"uploaded\" — ready to use. \"deleted\" — file has been deleted. \"error\" — upload failed."
                    },
                    "created_at": {
                        "type": "string",
                        "description": "Unix timestamp in seconds when the file record was created, encoded as a decimal string.",
                        "pattern": "^[0-9]+$",
                        "example": "1893456000"
                    },
                    "bytes": {
                        "type": "string",
                        "description": "File size in bytes, encoded as a decimal string. May be \"0\" before the upload is confirmed.",
                        "pattern": "^[0-9]+$",
                        "example": "42"
                    },
                    "content_type": {
                        "type": "string",
                        "description": "MIME type of the file (e.g., \"application/pdf\", \"text/csv\")."
                    },
                    "expires_at": {
                        "type": "string",
                        "description": "Unix timestamp in seconds when the file expires, encoded as a decimal string.",
                        "pattern": "^[0-9]+$",
                        "example": "1893628800"
                    },
                    "error_message": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Error description if the file status is \"error\"."
                    }
                }
            },
            "Webhook": {
                "type": "object",
                "description": "A webhook subscription for receiving task event notifications.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique identifier for the webhook."
                    },
                    "url": {
                        "type": "string",
                        "description": "The endpoint URL receiving webhook POST notifications."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "inactive"
                        ],
                        "description": "Webhook status. \"active\" — receiving notifications. \"inactive\" — paused."
                    },
                    "created_at": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Unix timestamp (seconds) when the webhook was created."
                    }
                }
            },
            "BrowserClient": {
                "type": "object",
                "description": "An online browser client connected to the user's account.",
                "properties": {
                    "client_id": {
                        "type": "string",
                        "description": "Unique identifier for the browser client."
                    },
                    "client_name": {
                        "type": "string",
                        "description": "Display name of the browser client."
                    },
                    "ua": {
                        "type": "string",
                        "description": "User-Agent string of the browser."
                    }
                }
            },
            "ConnectorInfo": {
                "type": "object",
                "description": "Information about an available connector.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Unique identifier for the connector. Use this as the connector ID when creating tasks."
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name of the connector."
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "builtin",
                            "byok",
                            "mcp"
                        ],
                        "description": "Connector type. \"builtin\" — built-in connector provided by Manus. \"byok\" — bring-your-own-key connector. \"mcp\" — MCP (Model Context Protocol) connector."
                    },
                    "description": {
                        "type": "string",
                        "description": "Human-readable description of the connector's functionality."
                    },
                    "category": {
                        "type": "string",
                        "description": "Category grouping for the connector (e.g., \"productivity\", \"communication\")."
                    }
                }
            },
            "AvailableCredits": {
                "type": "object",
                "description": "Credit balance, subscription period, and refresh information for the authenticated caller. All credit fields are 32-bit integers in credit points. `total_credits` is the authoritative spendable balance — see the field descriptions for how it is composed.",
                "properties": {
                    "total_credits": {
                        "type": "integer",
                        "description": "Total available credits — the actual spendable wallet balance. Equals `free_credits + periodic_credits + addon_credits + event_credits + refresh_credits`, minus team overflow credits, where `periodic_credits` and `addon_credits` are counted as 0 when the membership has lapsed and `event_credits` is 0 when no event is active. Always treat this as the single authoritative value for how many credits can be spent."
                    },
                    "free_credits": {
                        "type": "integer",
                        "description": "Free credits unrelated to any subscription, such as sign-up gifts and system grants."
                    },
                    "periodic_credits": {
                        "type": "integer",
                        "description": "Remaining periodic subscription credits issued in the current billing cycle and not yet spent. Returns 0 when the membership has lapsed."
                    },
                    "addon_credits": {
                        "type": "integer",
                        "description": "Remaining add-on / credit-pack credits that were purchased separately and do not reset with the subscription cycle. In team scenarios this already accounts for deducted-but-unpaid overflow credits."
                    },
                    "pro_monthly_credits": {
                        "type": "integer",
                        "description": "VIP monthly periodic-credit quota — how many periodic credits the current membership tier issues each month. This is a quota, not a current balance. 0 for non-VIP accounts."
                    },
                    "event_credits": {
                        "type": "integer",
                        "description": "Remaining event (live event) credits. Returns the real value only while the account's bound campaign is still active; otherwise 0."
                    },
                    "refresh_credits": {
                        "type": "integer",
                        "description": "Remaining auto-refresh credits accumulated on the account (daily/weekly) and not yet spent."
                    },
                    "max_refresh_credits": {
                        "type": "integer",
                        "description": "Amount granted by a single refresh — the cap the next auto-refresh will issue. Only present for personal accounts; 0 for team accounts."
                    },
                    "next_refresh_time": {
                        "type": "integer",
                        "description": "Time of the next refresh as a Unix timestamp in seconds (UTC). Only present for personal accounts; 0 when there is no upcoming refresh."
                    },
                    "refresh_interval": {
                        "type": "string",
                        "description": "Refresh cadence: `daily` or `weekly`. Empty string when there is no refresh schedule (e.g., team accounts).",
                        "enum": [
                            "daily",
                            "weekly",
                            ""
                        ]
                    },
                    "current_period_end": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Subscription period end as a Unix timestamp in seconds (UTC). Returns 0 when no subscription period is returned; an expired subscription may return a timestamp in the past. Temporary event membership does not change this value."
                    }
                }
            },
            "UsageRecord": {
                "type": "object",
                "description": "A credit change record at session granularity. Covers consumption, refunds, subscription grants, and admin adjustments.",
                "properties": {
                    "task_id": {
                        "type": "string",
                        "description": "The task (session) ID this change is associated with."
                    },
                    "title": {
                        "type": "string",
                        "description": "The task title. Returns \"Deleted conversation\" if the session has been deleted."
                    },
                    "credits": {
                        "type": "integer",
                        "description": "Credit change amount. Negative values represent consumption; positive values represent refunds or subscription/admin grants."
                    },
                    "created_at": {
                        "type": "integer",
                        "description": "Time of the most recent change as a Unix timestamp in seconds."
                    },
                    "type": {
                        "type": "string",
                        "description": "Change type:\n\n- `cost` — credit consumption (task usage or admin deduction)\n- `refund` — credit returned after consumption (e.g., task failure rollback)\n- `grant` — credits gained (subscription grant, upgrade bonus, recurring issuance, credit pack purchase, admin compensation)",
                        "enum": [
                            "cost",
                            "refund",
                            "grant"
                        ]
                    },
                    "collaborate_infos": {
                        "type": "array",
                        "description": "Per-collaborator credit breakdown for team tasks. Empty for personal tasks.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "user_id": {
                                    "type": "string",
                                    "description": "Collaborator's user ID."
                                },
                                "user_name": {
                                    "type": "string",
                                    "description": "Collaborator's display name."
                                },
                                "credits": {
                                    "type": "integer",
                                    "description": "Credits attributed to this collaborator for the task."
                                }
                            }
                        }
                    }
                }
            },
            "DailyStatistic": {
                "type": "object",
                "description": "Daily credit consumption total.",
                "properties": {
                    "date": {
                        "type": "integer",
                        "description": "Date as a Unix timestamp in seconds, representing 00:00:00 of that day."
                    },
                    "credits": {
                        "type": "integer",
                        "description": "Total credits consumed on this day."
                    }
                }
            },
            "TeamUsageLog": {
                "type": "object",
                "description": "Per-user aggregated task count and credit consumption over the requested range. One row per team member.",
                "properties": {
                    "user_id": {
                        "type": "string",
                        "description": "Team member's user ID."
                    },
                    "user_name": {
                        "type": "string",
                        "description": "Team member's display name."
                    },
                    "email": {
                        "type": "string",
                        "description": "Team member's email address."
                    },
                    "task_count": {
                        "type": "integer",
                        "description": "Number of tasks the member created within the requested range."
                    },
                    "credits": {
                        "type": "integer",
                        "description": "Total credits consumed by this user within the requested range."
                    }
                }
            },
            "WebsiteCheckpoint": {
                "type": "object",
                "description": "A snapshot of a website (backed by a git commit).",
                "properties": {
                    "version_id": {
                        "type": "string",
                        "description": "Unique checkpoint version ID (the underlying git commit hash)."
                    },
                    "message": {
                        "type": "string",
                        "description": "Checkpoint description — the commit message written when the checkpoint was saved."
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "success",
                            "failed",
                            "unspecified"
                        ],
                        "description": "Whether the checkpoint itself was generated successfully. This is independent of publish state — use `published_version_id` from `website.listCheckpoints` to identify the version currently live."
                    },
                    "created_at": {
                        "type": "integer",
                        "format": "int64",
                        "description": "Checkpoint creation time (Unix seconds)."
                    },
                    "screenshot_url": {
                        "type": "string",
                        "description": "**Optional.** Screenshot of this checkpoint, as a signed temporary URL. Fetch the image when you need it instead of storing the address. Omitted when the checkpoint has no screenshot."
                    }
                }
            },
            "ErrorResponse": {
                "type": "object",
                "description": "Standard error response format returned when a request fails.",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "example": false,
                        "description": "Always false for error responses."
                    },
                    "request_id": {
                        "type": "string",
                        "description": "Unique identifier for this API request, useful for debugging with support."
                    },
                    "error": {
                        "type": "object",
                        "description": "Error details.",
                        "properties": {
                            "code": {
                                "type": "string",
                                "description": "Machine-readable error code (e.g., \"invalid_argument\", \"not_found\", \"permission_denied\", \"rate_limited\")."
                            },
                            "message": {
                                "type": "string",
                                "description": "Human-readable error description explaining what went wrong."
                            }
                        }
                    }
                }
            }
        }
    }
}
