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

# 获取原始消息

> 获取收件箱消息的原始 RFC 822 消息内容。



## OpenAPI

````yaml openapi/zh/agentmail.json GET /agentmail/inboxes/{inbox_id}/messages/{message_id}/raw
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}/messages/{message_id}/raw:
    get:
      tags:
        - subpackage_inboxes.subpackage_inboxes/messages
      summary: 获取原始消息
      description: >-
        **CLI：**

        ```bash

        agentmail inboxes:messages get-raw --inbox-id <inbox_id> --message-id
        <message_id>

        ```
      operationId: get_agentmail_inboxes_inbox_id_messages_message_id_raw
      parameters:
        - name: inbox_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/type_inboxes_InboxId'
        - name: message_id
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/type_messages_MessageId'
        - name: Authorization
          in: header
          description: Bearer 身份验证
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 状态码为 200 的响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_messages_RawMessageResponse'
        '404':
          description: 状态码为 404 的错误响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type__ErrorResponse'
components:
  schemas:
    type_inboxes_InboxId:
      type: string
      description: 收件箱的 ID。
      title: InboxId
    type_messages_MessageId:
      type: string
      description: 消息 ID。
      title: MessageId
    type_messages_RawMessageResponse:
      type: object
      properties:
        message_id:
          $ref: '#/components/schemas/type_messages_MessageId'
          description: 消息的 ID。
        size:
          $ref: '#/components/schemas/type_messages_MessageSize'
          description: 原始消息的大小（以字节为单位）。
        download_url:
          type: string
          description: 用于下载原始消息的 S3 预签名 URL。将在 expires_at 指定的时间过期。
        expires_at:
          type: string
          format: date-time
          description: 下载 URL 的过期时间。
      required:
        - message_id
        - size
        - download_url
        - expires_at
      description: 用于下载原始 .eml 文件的 S3 预签名 URL。
      title: RawMessageResponse
    type__ErrorResponse:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/type__ErrorName'
        message:
          $ref: '#/components/schemas/type__ErrorMessage'
      required:
        - name
        - message
      title: ErrorResponse
    type_messages_MessageSize:
      type: integer
      description: 消息大小（以字节为单位）。
      title: MessageSize
    type__ErrorName:
      type: string
      description: 错误名称。
      title: ErrorName
    type__ErrorMessage:
      type: string
      description: 错误消息。
      title: ErrorMessage
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````