> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Get Inbox Message

> 增删单封邮件的标签，返回 message_id 和结果 labels。

> [!WARNING]
>
> 该接口文档尚未完成更新。

增删单封邮件的标签，返回 `message_id` 和结果 `labels`。标签是收到的邮件唯一可变的部分。写入的是共享 AgentMail 工作区：所有 AIsa 调用方共用同一个 AgentMail 账号，因此这里会触及其他调用方创建的收件箱，你写进去的东西下一个调用方也看得到、改得动。 当前标签用 `get_agentmail_inbox_message` 读取。

## 示例

```bash REST theme={null}
curl -X PATCH "https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```jsonc MCP theme={null}
// 把整段复制给 Claude Code、Codex、Cursor 或任意 coding agent。
// 连接、授权、跑通这个例子需要的东西都在里面 ——
// 不用粘贴任何 key，浏览器里点一次 Allow 就好。
{
  "calls": [
    {
      "call_id": "1",
      "tool": "patch_agentmail_inbox_message",
      "arguments": {}
    }
  ]
}
// ── for the agent ─────────────────────────────────────────────────────────
// Register the AIsa MCP server, then call its `batch_quote` tool with the JSON above.
//   name       aisa
//   endpoint   https://mcp.aisa.one/mcp
//   transport  streamable-http
//   auth       OAuth. The server publishes RFC 9728 metadata, so open a
//              browser and the user clicks Allow once — nothing to paste.
//              If AISA_API_KEY is set, send it as a bearer header instead.
// Use your own MCP mechanism, not a hand-edited config file:
//   Codex        codex mcp add aisa --url https://mcp.aisa.one/mcp
//   Claude Code  claude mcp add --transport http -s user aisa https://mcp.aisa.one/mcp
//   Cursor / VS Code   a "url" entry for https://mcp.aisa.one/mcp in the MCP config
// The server reaches https://mcp.aisa.one/servers worth of APIs through a few meta
// tools: search, list_categories, get_details, batch_quote, batch_use.
// search, get_details and batch_quote are free; batch_use is billed per
// call. This operation's full contract — every argument, the response
// shape, the price and the pitfalls — is at
//   https://aisa.one/docs/zh/api-reference/agentmail/patch_agentmail-inboxes-inbox-id-messages-message-id.md
// Show me the quoted cost. Once I approve, run the same calls with
// batch_use and show me the result.
```

> [!NOTE]
>
> **第一次用？** 把任意 MCP 客户端指向 `https://mcp.aisa.one/mcp` —— Claude Code、
> Codex、Cursor、VS Code 都可以。鉴权走 OAuth：客户端打开浏览器，你点一次
> Allow，不需要粘贴任何 key。之后智能体通过几个元工具调用所有端点：
> `search`、`list_categories`、`get_details` 和 `batch_quote` 免费，`batch_use`
> 按次计费。各客户端的接入步骤见[通过 MCP 连接](https://aisa.one/docs/zh/agent-quickstart.md)；实时工具列表和
> 每次调用的价格见 [aisa.one/zh-cn/mcp](https://aisa.one/zh-cn/mcp#connect)。

[在你的 agent 里把这个端点跑起来 →](https://aisa.one/mcp?from=/zh/api-reference/agentmail/patch_agentmail-inboxes-inbox-id-messages-message-id)

## 请求规范

* **方法与路径:** PATCH /apis/v1/agentmail/inboxes/\{inbox\_id}/messages/\{message\_id}
* **可用状态:** disabled

**此接口已停用，无法调用。历史请求、schema 和价格声明仅保留供参考。**

* **请求 URL 模板:** `https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}`
* **inbox\_id:** path; 必填
* **message\_id:** path; 必填
* **Runtime 事实版本:** b99ca4149ff3daae12d76cfc531f5283e79e7d7a4e0325efb1f93efd8385607e

[完整 OpenAPI 定义](https://aisa.one/docs/openapi/zh/agentmail.json)

有效请求声明（包括认证和引用的 schema）：

```json theme={null}
{
  "operationId": "patch_agentmail_inbox_message",
  "method": "PATCH",
  "path": "/apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "in": "path",
      "name": "inbox_id",
      "required": true,
      "schema": {
        "description": "The ID of the inbox.",
        "title": "InboxId",
        "type": "string"
      }
    },
    {
      "in": "path",
      "name": "message_id",
      "required": true,
      "schema": {
        "description": "ID of message.",
        "title": "MessageId",
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "add_labels": {
              "description": "Label or labels to add to message.",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              ],
              "title": "UpdateMessageLabels"
            },
            "remove_labels": {
              "description": "Label or labels to remove from message.",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                }
              ],
              "title": "UpdateMessageLabels"
            }
          },
          "title": "UpdateMessageRequest",
          "type": "object"
        }
      }
    }
  },
  "x-aisa-status": "disabled",
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## 费用与请求规则

公开参考价格：每次成功请求 \$0.012 USD。 账户适用价格可能不同；支持报价的接口可按实际请求获取报价。

当前未启用。


## OpenAPI

````yaml openapi/zh/agentmail.json PATCH /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}
openapi: 3.1.0
info:
  description: ''
  title: AgentMail API
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    agentmail:
      description: ''
      title: AgentMail API
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: b99ca4149ff3daae12d76cfc531f5283e79e7d7a4e0325efb1f93efd8385607e
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/agentmail/api-keys
    - /apis/v1/agentmail/api-keys/{api_key_id}
    - /apis/v1/agentmail/domains
    - /apis/v1/agentmail/domains/{domain_id}
    - /apis/v1/agentmail/domains/{domain_id}/verify
    - /apis/v1/agentmail/domains/{domain_id}/zone-file
    - /apis/v1/agentmail/drafts
    - /apis/v1/agentmail/drafts/{draft_id}
    - /apis/v1/agentmail/drafts/{draft_id}/attachments/{attachment_id}
    - /apis/v1/agentmail/inboxes
    - /apis/v1/agentmail/inboxes/{inbox_id}
    - /apis/v1/agentmail/inboxes/{inbox_id}/api-keys
    - /apis/v1/agentmail/inboxes/{inbox_id}/api-keys/{api_key_id}
    - /apis/v1/agentmail/inboxes/{inbox_id}/drafts
    - /apis/v1/agentmail/inboxes/{inbox_id}/drafts/{draft_id}
    - >-
      /apis/v1/agentmail/inboxes/{inbox_id}/drafts/{draft_id}/attachments/{attachment_id}
    - /apis/v1/agentmail/inboxes/{inbox_id}/drafts/{draft_id}/send
    - /apis/v1/agentmail/inboxes/{inbox_id}/events
    - /apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}
    - /apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/send
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}
    - >-
      /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}/forward
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}/raw
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}/reply
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}/reply-all
    - /apis/v1/agentmail/inboxes/{inbox_id}/metrics
    - /apis/v1/agentmail/inboxes/{inbox_id}/threads
    - /apis/v1/agentmail/inboxes/{inbox_id}/threads/{thread_id}
    - >-
      /apis/v1/agentmail/inboxes/{inbox_id}/threads/{thread_id}/attachments/{attachment_id}
    - /apis/v1/agentmail/lists/{direction}/{type}
    - /apis/v1/agentmail/lists/{direction}/{type}/{entry}
    - /apis/v1/agentmail/metrics
    - /apis/v1/agentmail/threads
    - /apis/v1/agentmail/threads/{thread_id}
    - /apis/v1/agentmail/threads/{thread_id}/attachments/{attachment_id}
  x-aisa-document:
    composer_version: '29'
    document_hash: sha256:6565e08fbf76a35e7acca0f1fd11128dd2ff1a288cd4207a22d5eb51f3d71256
    facts_hash: b99ca4149ff3daae12d76cfc531f5283e79e7d7a4e0325efb1f93efd8385607e
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: agentmail
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}:
    patch:
      tags:
        - default
      summary: Get Inbox Message
      description: >-
        Retrieve detailed information about a specific message within an inbox,
        including sender, recipients, content, labels, attachments, and
        timestamps.
      operationId: patch_agentmail_inbox_message
      parameters:
        - in: path
          name: inbox_id
          required: true
          schema:
            description: 收件箱的 ID。
            title: InboxId
            type: string
        - in: path
          name: message_id
          required: true
          schema:
            description: 消息 ID。
            title: MessageId
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                add_labels:
                  description: 要添加到消息的一个或多个标签。
                  oneOf:
                    - type: string
                    - items:
                        type: string
                      type: array
                  title: UpdateMessageLabels
                remove_labels:
                  description: 要从消息中移除的一个或多个标签。
                  oneOf:
                    - type: string
                    - items:
                        type: string
                      type: array
                  title: UpdateMessageLabels
              title: UpdateMessageRequest
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ResponseD09F9471A0E8_messages_UpdateMessageResponse
          description: 状态码为 200 的响应
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    ResponseD09F9471A0E8_messages_UpdateMessageResponse:
      properties:
        labels:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_messages_MessageLabels'
        message_id:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_messages_MessageId'
      required:
        - message_id
        - labels
      title: UpdateMessageResponse
      type: object
    ResponseD09F9471A0E8_messages_MessageLabels:
      description: 消息标签。
      items:
        type: string
      title: MessageLabels
      type: array
    ResponseD09F9471A0E8_messages_MessageId:
      description: 消息 ID。
      title: MessageId
      type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.