This is not currently possible with the API. The API is event driven, which means there would need to be an event like on('beginMove:token',...), which does not exist. Furthermore, since the API is very much "action at a distance", it would be unlikely such an event would be satisfactory. In all likelihood, the event would fire, but a response to it would be so far behind the action (because of network latency, timesharing of processing, time to process, database lookups, etc), that you would end up with slingshotting and other weird temporal results. The workaround I would suggest would be to break up the actions into events that are supported. I can't speak to specifics for your case, but just imagining something where the rotation of a post (like a lever in Prince of Persia or a turnstile sort of thing) which causes changes to something like which doors are open in a passage, you might divide this into several api command which could be applied with buttons: !action grasp @{target|token_id} !action rotate-cw @{target|token_id} !action rotate-ccw @{target|token_id} !action release @{target|token_id} The player might then click various buttons from a menu that is whispered to them in chat: [Rotate CW] [Rotate CCW] [Release] to cause small changes on the tabletop and resultant effects to the doors or whatever is linked. Your starting action might be the only one that requires targeting, you could imagine a macro named "Grasp" that is shared with players: /em grasps the @{target|token_name}.
!action grasp @{target|token_id} And the menu whispered to them wouldn't need to change or be resent: [Rotate CW](!action rotate-cw -JK1s4lk1234) [Rotate CCW](!action rotate-ccw -JK1s4lk1234) [Release](!action release -JK1s4lk1234) That would be my approach.