---
title: "Lock or unlock"
method: POST
path: "/lkbx/session/current"
tags: ["Lock Sessions"]
---

# Lock or unlock

`POST /lkbx/session/current`

Start a new lock session or complete (unlock) the active session. User IDs (target and keyholders) are validated against your accessible users before the action is performed.

## Request body

- LockUnlockRequest
  - `action` 'lock' | 'unlock', required — Action to perform
  - `lockSettingsId` integer — Lock template ID (for lock action)
  - `keyholderIds` integer[] — User IDs to assign as keyholders (for lock action). All IDs must be users you have access to.
  - `targetUserId` integer — User to lock/unlock (defaults to authenticated user). Must be a user you have access to.
  - `isTestLock` boolean — Override test lock setting from template. When true, the lock owner can unlock without a keyholder. Only used with lock action.

## Response `200`

Lock session completed

- UnlockSuccessResponse
  - `ok` true, required
  - `data` object, required
    - `message` string, required

## Other responses

- `201` — Lock session created
- `400` — Invalid request or operation failed
- `401` — Authentication required or token invalid
- `403` — Inaccessible user ID
- `404` — User not found

---

[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/versions/9c6dc82bb579/schema)
