Skip to content

Key API Concepts

The base URL for our API is https://api.nuki.io

Each endpoint is appended directly to the base URL, e.g. https://api.nuki.io/smartlock

The Nuki REST API is asynchronous.

POST, PUT and DELETE requests will return a 200 or 204 response if the request payload was successfully validated. This does not mean that the action was successfully executed.

Once the server has received your API request, it will begin the process of obtaining a connection to the relevant Smart Lock, Smart Door or Opener, and will then execute the API request. This can sometimes take up to several seconds due to waking the device from a low power state, as well as any potential connectivity issues in the recipient device’s network.

GET requests are an exception. They will fetch the relevant data from the server and will return this data to you synchronously in the request body alongside a 200 status code.

How can you check the status of your POST, PUT and DELETE requests? There are 2 options at your disposal:

  • Querying the relevant endpoint with a GET request to check if your action was successfully executed
  • Use webhooks to be receive trigger notifications of any changes

Smartlocks and other devices require an internet connection to interact with the REST API.

Newer Smart Locks connect directly to the internet via the internal Wi-Fi antenna. If you haven’t already done so, you can configure the Wi-Fi settings of your device in the smartphone app.

Some older Smart Locks will require a bridge to connect to the internet. A bridge connects to the internet and relays communication to the connected devices via Bluetooth. The Opener requires a bridge if you wish to manage and operate it remotely.

Devices are operated via the “smartlock” endpoint

Section titled “Devices are operated via the “smartlock” endpoint”

All Nuki devices are operated via the /smartlock endpoint, regardless of whether the device is a Smart Lock, Smart Door or Opener. That means if you want to fetch the configuration of a device or send a request to unlock/open, you always do so via the /smartlock endpoint.

The following types refer to the type property returned in the smartlock endpoint:

typeDevice
0Smart lock (1st/2nd Gen.)
1Box
2Opener
3Smart door
4Smart lock (3rd/4th Gen.)
5Smart lock (5th Gen., Go/Pro/Ultra)

A detailed overview of our Smart Lock generations can be found in our help center.

Nuki uses a mixture of hexadecimal (hex) and integer IDs.

The Nuki REST API only uses integer IDs. If you are solely operating within the confinds of Nuki Web and the REST API, then you will only interact with integers. If you are looking at a specific Smart Lock ID in Nuki Web, you will find its ID in the URL.

You will find Hex IDs are used within the smartphone applications; you will first need to convert these to integers.

To find the Hex ID, open the Nuki app and tap on the desired device. Then open the device settings and navigate to “Features & Configuration” > “General”.

Your HEX ID will look like so: 1A2B3C4D

Prior to converting, we need to prepend the device type to the HEX ID.

typeDevice
0Smart lock (1st/2nd Gen.)
1Box
2Opener
3Smart door
4Smart lock (3rd/4th Gen.)
0Smart lock (5th Gen., Go/Pro/Ultra)

For example, if your device is one of the newest Smart Locks, you would prepend 5 to your ID, like so: 51A2B3C4D

You can then use a calculator to convert the HEX ID to a decimal/integer, resulting in an ID like this: 21913877581. You can now use this ID in your REST API requests.

Smartlocks and keypads have a limit on the number of authorizations that they can store.

Older devices can store 100 authorizations, whereas newer devices can store 200 authorizations.

Consider in your implementation to delete non-used and expired authorizations.

When a keypad is connected to a device, you can create keypad codes to grant access instead of normal app invites.

A keypad code:

  • is 6-digits in length
  • uses the numbers 1-9 (cannot contain 0)
  • cannot start 12
  • must be unique on that keypad

The below refer to the state object which is returned in the smartlock endpoint response. Devices return a “state” object which provides you some information about the current state of the device, such as whether the door is unlocked.

The current operating mode of the device.

modeSmart lock / Smart doorOpener
0UnitializedUnitialized
1PairingPairing
2Door (Default)Door (Default)
3Failure *Continuous
4MaintenanceMaintenance
5Test *N/A

* Smart door only

The current state of the device.

