hAP ax3 - how to use the API to control ithe router remotely - Can serial port on board be used?

Nope, AFAIK:
http://forum.mikrotik.com/t/no-terminal-output-on-serial-port/110132/1

But while I do understand how having something disabled and that cannot be enabled to be an obstacle in some corner/edge cases, I cannot see why in your specific case you would want to use the more complex way to do something (as simple as wifi on/off) that you can do normally from the ethernet connection.

If Wifi on/off is all you need (or a handful of commands), I would rather make use of a script for the “Mode” button.

Then use a robotic arm to press it :open_mouth: or more simply connect two wires in parallel to it :wink: , since you are willing to void the warranty by modifying the device.