How to use the API to set a timer for a topic?

The best way to figure out how the API works is to follow Reverse engineer the Discourse API.

Note in the doc, the param is not “required”. It depends on the status_type.
You would need it if you use the publish_to_category type.

Auto-close 30 days will pass these params:
image

And returns this data:

3 Likes