The entire Discourse platform uses the API, so if you watch what the web application does, you can see what API calls to make. Which is where the Dev Tools/Console comes in play on your browser.