This question is still too broad to be answered properly: a “Discourse integration” can mean all sorts of things.
About the Discourse API, there’s this API Documentation, but you can also reverse-engineer any operation using the Network tab and try to reproduce the requests you see there on your own app.