# Post event webhook does not indicate post was deleted

**URL:** https://meta.discourse.org/t/post-event-webhook-does-not-indicate-post-was-deleted/121356
**Category:** Bug
**Created:** [June 26, 2019, 5:55am UTC](https://meta.discourse.org/t/post-event-webhook-does-not-indicate-post-was-deleted/121356 "2019-06-26T05:55:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Mark\_Schmucker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_schmucker/32/124810_2.png) [@Mark\_Schmucker](https://meta.discourse.org/u/Mark_Schmucker)
#### Post date: [June 26, 2019, 5:55am UTC](https://meta.discourse.org/t/post-event-webhook-does-not-indicate-post-was-deleted/121356/1 "2019-06-26T05:55:19Z")

</div>

I have a webhook handling post events, but if I delete a post, there is nothing that indicates deletion. I expected one of these fields to tell me it was deleted:

```
post {
           u'deleted_at': None,
           u'hidden': False,
           u'user_deleted': False,
           ...
}

```

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [June 28, 2019, 5:35pm UTC](https://meta.discourse.org/t/post-event-webhook-does-not-indicate-post-was-deleted/121356/2 "2019-06-28T17:35:54Z")

</div>

@justin can you reproduce?

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [June 28, 2019, 6:55pm UTC](https://meta.discourse.org/t/post-event-webhook-does-not-indicate-post-was-deleted/121356/4 "2019-06-28T18:55:53Z")

</div>

Yeah - I can.

I just deleted one on a locked category on a site of mine. A webhook was generated, but it does not indicate the post was deleted in the payload, only the header.

Headers:

```plaintext
Request URL: xxxxxxx
Request method: POST
Accept: */*
Connection: close
Content-Length: 880
Content-Type: application/json
Host: hooks.zapier.com
User-Agent: Discourse/2.4.0.beta1
X-Discourse-Instance: xxxxxxx
X-Discourse-Event-Id: 6334
X-Discourse-Event-Type: post
X-Discourse-Event: post_destroyed

```

Payload:

```plaintext
{
  "post": {
    "id": 11702,
    "name": "Justin DiRose",
    "username": "justindirose",
    "avatar_template": "/user_avatar/xxxxxxxx/justindirose/{size}/1795_2.png",
    "created_at": "2019-06-28T18:50:55.078Z",
    "cooked": "<p>A new post here. Just for tests.</p>",
    "post_number": 2,
    "post_type": 1,
    "updated_at": "2019-06-28T18:50:55.078Z",
    "reply_count": 0,
    "reply_to_post_number": null,
    "quote_count": 0,
    "incoming_link_count": 0,
    "reads": 1,
    "score": 0,
    "topic_id": 5184,
    "topic_slug": "test-webhook-topic",
    "topic_title": "Test Webhook Topic",
    "display_username": "Justin DiRose",
    "primary_group_name": "",
    "version": 1,
    "user_title": "",
    "moderator": true,
    "admin": true,
    "staff": true,
    "user_id": xxx,
    "hidden": false,
    "trust_level": 4,
    "deleted_at": null,
    "user_deleted": false,
    "edit_reason": null,
    "wiki": false,
    "reviewable_id": null,
    "reviewable_score_count": 0,
    "reviewable_score_pending_count": 0,
    "topic_posts_count": 2
  }
}

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [June 28, 2019, 9:18pm UTC](https://meta.discourse.org/t/post-event-webhook-does-not-indicate-post-was-deleted/121356/5 "2019-06-28T21:18:18Z")

</div>

I think that is working as designed, the webhook sends a snapshot of object right **before** it happens as the action can be destructive and sends the reason of the webhook in the header.
