Nuki api trying to delete the created code from nuki

:bullseye: What is your goal?

Create a one-time access PIN in Nuki via API after Stripe checkout,
store the authorization ID, and automatically revoke/delete it after a fixed time window.

:thinking: What is the problem & what have you tried?

hello sorry im begginer.
i succesfully created and managed to get it into the nuki, so the code is saved, but i cant delete it afterwards, i cant find enywhere the right id to the created code, in the data i dont know how to filter it, i tried iterator with filter but it doesnt work, i

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

Hello,

According to the documentation, the response should contain the parameter id:

[
  {
    "name": "string",
    "allowedFromDate": "2026-01-26T01:31:19.375Z",
    "allowedUntilDate": "2026-01-26T01:31:19.375Z",
    "allowedWeekDays": 127,
    "allowedFromTime": 0,
    "allowedUntilTime": 0,
    "accountUserId": 0,
    "enabled": true,
    "remoteAllowed": true,
    "code": 0,
    "id": "string"
  }
]

If you are using a POST request to the /smartlock/auth endpoint, the output should contain only one array, so there is no need to use an iterator.
If you are using GET - the documentation states that /smartlock/auth will return a list of smartlock authorizations, so you will have to use an iterator and then filter which one you want to work with.

Please reffer to Nuki’s API docs: Swagger UI

In your post you asked:

automatically revoke/delete it after a fixed time window.

You can do this using allowedUntilDate in your request body or create another request using the DELETE endpoint.

The tricky part is that DELETE works immediately, so it should be triggered after the expected time window.
Therefore, you’ll probably need to build a more complex workflow using a database that stores your IDs and their revoke times, and triggers deletion when needed. There are a few approaches: using a CRON-enabled datastore, using Make’s built-in database with a polling scenario that runs every few minutes, or using a third-party service like 0CodeKit which offers a scheduled webhooks service.

1 Like