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

# 列出收件箱事件

> 按时间倒序列出特定收件箱的标签变更事件。



## OpenAPI

````yaml openapi/zh/agentmail.json GET /agentmail/inboxes/{inbox_id}/events
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/{inbox_id}/events:
    get:
      tags:
        - subpackage_inboxes.subpackage_inboxes/events
      summary: 列出收件箱事件
      description: |-
        列出收件箱的标签变更事件。默认按时间倒序返回事件。可用于 IMAP UID 映射或审计日志记录。

        **CLI：**
        ```bash
        agentmail inboxes:events list --inbox-id <inbox_id>
        ```
      operationId: get_agentmail_inboxes_inbox_id_events
      parameters:
        - name: inbox_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/type_inboxes_InboxId'
        - 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_inbox-events_ListInboxEventsResponse'
        '404':
          description: 状态码为 404 的错误响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
components:
  schemas:
    type_inboxes_InboxId:
      type: string
      description: 收件箱的 ID。
      title: InboxId
    type__Limit:
      type: integer
      description: 返回项目数量的上限。
      title: Limit
    type__PageToken:
      type: string
      description: 用于分页的页面 token。
      title: PageToken
    type__Ascending:
      type: boolean
      description: 按时间升序排序。
      title: Ascending
    type_inbox-events_ListInboxEventsResponse:
      type: object
      properties:
        count:
          $ref: '#/components/schemas/type__Count'
        limit:
          $ref: '#/components/schemas/type__Limit'
        next_page_token:
          $ref: '#/components/schemas/type__PageToken'
        events:
          type: array
          items:
            $ref: '#/components/schemas/type_inbox-events_InboxEvent'
          description: 按 `event_id` 降序排列。
      required:
        - count
        - events
      title: ListInboxEventsResponse
    type__ErrorResponse:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/type__ErrorName'
        message:
          $ref: '#/components/schemas/type__ErrorMessage'
      required:
        - name
        - message
      title: ErrorResponse
    type__Count:
      type: integer
      description: 返回的项目数量。
      title: Count
    type_inbox-events_InboxEvent:
      type: object
      properties:
        organization_id:
          $ref: '#/components/schemas/type__OrganizationId'
        pod_id:
          type: string
          description: Pod ID。
        inbox_id:
          $ref: '#/components/schemas/type_inboxes_InboxId'
        event_id:
          $ref: '#/components/schemas/type_inbox-events_InboxEventId'
        event_type:
          $ref: '#/components/schemas/type_inbox-events_InboxEventType'
        message_id:
          type: string
          description: 消息 ID。
        label:
          type: string
          description: 标签已添加或移除。
        event_at:
          type: string
          format: date-time
          description: 事件发生的时间。
        created_at:
          type: string
          format: date-time
          description: 事件的记录时间。
      required:
        - organization_id
        - pod_id
        - inbox_id
        - event_id
        - event_type
        - message_id
        - label
        - event_at
        - created_at
      title: InboxEvent
    type__ErrorName:
      type: string
      description: 错误名称。
      title: ErrorName
    type__ErrorMessage:
      type: string
      description: 错误消息。
      title: ErrorMessage
    type__OrganizationId:
      type: string
      description: 组织 ID。
      title: OrganizationId
    type_inbox-events_InboxEventId:
      type: string
      description: 事件 ID。
      title: InboxEventId
    type_inbox-events_InboxEventType:
      type: string
      enum:
        - label.added
        - label.removed
      description: |-
        收件箱事件类型。传输格式采用 dot.case，以匹配
        Webhook 事件使用的约定（events.yml 中的 `message.received`、
        `domain.verified` 等）。2026-04 之前使用的是
        `label_added`/`label_removed`（snake_case）。Fern 枚举的 `name`
        字段仍采用 uppercase-snake（Fern 约定）；仅传输格式的
        `value` 发生了变化。
      title: InboxEventType
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````