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

# セッションのメッセージ一覧を取得する

> カーソルベースのページネーションを使って、セッション内のすべてのメッセージを時系列で一覧します。

<Note>
  `devin_id` は、先頭に `devin-` が付いたセッション ID です (例: `devin-abc123`) 。
</Note>

<div id="permissions">
  ## 権限
</div>

Enterprise レベルで `ViewAccountSessions` 権限が付与されたサービスユーザーが必要です。


## OpenAPI

````yaml ja/v3-openapi.yaml GET /v3/enterprise/sessions/{devin_id}/messages
openapi: 3.1.0
info:
  description: Service User 認証および RBAC に対応した Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/enterprise/sessions/{devin_id}/messages:
    get:
      tags:
        - sessions
      summary: セッションのメッセージ一覧を取得する
      description: カーソルベースのページネーションを使って、セッション内のすべてのメッセージを時系列で一覧します。
      operationId: >-
        handle_get_account_session_messages_v3_enterprise_sessions__devin_id__messages_get
      parameters:
        - description: 'Devin セッション ID（プレフィックス: devin-）'
          in: path
          name: devin_id
          required: true
          schema:
            anyOf:
              - type: string
              - type: 'null'
            example: devin-abc123def456
            title: Devin Id
        - in: query
          name: qs
          required: true
          schema:
            $ref: '#/components/schemas/CursorPaginationParams'
        - in: query
          name: org_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Org Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionMessage_'
          description: 成功時のレスポンス
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: バリデーションエラー
components:
  schemas:
    CursorPaginationParams:
      properties:
        after:
          anyOf:
            - type: string
            - type: 'null'
          title: After
        first:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      title: CursorPaginationParams
      type: object
    PaginatedResponse_SessionMessage_:
      properties:
        end_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: 次のページを取得するためのカーソル。最終ページの場合は None。
          title: End Cursor
        has_next_page:
          default: false
          description: このページの後に、追加で取得可能な項目があるかどうか。
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/SessionMessage'
          title: Items
          type: array
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: 総件数（パフォーマンス上の理由から省略可能なオプション項目）。
          title: Total
      required:
        - items
      title: PaginatedResponse[SessionMessage]
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SessionMessage:
      description: Devin セッション内のメッセージ。
      properties:
        created_at:
          title: Created At
          type: integer
        event_id:
          title: Event Id
          type: string
        message:
          title: Message
          type: string
        source:
          enum:
            - devin
            - user
          title: Source
          type: string
      required:
        - event_id
        - source
        - message
        - created_at
      title: SessionMessage
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 'サービスユーザーの認証情報（接頭辞: cog_）'
      scheme: bearer
      type: http

````