# Create staged users via API?

**URL:** <https://meta.discourse.org/t/create-staged-users-via-api/279052>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [September 14, 2023, 7:23pm UTC](https://meta.discourse.org/t/create-staged-users-via-api/279052 "2023-09-14T19:23:28Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)\
**Post date:** [September 14, 2023, 7:23pm UTC](https://meta.discourse.org/t/create-staged-users-via-api/279052/1 "2023-09-14T19:23:28Z")

</div>

I’m kicking around the idea of building a webhook+api bridge service to connect given categories on two different discourse forums. The rough idea would be:

1. A webhook on each server for Topic and Post events\[1\]
2. A listener which takes these and replicates the event on the opposite server via the API
  - Uh, something to prevent loops, obviously\[2\]
  - Check if a user with the same email address exists on the opposite server\[3\]
  - If no such user exists, create a staged user
  - Change the staged user’s notification settings so they don’t get email notifications\[4\]
  - Create or update the post under the appropriate real or staged user

3. Probably a timed routine to go through topics and make sure nothing was missed, and possibly reorder so both sides agree

From [Understanding user statuses, roles, and permissions](https://meta.discourse.org/t/understanding-user-statuses-roles-and-permissions/35171), I think that staged users would basically do what we want – if someone _did_ create an account with that email address later, they could “claim” it and interact with all their posts just as if they’d been there all along.

But, is there a way to create a staged user from the API? I don’t see that in [Discourse API Docs](https://docs.discourse.org/#tag/Users/operation/createUser).

* * *

1. and possibly also Like and Solved events, but not in the first cut 

2. I _definitely_ thought about this _before_ writing out this list 

3. using email addresses as key because account systems may not have same usernames 

4. I saw a post about this being possible somewhere around here…

---

_[View the full topic](https://meta.discourse.org/t/create-staged-users-via-api/279052)._
