I've done many projects based on interaction with pokerstars, from hand history grabber to OCR, cards scans etc...
I did many bots that are currently in the wild. Since you wrote about Windows API, I guess you know about DLL invoke, user32 etc... yes, it is one of the possible way to do it and I'm an expert when it comes to automation, DLL injection etc...
Hope to work for you soon.
Merci