When you call one of the API methods in the APICO Modding API you are actually just directly calling a GML script inside GameMaker.
This repo contains all the GML scripts for each of the API methods - it's here in case you want to double check the arguments or an error as there might be an issue with the documentation, or maybe just curious on how it all works!
Pls don't judge me I wrote all of this code in mostly 2 days straight through a haze of caffeine