I think the URL for replying to a topic via the API is /posts.json. When creating a reply, as opposed to when you’re creating a new topic, the topic_id is a required param.
Details are here: Discourse API Docs, but you can also just create a reply to a topic through your site’s UI and check the RequestURL that’s set in the “network” section of your browser’s web inspector.