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

# Get Super Agent Session History

> Retrieves all messages for a given super agent chat session. Session must belong to user's organization.



## OpenAPI

````yaml get /super-agent/sessions/{sessionId}/messages
openapi: 3.0.1
info:
  title: Attention Service V2
  description: Attention Service API V2
  termsOfService: https://www.attention.com/terms-of-use
  contact:
    name: Attention Team
    url: https://docs.attention.com/welcome
    email: support@attention.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.8.0
servers:
  - url: https://api.attention.tech/v2
security:
  - APIKeyHeader: []
paths:
  /super-agent/sessions/{sessionId}/messages:
    get:
      tags:
        - Super Agent
      summary: Get Super Agent Session History
      description: >-
        Retrieves all messages for a given super agent chat session. Session
        must belong to user's organization.
      operationId: getSuperAgentSessionHistory
      parameters:
        - name: sessionId
          in: path
          description: The session ID to retrieve messages for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Session messages retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuperAgentSessionHistoryResponse'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SuperAgentSessionHistoryResponse'
        '401':
          description: Valid user-level API key required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Session does not belong to user's organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SuperAgentSessionHistoryResponse:
      type: object
      properties:
        session_id:
          type: string
          description: The session ID
        title:
          type: string
          description: Session title
        status:
          type: string
          description: Current session status
        messages:
          type: array
          description: List of messages in the session
          items:
            $ref: '#/components/schemas/SuperAgentMessage'
      example:
        session_id: session-uuid-456
        title: Q1 Revenue Analysis
        status: ACTIVE
        messages:
          - id: msg-uuid-1
            session_id: session-uuid-456
            content: What were our Q1 revenue results?
            role: user
            timestamp: '2024-03-18T14:30:00Z'
            metadata: {}
          - id: msg-uuid-2
            session_id: session-uuid-456
            content: Revenue targets were met at 105%.
            role: assistant
            timestamp: '2024-03-18T14:30:05Z'
            metadata: {}
    Error:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        status:
          type: string
          description: >-
            The HTTP status code applicable to this problem, expressed as a
            string value.
        code:
          type: string
          description: An application-specific error code, expressed as a string value.
        title:
          type: string
          description: A short, human-readable summary of the problem.
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        source:
          type: object
          properties:
            pointer:
              type: string
            parameter:
              type: string
        meta:
          type: object
          properties: {}
      example:
        id: not_found_error
        status: '404'
        code: '404'
        title: Not Found Error
        detail: The requested resource was not found
        source:
          pointer: /data/attributes/id
    SuperAgentMessage:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the message
        session_id:
          type: string
          description: ID of the session this message belongs to
        content:
          type: string
          description: The message content
        role:
          type: string
          description: The role of the message sender
          enum:
            - user
            - assistant
        timestamp:
          type: string
          description: When the message was created
          format: date-time
        metadata:
          type: object
          properties: {}
          description: Additional metadata associated with the message
      example:
        id: msg-uuid-123
        session_id: session-uuid-456
        content: Based on the Q1 data, revenue targets were met at 105%.
        role: assistant
        timestamp: '2024-03-18T14:30:00Z'
        metadata: {}
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header

````