portals2 unfortunately we don't have any extensive documentation on the REST API right now.
The best is to create a discussion via the web interface and look at the payload in the browser network tab. The payload follows the JSON:API spec and should be relatively easy to replicate from a script.