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

# Current Session

> Return the caller's session + responses, or null if they have none.



## OpenAPI

````yaml /openapi.json get /api/study/sessions/current
openapi: 3.1.0
info:
  title: HAI-Co² API
  description: Human-AI Co-Construction reference implementation.
  version: 0.1.0
servers:
  - url: https://haico.gr
    description: Production
  - url: https://dev.haico.gr
    description: Development
  - url: http://localhost:8000
    description: Local development
security: []
paths:
  /api/study/sessions/current:
    get:
      tags:
        - Study
      summary: Current Session
      description: Return the caller's session + responses, or null if they have none.
      operationId: current_session_api_study_sessions_current_get
      parameters:
        - name: study_code
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Study Code
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/StudyProgressResponse'
                  - type: 'null'
                title: Response Current Session Api Study Sessions Current Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    StudyProgressResponse:
      properties:
        session:
          $ref: '#/components/schemas/StudySessionSchema'
        responses:
          items:
            $ref: '#/components/schemas/SurveyResponseSchema'
          type: array
          title: Responses
      type: object
      required:
        - session
        - responses
      title: StudyProgressResponse
      description: >-
        The session plus the responses submitted so far (drives
        resume/progress).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StudySessionSchema:
      properties:
        id:
          type: integer
          title: Id
        study_code:
          type: string
          title: Study Code
        participant_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Participant Code
        condition_order:
          items:
            type: string
          type: array
          title: Condition Order
          default: []
        task_order:
          items:
            type: string
          type: array
          title: Task Order
          default: []
        counterbalance_index:
          type: integer
          title: Counterbalance Index
          default: 0
        current_step:
          type: string
          title: Current Step
        status:
          type: string
          title: Status
        started_at:
          type: string
          format: date-time
          title: Started At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        study_thread_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Study Thread Id
      type: object
      required:
        - id
        - study_code
        - current_step
        - status
        - started_at
      title: StudySessionSchema
      description: A study session as returned to the participant.
    SurveyResponseSchema:
      properties:
        id:
          type: integer
          title: Id
        instrument_id:
          type: string
          title: Instrument Id
        instrument_version:
          type: string
          title: Instrument Version
        condition:
          type: string
          title: Condition
        task_id:
          type: string
          title: Task Id
        answers:
          additionalProperties: true
          type: object
          title: Answers
        computed:
          additionalProperties: true
          type: object
          title: Computed
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
        submitted_at:
          type: string
          format: date-time
          title: Submitted At
      type: object
      required:
        - id
        - instrument_id
        - instrument_version
        - condition
        - task_id
        - answers
        - computed
        - submitted_at
      title: SurveyResponseSchema
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      description: >-
        A personal access token (`haico_pat_...`), created under Profile → API
        keys. Send it as `Authorization: Bearer <key>`. The browser session JWT
        is also accepted but is an internal mechanism and is not part of the
        public contract.
      scheme: bearer

````