It works for me - somewhere on this forum I’ve done this for Python or PHP which is just the delivery mechanism, the JSON & API calls are the same: Registering a sensor in an TTN application via API - #33 by descartes
You may need to understand the difference between the different fields: https://www.thethingsindustries.com/docs/devices/mac-settings/
This may be of help: https://www.thethingsindustries.com/docs/getting-started/api/#multi-step-actions