This depends on the implementation of the game in the browser.
The API is likely a RESTful API and the format for data exchange is likely JSON.
A modern full stack web development course will often cover both of these subjects.
In terms of reverse engineering the API itself, there's not a huge challenge. Restful APIs and JSON are chosen because they're easy ...
There is a ghidra_script that current does this, see https://github.com/NationalSecurityAgency/ghidra/blob/master/Ghidra/Features/Base/ghidra_scripts/MarkCallOtherPcode.java
op = getInstructionAt(toAddr(0x1b034)).getPcode()