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

# Get message details

> Retrieves details of a specific message, including sibling IDs for branching.



## OpenAPI

````yaml /api-reference/openapi.en.json get /agent-sessions/{session_id}/messages/{message_id}
openapi: 3.1.0
info:
  title: UBIK Public API
  description: Publicly accessible API endpoints for UBIK.
  version: '1.0'
servers:
  - url: https://app.ubik-agent.com/api/v1
    description: Production Server
security: []
paths:
  /agent-sessions/{session_id}/messages/{message_id}:
    get:
      tags:
        - Public API
        - Public API - Agent Sessions
      summary: Get message details
      description: >-
        Retrieves details of a specific message, including sibling IDs for
        branching.
      operationId: >-
        get_message_details_agent_sessions__session_id__messages__message_id__get
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Session Id
        - name: message_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Message Id
        - name: X-End-User-ID
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-End-User-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicAgentMessage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PublicAgentMessage:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique identifier for the message.
        role:
          type: string
          title: Role
          description: Role of the message sender (user, assistant, system).
        content:
          type: string
          title: Content
          description: Content of the message.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Creation timestamp.
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
          description: ID of the parent message.
        sibling_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Sibling Ids
          description: IDs of other messages that share the same parent (branches).
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
          description: The ID of the task processing this message (if applicable).
        stream_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Stream Url
          description: URL to stream events for this task.
      type: object
      required:
        - id
        - role
        - content
        - created_at
      title: PublicAgentMessage
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY

````