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

**URL:** <https://meta.discourse.org/t/how-to-use-the-api-to-set-a-timer-for-a-topic/353494>\
**Category:** Development\
**Created:** [February 21, 2025, 4:18am UTC](https://meta.discourse.org/t/how-to-use-the-api-to-set-a-timer-for-a-topic/353494 "2025-02-21T04:18:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**Post date:** [February 21, 2025, 6:10am UTC](https://meta.discourse.org/t/how-to-use-the-api-to-set-a-timer-for-a-topic/353494/3 "2025-02-21T06:10:01Z")

</div>

> [@Arkshine](#):
>
> The best way to figure out how the API works is to follow [Reverse engineer the Discourse API](https://meta.discourse.org/t/reverse-engineer-the-discourse-api/20576).

Ah I keep forgetting about that 🙈

> [@Arkshine](#):
>
> 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.

I kept getting an error about selecting a sub-category, and I remembered that we changed the text for `invalid_access` as we have things set up so most categories that can be posted in are sub-categories (and people kept trying to post in a parent category). So with invalid access I just needed to change to a user with mod permissions… and it works now, thanks! 👍

---

_[View the full topic](https://meta.discourse.org/t/how-to-use-the-api-to-set-a-timer-for-a-topic/353494)._