stateSmart lock / Smart doorOpener
0Uncalibrated / Not activatedUntrained
1LockedOnline
2UnlockingN/A
3Unlocked”Ring to Open” active
4LockingN/A
5UnlatchedOpen
6Unlocked (Lock’n’go)N/A
7UnlatchingOpening
253Boot runBoot run
254Motor blockedN/A
255UndefinedUndefined

The action which caused the state to change

triggerSmart lock / Smart doorOpener
0System (Bluetooth)System (Bluetooth)
1ManualManual
2ButtonButton
3AutomaticAutomatic
4N/AN/A
5N/AN/A
6Auto Lock *Continuous mode
7External Accessory *N/A

* Smart door only

The previous action that was performed on this device

lastActionSmart lock / Smart doorOpener
1UnlockActivate “Ring to open”
2LockDeactivate “Ring to open”
3UnlatchElectric Strike Actuation
4Lock’n’goN/A
5Unlatch with Lock’n’goN/A
6N/AActivate “Continuous Mode”
7N/ADeactivate “Continuous Mode”

This value represents the current state of the door

doorStateSmart lock
0Unavailable (i.e. no door sensor installed)
1Deactivated
2Door closed
3Door open
4Unknown
5Calibrating

If you do not wish to use the simplified endpoints to lock or unlock your devices, you can define the following actions in the request body

ActionSmart lock, Smart doorOpenerBox
1UnlockActivate Ring to OpenUnlock
2LockDeactivate Ring to OpenN/A
3UnlatchElectric Strike ActuationN/A
4Lock’n’goN/AN/A
5Unlatch with Lock’n’goN/AN/A
6N/AActivate Continuous ModeN/A
7N/ADeactivate Continuous ModeN/A

Weekdays are set via bitmask values. Weekdays are specified when creating smart lock authorizations that are restricted to certain days of the week.

WeekdayBitmaskValue
Monday0100000064
Tuesday0010000032
Wednesday0001000016
Thursday000010008
Friday000001004
Saturday000000102
Sunday000000011

To specify a single day, pass the value of that day. For example, granting access on a Wednesday would require a value of 16.

To specify a range, or a combination of days, add those days together

  • Monday & Thursday: 64 + 8 = 72
  • Monday - Friday: 64 + 32 + 16 + 8 + 4 = 124
  • All week: 127 (alternatively do not set the allowedWeekDays value)

All date and time values in our REST API are Coordinated Universal Time (UTC). They are passed in the following format:

YYYY-MM-DDT00:00:00.000Z

Here is excerpt from our smarlock/auth endpoint as an example:

"allowedFromDate": "2025-06-16T10:30:00.000Z"

Each device also supports a time zone. The user generally sets this time zone via the smartphone app while installing their smart lock. The list of IDs and their applicable offsets from UTC are displayed in the table below.

As a general rule, you shouldn’t update this time zone for a user’s device. This value only serves as a reference value, so that you can convert the UTC time into a time value appropriate to the user’s time zone in your application interface. These time zone values are set as an ID.

Helpers:

  • Offset: The time offset from Coordinated Universal Time (UTC); multiple values provided for those time zones supporting DST
  • DST: Whether this time zone supports Daylight Saving Time
IDTime ZoneOffsetDST
0Africa/CairoUTC+2no
1Africa/LagosUTC+1no
2Africa/MaputoUTC+2no
3Africa/NairobiUTC+3no

When defining the from (allowedFromTime) and to (allowedUntilTime) values for a smart lock authorisation, the values are defined in minutes since midnight.

Example: You wish to allow access between 09:00 and 17:00.

09:00 is 9 hours past midnight, therefore 9 * 60 = 540. 17:00 is 1,020 minutes past midnight.

Paraphrasing the payload of the request, you would therefore send these values as follows:

{
// ...
"allowedFromTime": 540,
"allowedUntilTime": 1020,
// ...
}

We currently support devices for the following markets:

  • EU
  • Switzerland
  • Nordics (Denmark, Sweden, Norway)
  • United States of America

Smartlocks in each of these regions have different properties and mounting flows beyond the scope of this REST API documentation.

The functionality differences of these regions are as follows

  • EU, Switzerland & Nordics
    • Full functionality
  • United States of America
    • These devices do not support unlatch (the final, short turn which pulls the latch, opening the door)
    • Unlatch commands to these devices will return a 400 bad request error; use unlock instead