# Can you pass a user field value through a webhook?

**URL:** https://meta.discourse.org/t/can-you-pass-a-user-field-value-through-a-webhook/42562
**Category:** Support
**Created:** [April 14, 2016, 3:32pm UTC](https://meta.discourse.org/t/can-you-pass-a-user-field-value-through-a-webhook/42562 "2016-04-14T15:32:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ryan\_H](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_h/32/54096_2.png) [@Ryan\_H](https://meta.discourse.org/u/Ryan_H)
#### Post date: [April 14, 2016, 3:32pm UTC](https://meta.discourse.org/t/can-you-pass-a-user-field-value-through-a-webhook/42562/1 "2016-04-14T15:32:33Z")

</div>

I have a custom user field added to my setup, with the plugin to shoot that event off and enable the custom field in a webhook. Is there any way to pass the value of that custom field to my api?

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [May 11, 2017, 11:11pm UTC](https://meta.discourse.org/t/can-you-pass-a-user-field-value-through-a-webhook/42562/2 "2017-05-11T23:11:23Z")

</div>

I was wondering the same thing. More generally: what fields are part of the payload for user events, post events, and topic events respectively? Is the following list up to date? If so, the answer to the OP would be no and it would be great if at least custom user fields required at sign-up could be included in the payload (since they are obviously considered important by the admin).

> [@Webhook for Discourse events](https://meta.discourse.org/t/webhook-for-discourse-events/39808/7):
>
> User
> 
> user\_registered and user\_activated
> 
> username, email, name, trust\_level
> 
> trust\_level\_changed
> 
> username, old\_trust\_level, new\_trust\_level
> 
> message\_sent
> 
> sender\_username, receiver\_username, msg\_title, msg\_content
> 
> Do we want the message content to be sent?
> 
> Another option is to define the required information of a user and use it whenever we’re referring to a user. For example, instead of sender\_username we would have sender\_info which has {ID, name, username, email, trust\_level, …}.
> 
> Topic
> 
> Topic\_created
> 
> ID, title, content, creator\_username, categories
> 
> Topic\_liked
> 
> ID, title, username, number\_of\_likes
> 
> Topic\_{pinned,unpinned,archived,closed,invisibled,bookmarked}
> 
> ID, title, username
> 
> Post
> 
> Post\_liked
> 
> post\_ID, topic\_ID, username, number\_of\_likes
> 
> Reply\_posted
> 
> post\_ID, topic\_ID, username, content
> 
> Other
> 
> Auto\_close\_set
> 
> I don’t know what this one means…
> 
> Flag\_raised
> 
> post\_id, topic\_id, reason

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [March 16, 2018, 6:47pm UTC](https://meta.discourse.org/t/can-you-pass-a-user-field-value-through-a-webhook/42562/3 "2018-03-16T18:47:31Z")

</div>

> [@tophee](#):
>
> the answer to the OP would be no and it would be great if at least custom user fields required at sign-up could be included in the payload (since they are obviously considered important by the admin).

`UserSerializer` returns the whitelisted user custom fields. So the `WebHookUserSerializer` which inheriting it also should return those fields.

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [March 17, 2018, 11:32am UTC](https://meta.discourse.org/t/can-you-pass-a-user-field-value-through-a-webhook/42562/4 "2018-03-17T11:32:03Z")

</div>

Excuse my ignorance, but could you rephrase that? What is the `WebHookUserSerializer`?

What I’d like to do is use a webhook to externally log every user creation, including all custom user fields entered upon signup… (ideally including the IP, but that’s probably a different issue)

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [March 19, 2018, 9:22am UTC](https://meta.discourse.org/t/can-you-pass-a-user-field-value-through-a-webhook/42562/5 "2018-03-19T09:22:25Z")

</div>

Sorry, maybe my last post is so technical for normal users to understand.

What I really mean is custom user fields which whitelisted via site settings `public user custom fields` and `staff user custom fields` are already available in the user web hooks.

---

<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 15, 2020, 7:24pm UTC](https://meta.discourse.org/t/can-you-pass-a-user-field-value-through-a-webhook/42562/6 "2020-07-15T19:24:36Z")

</div>


