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

# Modify active lock session

`PATCH /lkbx/session/current`

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

---

[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)
