---
title: "Get latest lock session"
method: GET
path: "/lkbx/sessions/latest"
tags: ["Lock Sessions"]
---

# Get latest lock session

`GET /lkbx/sessions/latest`

Returns the most recent lock session with all segment history. Returns null if no sessions exist.

## Response `200`

Latest session or null

- LatestLockSessionResponse
  - `ok` true, required
  - `data` LockSessionDetail
    - `id` integer — Session ID
    - `bubbleId` string — Unique public identifier
    - `publicId` string — Public session ID
    - `ownerId` integer — Owner user ID
    - `name` string — Session name
    - `lockState` 'pending' | 'locked' | 'completed' | 'abandoned' | 'break' — Current lock state
    - `duration` integer — Lock duration in seconds
    - `startDate` string, date-time, nullable — Session start time
    - `endDate` string, date-time, nullable — Session end time
    - `isActive` boolean — Whether session is active
    - `createdAt` string, date-time — Creation timestamp
    - `keyholderIds` integer[] — IDs of the users assigned as keyholders for this session. An empty array means a self-lock (no keyholder). Resolve IDs to usernames via the Users endpoints.
    - `LockSegment` LockSegment[]
      - `id` integer
      - `type` string — Segment type (start, locked, break, unlocked)
      - `createdAt` string, date-time
      - `isLocked` boolean — Lock state during segment
  - `message` string — Message when no sessions found

## Other responses

- `401` — Authentication required or token invalid
- `500` — Internal server error

---

[API](https://skmtc.net/researchanddesire/apis/research-and-desire-api.md) · [All operations](https://skmtc.net/researchanddesire/apis/research-and-desire-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/researchanddesire/research-and-desire-api/revisions/9c6dc82bb579/schema)
