> ## 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.

# 列出收件箱

> 列出 AgentMail 账号下的全部收件箱。

列出 AgentMail 账号下的全部收件箱。返回 `count`、`limit`、`next_page_token` 和 `inboxes`，用 `next_page_token` 翻页。每个收件箱含 `inbox_id`、`email`、`display_name`、`client_id`、`pod_id`、`metadata`、`created_at` 和 `updated_at`。所有 AIsa 调用方共用同一个 AgentMail 账号，因此这里会触及其他调用方创建的收件箱，所以这份列表并非按你隔离，返回的收件箱可能属于别人。已知 id 时用 `get_agentmail_inbox`，新建用 `post_agentmail_inbox`。

## 示例

<CodeGroup>
  ```bash REST theme={null}
  curl -X GET "https://api.aisa.one/apis/v1/agentmail/inboxes" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```jsonc MCP theme={null}
  // 把整段复制给 Claude Code、Codex、Cursor 或任意 coding agent。
  // 连接、授权、跑通这个例子需要的东西都在里面 ——
  // 不用粘贴任何 key，浏览器里点一次 Allow 就好。
  {
    "operation_id": "get_agentmail_inboxes",
    "arguments": {},
    "max_price_usd": 0.05
  }
  // ── for the agent ─────────────────────────────────────────────────────────
  // Register the AIsa MCP server, then call its `use` 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 lists five tools over https://mcp.aisa.one/servers worth of APIs:
  // search, get_details, use, batch_use, list_categories. search and
  // get_details are free; use is billed per call and max_price_usd refuses
  // anything above the cap before spending. 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/get_agentmail-inboxes.md
  // Then run the call and show me the result.
  ```
</CodeGroup>

<Note>
  **第一次用？** 把任意 MCP 客户端指向 `https://mcp.aisa.one/mcp` —— Claude Code、
  Codex、Cursor、VS Code 都可以。鉴权走 OAuth：客户端打开浏览器，你点一次
  Allow，不需要粘贴任何 key。各客户端的具体命令和每次调用的价格见
  [aisa.one/zh-cn/mcp](https://aisa.one/zh-cn/mcp#connect)。
</Note>

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


## OpenAPI

````yaml openapi/zh/agentmail.json GET /agentmail/inboxes
openapi: 3.1.0
info:
  title: AgentMail API
  version: 1.0.0
  description: 通过 AIsa 统一网关公开的 AgentMail 电子邮件 API 端点。改编自上游 docs.agentmail.to OpenAPI 规范。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - Bearer: []
paths:
  /agentmail/inboxes:
    get:
      tags:
        - subpackage_inboxes
      summary: 列出收件箱
      description: >-
        列出 AgentMail 账号下的全部收件箱。返回 `count`、`limit`、`next_page_token` 和
        `inboxes`，用 `next_page_token` 翻页。每个收件箱含
        `inbox_id`、`email`、`display_name`、`client_id`、`pod_id`、`metadata`、`created_at`
        和 `updated_at`。所有 AIsa 调用方共用同一个 AgentMail
        账号，因此这里会触及其他调用方创建的收件箱，所以这份列表并非按你隔离，返回的收件箱可能属于别人。已知 id 时用
        `get_agentmail_inbox`，新建用 `post_agentmail_inbox`。
      operationId: get_agentmail_inboxes
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/type__Limit'
        - name: page_token
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/type__PageToken'
        - name: ascending
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/type__Ascending'
        - name: Authorization
          in: header
          description: Bearer 身份验证
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 状态码为 200 的响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_inboxes_ListInboxesResponse'
components:
  schemas:
    type__Limit:
      type: integer
      description: 返回项目数量的上限。
      title: Limit
    type__PageToken:
      type: string
      description: 用于分页的页面 token。
      title: PageToken
    type__Ascending:
      type: boolean
      description: 按时间升序排序。
      title: Ascending
    type_inboxes_ListInboxesResponse:
      type: object
      properties:
        count:
          $ref: '#/components/schemas/type__Count'
        limit:
          $ref: '#/components/schemas/type__Limit'
        next_page_token:
          $ref: '#/components/schemas/type__PageToken'
        inboxes:
          type: array
          items:
            $ref: '#/components/schemas/type_inboxes_Inbox'
          description: 按 `created_at` 降序排列。
      required:
        - count
        - inboxes
      title: ListInboxesResponse
    type__Count:
      type: integer
      description: 返回的项目数量。
      title: Count
    type_inboxes_Inbox:
      type: object
      properties:
        pod_id:
          $ref: '#/components/schemas/type_pods_PodId'
        inbox_id:
          $ref: '#/components/schemas/type_inboxes_InboxId'
        email:
          $ref: '#/components/schemas/type_inboxes_Email'
        display_name:
          $ref: '#/components/schemas/type_inboxes_DisplayName'
        client_id:
          $ref: '#/components/schemas/type_inboxes_ClientId'
        metadata:
          $ref: '#/components/schemas/type_inboxes_Metadata'
          description: 附加到收件箱的自定义元数据。
        updated_at:
          type: string
          format: date-time
          description: 收件箱上次更新的时间。
        created_at:
          type: string
          format: date-time
          description: 收件箱的创建时间。
      required:
        - pod_id
        - inbox_id
        - email
        - updated_at
        - created_at
      title: Inbox
    type_pods_PodId:
      type: string
      description: Pod ID。
      title: PodId
    type_inboxes_InboxId:
      type: string
      description: 收件箱的 ID。
      title: InboxId
    type_inboxes_Email:
      type: string
      description: 收件箱的电子邮件地址。
      title: Email
    type_inboxes_DisplayName:
      type: string
      description: 显示名称：`Display Name <username@domain.com>`。
      title: DisplayName
    type_inboxes_ClientId:
      type: string
      description: 收件箱的客户端 ID。
      title: ClientId
    type_inboxes_Metadata:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/type_inboxes_MetadataValue'
      description: |-
        附加到收件箱的自定义键值对。最多 256 个键。键和
        字符串值均限制为 256 个字符。更新 metadata 时，
        发送值为 null 的键即可删除该键。
      title: Metadata
    type_inboxes_MetadataValue:
      oneOf:
        - type: string
        - type: number
          format: double
        - type: boolean
      description: 元数据值。可以是字符串、数字或布尔值。
      title: MetadataValue
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````

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