# 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:** 5

<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:** [September 14, 2023, 9:43pm UTC](https://meta.discourse.org/t/create-staged-users-via-api/279052/5 "2023-09-14T21:43:56Z")

</div>

> [@mattdm](#):
>
> the answer is to basically inject an email and let the email handling code take care of it.

With this approach it’s going to look as though users have created topics and replies via email. Staged users can only create posts via email. You’ll get an invalid access error if you attempt to create a non-email post for a staged user via the API.

Something about the staged user approach doesn’t feel quite right to me. It might be worth polling your users to see if they have any concerns. If you could get permission from your users, you could just create active non-staged users on the mirror site, then post their topics and comments via the API.

> [@supermathie](#):
>
> If passing `staged: true` to the admin user create call doesn’t work, I suspect we’d be open to a PR to enable that.

Passing `staged: true` creates a staged user. I’m assuming a user created in this way will be able to post via email. My local dev site isn’t configured to send emails to Discourse, so I can’t test that at the moment.

---

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