# A webhook to send a notification when a category is created/modified/deleted?

**URL:** https://meta.discourse.org/t/a-webhook-to-send-a-notification-when-a-category-is-created-modified-deleted/77335
**Category:** WordPress
**Created:** [January 5, 2018, 9:21pm UTC](https://meta.discourse.org/t/a-webhook-to-send-a-notification-when-a-category-is-created-modified-deleted/77335 "2018-01-05T21:21:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [January 5, 2018, 9:21pm UTC](https://meta.discourse.org/t/a-webhook-to-send-a-notification-when-a-category-is-created-modified-deleted/77335/1 "2018-01-05T21:21:27Z")

</div>

Hi.  
Is such a thing possible?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [January 6, 2018, 12:00am UTC](https://meta.discourse.org/t/a-webhook-to-send-a-notification-when-a-category-is-created-modified-deleted/77335/2 "2018-01-06T00:00:44Z")

</div>

I’m sure it’s possible, but I don’t know if it’s a priority. Right now the wp-discourse plugin refreshes categories by having an administrator of the site click on a Force Category Update checkbox on the Publishing settings tab. This is efficient, but could lead to confusion if categories are added to Discourse but not refreshed on WordPress. If a webhook was available, it would just setup a route for the webhook, and refresh the categories when they change.

If the plugin you are working on works in conjunction with the wp-discourse plugin, you can access the Discourse categories with `WPDiscourse\Utilities\Utilities::get_discourse_categories()`.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [January 6, 2018, 10:21am UTC](https://meta.discourse.org/t/a-webhook-to-send-a-notification-when-a-category-is-created-modified-deleted/77335/3 "2018-01-06T10:21:53Z")

</div>

Hi,  
Thank you for your reply. My plugin doesn’t work in conjunction with WP-Discourse.

edit: it seems not too complicated to code a custom webhook, I shall look at this way.
