# Can a plugin add a webhook?

**URL:** <https://meta.discourse.org/t/can-a-plugin-add-a-webhook/81361>\
**Category:** Development\
**Created:** [February 23, 2018, 10:10pm UTC](https://meta.discourse.org/t/can-a-plugin-add-a-webhook/81361 "2018-02-23T22:10:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [February 23, 2018, 11:31pm UTC](https://meta.discourse.org/t/can-a-plugin-add-a-webhook/81361/2 "2018-02-23T23:31:48Z")

</div>

I’m not much of a plugin author, but I’m pretty sure that you can call something like

```
hook = WebHook.new(payload_url: "https://sefsdf", secret: "lkjlkjlkj", active: true)
hook.save

```

Here are the other things in a webhook that you may or may not need to set.

```plaintext
 id: nil,
 payload_url: nil,
 content_type: 1,
 last_delivery_status: 1,
 status: 1,
 secret: "",
 wildcard_web_hook: false,
 verify_certificate: true,
 active: false,
 created_at: nil,
 updated_at: nil>

```

---

_[View the full topic](https://meta.discourse.org/t/can-a-plugin-add-a-webhook/81361)._
