Where have you looked for information so far?
All that you need is available via our developer site.
Here’s the guide to the Direct Message API. You should ensure that you are using the most recent version of the API and not the endpoints that are being removed soon.
If you want to consume the incoming messages in real-time you’ll need to apply for access to the new Account Activity API here. Pricing for the premium offering with more subscriptions has not yet been announced. You can still develop against the Direct Message API without using the Account Activity API, but will need to poll for incoming messages rather than receiving them via webhooks.