---
title: "Update lock code (admin)"
method: PATCH
path: "/admin/bikes/{bikeNumber}/lock-code"
---

# Update lock code (admin)

`PATCH /admin/bikes/{bikeNumber}/lock-code`

## Path parameters

- `bikeNumber` integer, required

## Request body

- object
  - `code` string, required

## Response `200`

Success response envelope

- SuccessEnvelope
  - `data` unknown, required
  - `meta` ResponseMeta, required
    - `requestId` string, required
    - `timestamp` string, date-time, required

## Other responses

- `400` — Problem details response

## Changes

- **2026-06-01** `7e039877b813` — 2 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `params` to the response with the `400` status
- **2026-02-28** `832c7fc616ed` — 2 warning
  - removed the optional property `code` from the response with the `400` status
  - removed the optional property `params` from the response with the `400` status

[Change history](https://skmtc.dev/cyklokoalicia/apis/opensourcebikeshare-api/changes/admin/bikes/:bikeNumber/lock-code/patch.md)

---

[API](https://skmtc.dev/cyklokoalicia/apis/opensourcebikeshare-api.md) · [All operations](https://skmtc.dev/cyklokoalicia/apis/opensourcebikeshare-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cyklokoalicia/opensourcebikeshare-api/revisions/5acb23b38232/schema)
