# JSON data structure when using webhook

**URL:** https://meta.discourse.org/t/json-data-structure-when-using-webhook/310479
**Category:** Development
**Tags:** webhooks
**Created:** [June 4, 2024, 9:10am UTC](https://meta.discourse.org/t/json-data-structure-when-using-webhook/310479 "2024-06-04T09:10:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![yangxuan](https://avatars.discourse-cdn.com/v4/letter/y/8e8cbc/32.png) [@yangxuan](https://meta.discourse.org/u/yangxuan)
#### Post date: [June 4, 2024, 9:10am UTC](https://meta.discourse.org/t/json-data-structure-when-using-webhook/310479/1 "2024-06-04T09:10:35Z")

</div>

What is the specific JSON data structure that Discourse sends to other services when using webhook? Can you give me an example?

---

<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: [June 4, 2024, 10:55pm UTC](https://meta.discourse.org/t/json-data-structure-when-using-webhook/310479/2 "2024-06-04T22:55:33Z")

</div>

It depends on what webhook it is.

To get some example data, Set one up and see what it sends you.

---

<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: [June 5, 2024, 6:26am UTC](https://meta.discourse.org/t/json-data-structure-when-using-webhook/310479/4 "2024-06-05T06:26:45Z")

</div>

Type definitions of the webhook payloads would be useful. I’ve created a few, but my definitions are limited to the data that my application is consuming, so they probably are not useful to share.

To add to Jay’s answer, the easiest way to see the JSON data structure for a webhook is to configure a webhook to point to `https://example.com`, then perform an action on your site that triggers the webhook. You can see the payload by clicking the “Request” button from the webhook’s events page:

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/7/6/476e6f7455b6cf06c9c87837f5d93a8a8d286db6.png)

---

<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: [June 5, 2024, 3:40pm UTC](https://meta.discourse.org/t/json-data-structure-when-using-webhook/310479/5 "2024-06-05T15:40:33Z")

</div>

> [@simon](#):
>
> You can see the payload by clicking the “Request” button from the webhook’s events page:

That’s awesome! You don’t even need to have something receive the webhook to get the answer!

---

<div class="post-metadata">

### Author: ![yangxuan](https://avatars.discourse-cdn.com/v4/letter/y/8e8cbc/32.png) [@yangxuan](https://meta.discourse.org/u/yangxuan)
#### Post date: [June 6, 2024, 1:59am UTC](https://meta.discourse.org/t/json-data-structure-when-using-webhook/310479/6 "2024-06-06T01:59:10Z")

</div>

Thank you for your answer, it is very useful.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 6, 2024, 2:00am UTC](https://meta.discourse.org/t/json-data-structure-when-using-webhook/310479/7 "2024-07-06T02:00:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
