---
title: "Modify active lock session"
method: PATCH
path: "/lkbx/session/current"
tags: ["Lock Sessions"]
---

# Modify active lock session

`PATCH /lkbx/session/current`

## Request

- Base URL: `https://dashboard.researchanddesire.com/api/v1`
- URL: `https://dashboard.researchanddesire.com/api/v1/lkbx/session/current`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `/oauth/authorize`
    - Token URL: `/oauth/token` scopes: `lkbx:control`

Modify the duration of the active lock session. Only keyholders or
test lock owners can modify sessions (self-lock owners may only
extend, never shorten).

Provide either `duration` (absolute new duration in seconds) **or**
`durationChange` (relative delta in seconds — positive to add time,
negative to subtract). The delta form is intended for game / external
integrations that want to add or remove time without first fetching
the current session.

## Request body

- union: Provide exactly one of `duration` (absolute) or `durationChange` (delta). Mixing both, or providing neither, returns 400.
  - object
    - `duration` integer, required: New absolute duration in seconds.
    - `durationChange` integer: Delta in seconds, added to the current duration. Positive to extend the lock, negative to shorten. The resulting duration must be > 0; use the `unlock` action to end the lock.
    - `targetUserId` integer: User whose session to modify (defaults to authenticated user)
  - object
    - `duration` integer: New absolute duration in seconds.
    - `durationChange` integer, required: Delta in seconds, added to the current duration. Positive to extend the lock, negative to shorten. The resulting duration must be > 0; use the `unlock` action to end the lock.
    - `targetUserId` integer: User whose session to modify (defaults to authenticated user)

## Response `200`

Lock session updated

- ModifyLockSessionResponse
  - `ok` true, required
  - `data` object, required
    - `id` integer
    - `duration` integer
    - `endDate` string, date-time
    - `lockState` string
    - `isActive` boolean

## Other responses

- `400`: Invalid request
- `401`: Authentication required or token invalid
- `403`: Not authorized to modify
- `404`: No active session or user not found

## Changes

- **2026-09-22** `2411203b3c10`: 2 info
  - the endpoint scheme security `bearerAuth` was added to the API
  - the endpoint scheme security `oauth2` was added to the API

[Operation history](https://skmtc.dev/researchanddesire/apis/research-and-desire-api/changes/lkbx/session/current/patch.md)

---

[API](https://skmtc.dev/researchanddesire/apis/research-and-desire-api.md) - [All operations](https://skmtc.dev/researchanddesire/apis/research-and-desire-api/llms.txt) - [OpenAPI document](https://skmtc.dev/researchanddesire/apis/research-and-desire-api/revisions/682fc4d7f6d5?raw)
