At this time, please note that custom scripting and programming-related inquiries fall outside the scope of the technical assistance we provide. Perhaps some users with technical knowledge of scripting may be able to help you, or you may opt for using tools such as ChatGPT.
I just want to make clear that it has nothing to do with the script since all other setting updates that I tried works just fine.
The problem is that the Teltonica Web API for sms_utilities role does not accept a payload with the customer script key ‘script’ included. The documentation shows that it shall be a string value but when sending that you get Error 422 back.
So either it is something missing in the documentation or a bug when adding or updating a rule of type action.
To confuse with the Python code I shall reproduce it with curl to show what is working and what is not working.
I don’t have a custom script to test this with, but I tried putting in the rule via a simple api call through the SSH, and seems like I was successful: