> ## 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.

# Today's check-in state

> Everything the home screen opens on, in one call: the day counter ("Gün 44"), the
seven-box week strip, the agenda with the expected time of each routine and today's
entries, the check-in streak, and which routine is next.

The agenda times are the defaults the design expects — 08:30 for the morning, 20:30
for the evening. They are advisory: a check-in saved at any hour still lands on its
day and type.



## OpenAPI

````yaml /api-reference/openapi.json get /api/checkins/today
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: system
    description: Health check
paths:
  /api/checkins/today:
    get:
      tags:
        - checkins
      summary: Today's check-in state
      description: >-
        Everything the home screen opens on, in one call: the day counter ("Gün
        44"), the

        seven-box week strip, the agenda with the expected time of each routine
        and today's

        entries, the check-in streak, and which routine is next.


        The agenda times are the defaults the design expects — 08:30 for the
        morning, 20:30

        for the evening. They are advisory: a check-in saved at any hour still
        lands on its

        day and type.
      operationId: getApiCheckinsToday
      responses:
        '200':
          description: Today's state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckInTodayResponse'
        '401':
          description: The token is missing, expired, or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CheckInTodayResponse:
      type: object
      properties:
        date:
          type: string
          description: Local Istanbul calendar date, `YYYY-MM-DD`. Today.
        dayNumber:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
          description: Days since sign-up, first day inclusive — "Gün 44".
        streak:
          type: object
          properties:
            current:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
              description: >-
                Consecutive check-in days. Still alive when the last entry is
                from yesterday; 0 once a day has been missed.
          required:
            - current
        week:
          type: array
          items:
            $ref: '#/components/schemas/CheckInWeekDay'
          description: The last seven days ending today — the checkbox strip.
        agenda:
          type: array
          items:
            $ref: '#/components/schemas/CheckInAgendaItem'
          description: Morning first, then evening.
        next:
          anyOf:
            - $ref: '#/components/schemas/CheckInType'
            - type: 'null'
          description: The first routine still open today. Null once both are done.
      required:
        - date
        - dayNumber
        - streak
        - week
        - agenda
        - next
    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.
    CheckInWeekDay:
      type: object
      properties:
        date:
          type: string
          description: Local Istanbul calendar date, `YYYY-MM-DD`.
        done:
          type: boolean
          description: Any completed check-in on the day.
        isToday:
          type: boolean
      required:
        - date
        - done
        - isToday
    CheckInAgendaItem:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CheckInType'
        time:
          type: string
          description: Local Istanbul wall clock, `HH:MM`. When the routine is expected.
        done:
          type: boolean
        checkIn:
          anyOf:
            - $ref: '#/components/schemas/CheckIn'
            - type: 'null'
          description: Today's entry, when it exists.
      required:
        - type
        - time
        - done
        - checkIn
    CheckInType:
      type: string
      enum:
        - morning
        - evening
      description: '`morning` is the Sabah Özeti, `evening` is the Akşam Z-Raporu.'
    ValidationIssue:
      type: object
      properties:
        path:
          type: string
          description: Dotted path to the offending field, empty at the root.
        message:
          type: string
      required:
        - path
        - message
    CheckIn:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        date:
          type: string
          description: Local Istanbul calendar date, `YYYY-MM-DD`.
        type:
          $ref: '#/components/schemas/CheckInType'
        mood:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
          description: '"Bugün nasıl geçti?" — 1 (worst) to 5 (best). Null when skipped.'
        feelings:
          type: array
          items:
            $ref: '#/components/schemas/CheckInFeeling'
          description: In the order the student tapped.
        summary:
          anyOf:
            - type: string
            - type: 'null'
          description: The free-text summary of the day.
        ready:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            The closing yes/no. Evening: "Yatmaya hazır hissediyor musun?",
            morning: "Güne hazır hissediyor musun?". Null when the student
            tapped "Atla ve kaydet".
        media:
          type: array
          items:
            $ref: '#/components/schemas/Media'
          description: Photos attached to the summary.
        source:
          type: string
          enum:
            - manual
            - call
            - chat
          description: '`call` or `chat` when Lala filled the entry from a conversation.'
        createdBy:
          type: string
          enum:
            - student
            - lala
        completedAt:
          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))$
          description: When the flow was first finished. Edits move `updatedAt`, not this.
        createdAt:
          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))$
        updatedAt:
          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))$
      required:
        - id
        - date
        - type
        - mood
        - feelings
        - summary
        - ready
        - media
        - source
        - createdBy
        - completedAt
        - createdAt
        - updatedAt
    CheckInFeeling:
      type: string
      enum:
        - brave
        - content
        - proud
        - loving
        - excited
        - calm
        - happy
        - motivated
        - grateful
        - relieved
      description: >-
        A feeling chip. Turkish labels, in order: Cesur, Memnun, Gururlu, Sevgi
        dolu, Heyecanlı, Sakin, Mutlu, Motive, Minnettar, Rahatlamış. On write,
        the Turkish name is accepted too.
    Media:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        kind:
          $ref: '#/components/schemas/MediaKind'
        mimeType:
          type: string
        sizeBytes:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        width:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        height:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        durationMs:
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        fileName:
          anyOf:
            - type: string
            - type: 'null'
        status:
          type: string
          enum:
            - pending
            - ready
          description: '`ready` when the bytes are in storage. Only ready media can be sent.'
        url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Short-lived signed URL, null while the media is pending. It expires
            — read the media or the message again for a new one. Do not cache
            it.
        urlExpiresAt:
          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'
        createdAt:
          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))$
      required:
        - id
        - kind
        - mimeType
        - sizeBytes
        - width
        - height
        - durationMs
        - fileName
        - status
        - url
        - urlExpiresAt
        - createdAt
    MediaKind:
      type: string
      enum:
        - image
        - audio
        - video
        - file
  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.