The easiest way to figure this out would be to try unlisting and then listing a topic through the Discourse user interface while following the steps outlined in this guide: How to reverse engineer the Discourse API.
To automate the process via the API, you would need to setup a webhook to listen for post events. When you receive a webhook telling you that the first post in your embed category has been created, you would then send an API request to unlist the topic. When you receive a webhook telling you that the second post in a topic has been created, you would then send an API request to list the topic.
As was mentioned above, a better approach might be to have the topic automatically unlisted the first time a user clicks through to the topic from a blog site. That way the first user to leave a comment would not see the topic marked as unlisted. That would be somewhat more complex to setup, but it could be done through the API by listening for click events on links to your Discourse topics.