Well, this is embarrassing, minutes later I found this https://community.meraki.com/t5/Solutions-APIs/Attempting-to-Change-PSK-of-SSID-with-Meraki-API-via-Powershell/m-p/23954#M528 I changed the url from 'https://api.meraki.com/....' to 'https://nXXX.meraki.com/....' and it works.
... View more