---
title: "Update rooms' access key codes"
method: PUT
path: "/v2/reservations/bookings/{id}/keyCodes"
tags: ["Reservations"]
---

# Update rooms' access key codes

`PUT /v2/reservations/bookings/{id}/keyCodes`

Updates the access key codes of rooms belonging to a given booking.

## Path parameters

- `id` integer, required

## Request body

- LodgifyApiPublicReservationsModelsV2ReservationsBookingsBookingKeyCodeDto — Represents a Booking with the list of room types and keycodes to access to the properties rented.
  - `rooms` LodgifyApiPublicReservationsModelsV2ReservationsBookingsBookingRoomTypeKeyCodeDto[], nullable — List of room types of the booking.
    - `room_type_id` integer — Identifier of the room type
    - `key_code` string, nullable — KeyCode PIN to access to the property rented.

## Response `200`

Returns the updated booking

- LodgifyApiPublicReservationsModelsV2ReservationsBookingsBookingKeyCodeDto — Represents a Booking with the list of room types and keycodes to access to the properties rented.
  - `rooms` LodgifyApiPublicReservationsModelsV2ReservationsBookingsBookingRoomTypeKeyCodeDto[], nullable — List of room types of the booking.
    - `room_type_id` integer — Identifier of the room type
    - `key_code` string, nullable — KeyCode PIN to access to the property rented.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Booking or Room not found
- `500` — An error occurred in our side

---

[API](https://skmtc.net/lodgify/apis/lodgify-public-api-v1.md) · [All operations](https://skmtc.net/lodgify/apis/lodgify-public-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lodgify/lodgify-public-api-v1/revisions/ddf40757d411/schema)
