# Webhook for draft posts & pages

**URL:** <https://forum.ghost.org/t/webhook-for-draft-posts-pages/30385>\
**Category:** Developer help\
**Created:** [May 26, 2022, 10:05am UTC](https://forum.ghost.org/t/webhook-for-draft-posts-pages/30385 "2022-05-26T10:05:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [May 26, 2022, 10:05am UTC](https://forum.ghost.org/t/webhook-for-draft-posts-pages/30385/1 "2022-05-26T10:05:07Z")

</div>

I’m running Ghost v4 on the Ghost(Pro) platform and I’m looking to find a way to get notified when a draft post and page is created, edited and deleted.

[There’s quite a few Webhook options](https://ghost.org/docs/webhooks/#available-events) in Ghost but none that appear to listen out for draft posts and pages. At present I’m using the Content API for generating my site. However I’d like to set up a preview instance which will show draft posts for previewing. I’ve gotten the Admin API working and generating posts as well as pages, however I need to have a method of triggering a redeploy when a draft is created, edited and deleted. Is there a Webhook that already does this? Is there some sort of work around? Finally question, could something like this be added? Granted it’s a very specific use case, but maybe it’s useful for some people.

Anywho, thanks for reading!

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [May 26, 2022, 10:39am UTC](https://forum.ghost.org/t/webhook-for-draft-posts-pages/30385/2 "2022-05-26T10:39:09Z")

</div>

The `post.{added,edited,deleted}` web hooks will fire for all posts. In the payload you can look at the `status` property if there are specific statuses you want to filter by. Does that work for you?

---

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [May 26, 2022, 11:58am UTC](https://forum.ghost.org/t/webhook-for-draft-posts-pages/30385/3 "2022-05-26T11:58:22Z")

</div>

Oh it does? I should’ve checked that one a bit more, I assumed the `Site changed (rebuild)` webhook would cover literally all events. I’ll take a closer look! Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Kevin](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/kevin/32/32_2.png) [@Kevin](https://forum.ghost.org/u/Kevin)\
**Post date:** [May 26, 2022, 12:10pm UTC](https://forum.ghost.org/t/webhook-for-draft-posts-pages/30385/4 "2022-05-26T12:10:09Z")

</div>

`Site changed (rebuild)` doesn’t cover drafts because changes to those don’t actually cause a site to change 🙂 If it did fire on drafts it would also fire _a lot_ because drafts autosave constantly which is probably not what you want when triggering a production static site build.

Webhooks for specific actions on resources will always occur, whether they cause the site to change or not.

---

<div class="post-metadata">

**Author:** ![DavidDarnes](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/daviddarnes/32/3533_2.png) [@DavidDarnes](https://forum.ghost.org/u/DavidDarnes)\
**Post date:** [May 26, 2022, 3:06pm UTC](https://forum.ghost.org/t/webhook-for-draft-posts-pages/30385/5 "2022-05-26T15:06:10Z")

</div>

They worked! Thanks Kevin ❤
