I tested all the success actions and the culprit is setting this "chat_id" variable in the success actions, which is also used in the body of the request. The API call works perfectly when I am not setting this specific variable, it does not work when setting this variable.
Normally chat_id is based on the outcome of the API call, but for testing I changed it to be static and it is still corrupting the API call.
I still do not understand why it only happens the first time I execute the API after a reload. It is also interfering when it is not null, so that cannot be the reason..