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

# The relationship counters

> Counts over the whole time with Lala, for the BİRLİKTE chapter. One aggregate per
table, read-only.

`messages` counts both roles. `calls` and `callMinutes` count completed calls only.
`photosSolved` counts the distinct images the student attached to their own chat
messages: Lala reads every such photo, but nothing records whether it held a question
or whether the question was solved, so this is "photos sent", not a verdict. Photos on
check-ins and uploads never attached to a message do not count.

`firstMessageAt` is an instant. `firstDenemeAt` is the date the earliest paper was sat
and `firstStudyDate` the first plan date with a done block, both local Istanbul dates.



## OpenAPI

````yaml /api-reference/openapi.json get /api/journey/together
openapi: 3.1.0
info:
  title: Lala Client API
  description: >-
    The HTTP API behind Lala, the AI study companion for Turkish YKS and LGS
    students. This document is generated from the Zod schemas that validate each
    request at runtime. Do not hand-edit openapi.json. Student-visible text is
    Turkish. All identifiers are English.
  version: 1.0.0
servers:
  - url: https://client-api.lala.ist
    description: production
  - url: http://localhost:3000
    description: local dev
security:
  - supabaseJwt: []
tags:
  - name: chat
    description: The chat stream, the message history, and reactions
  - name: media
    description: Upload and read message attachments
  - name: plan
    description: The study planner — blocks of work on a day
  - name: journey
    description: Deneme results, topic performance, study-hours stats, and the streak
  - name: profile
    description: The student profile and onboarding
  - name: devices
    description: Push notification devices
  - name: notifications
    description: Replies typed into a push notification, authenticated by its reply token
  - name: system
    description: Health check
paths:
  /api/journey/together:
    get:
      tags:
        - journey
      summary: The relationship counters
      description: >-
        Counts over the whole time with Lala, for the BİRLİKTE chapter. One
        aggregate per

        table, read-only.


        `messages` counts both roles. `calls` and `callMinutes` count completed
        calls only.

        `photosSolved` counts the distinct images the student attached to their
        own chat

        messages: Lala reads every such photo, but nothing records whether it
        held a question

        or whether the question was solved, so this is "photos sent", not a
        verdict. Photos on

        check-ins and uploads never attached to a message do not count.


        `firstMessageAt` is an instant. `firstDenemeAt` is the date the earliest
        paper was sat

        and `firstStudyDate` the first plan date with a done block, both local
        Istanbul dates.
      operationId: getApiJourneyTogether
      responses:
        '200':
          description: The counters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JourneyTogether'
        '401':
          description: The token is missing, expired, or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    JourneyTogether:
      type: object
      properties:
        daysTogether:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Days since sign-up, first day inclusive.
        messages:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Every message in the thread, both roles.
        calls:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Voice calls that ended normally.
        callMinutes:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Total length of those calls, in minutes, rounded once over the sum.
        photosSolved:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: >-
            Distinct images the student attached to their own chat messages.
            Lala reads every such photo, but nothing records whether it held a
            question or whether it was solved.
        firstMessageAt:
          anyOf:
            - type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            - type: 'null'
          description: >-
            The first message in the thread, either role. Null before any
            message.
        firstDenemeAt:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The date of the earliest deneme sat, `YYYY-MM-DD`. Null before any
            paper.
        firstStudyDate:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The first plan date with a done block, `YYYY-MM-DD`. Null before
            any.
      required:
        - daysTogether
        - messages
        - calls
        - callMinutes
        - photosSolved
        - firstMessageAt
        - firstDenemeAt
        - firstStudyDate
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        issues:
          description: >-
            Present only on a 400 raised by request validation, capped at 10
            entries. Every other error carries `error` alone.
          type: array
          items:
            $ref: '#/components/schemas/ValidationIssue'
      required:
        - error
      description: Error body. `error` is a short English string.
    ValidationIssue:
      type: object
      properties:
        path:
          type: string
          description: Dotted path to the offending field, empty at the root.
        message:
          type: string
      required:
        - path
        - message
  securitySchemes:
    supabaseJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Supabase access token: `Authorization: Bearer <token>`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.