Update existing users smartlock auth


The process is connected to a booking system which creates a user and adds the smart lock auth via put. Then when the same user books again it should update his access such that he doesn’t have to do anything in the app.

Here is one of the many trys to update the smart lock auth, unfortunately i always get a 422, The server understands the content type of the request entity and the syntax of the request entity is correct but was unable to process the contained instructions…
curl -X POST --header ‘Content-Type: application/json’ --header ‘Authorization: Bearer XXXXX’ --header ‘Accept: application/json’ -d ‘[{ \
“name”: “string”, \
“allowedFromDate”: “2021-04-18T13:30:16.323Z”, \
“allowedUntilDate”: “2021-04-18T13:45:16.323Z”, \
“allowedWeekDays”: 127, \
“allowedFromTime”: 0, \
“allowedUntilTime”: 0, \
“accountUserId”: XXX, \
“enabled”: true, \
“remoteAllowed”: true, \
}’ ‘https://api.nuki.io/smartlock/XXX/auth/XXX

What would be the best way to update the acces of a user via app to a smart lock