# Creating a staged user with an API call

**URL:** <https://meta.discourse.org/t/creating-a-staged-user-with-an-api-call/84667>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [April 5, 2018, 7:19pm UTC](https://meta.discourse.org/t/creating-a-staged-user-with-an-api-call/84667 "2018-04-05T19:19:10Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [September 16, 2025, 4:38pm UTC](https://meta.discourse.org/t/creating-a-staged-user-with-an-api-call/84667/29 "2025-09-16T16:38:53Z")

</div>

> [@tknospdr](#):
>
> Occasionally, I need to create a ticket on behalf of a customer instead of them creating it directly.
> 
> Is there an easy step by step way to do this and create a topic on behalf of someone that does not already have an account on the forum?

I would try creating a topic via incoming email:

> [@Creating a staged user with an API call](https://meta.discourse.org/t/creating-a-staged-user-with-an-api-call/84667/8):
>
> The only parameter this endpoint takes is a valid email message: curl -i -sS -X POST "http://localhost:3000/admin/email/handle\_mail" \ -H "Api-Key: 852b2d8556777aeb62346e0d8b36ed248a89b03f0261165a685c0aae9c8c2fdd" \ -H "Api-Username: system" \ -F "email=Date: Mon, 24 Feb 2020 13:13:34 -0700 From: stageduser2@example.com To: awesome@example.com Subject: test email5 This is a sample email message. " You will need to make sure you enable email\_in correctly setup your category or group to receive…

This way a staged user will be created on topic creation.

You could create the staged user via the api

```plaintext
curl -i -sS -X POST "http://localhost:4200/users" \
-H "Content-Type: multipart/form-data" \
-H "Api-Key: 3e8aa0b7970cf010da24d06215fdc7b3951352c61a59ada70f5f36b4ce890bb2" \
-H "Api-Username: system" \
-F "name=2e6ac3603" \
-F "active=false" \
-F "staged=true" \
-F "username=2e6ac3603" \
-F "email=2e6ac3603@example.com" \
-F "password=f9b4c3c7ebd1c2877a0ad659be6ca83e"

```

and then create the topic for the user but, on the user create action discourse will then send an activation email:

```plaintext
{“success”: true,“active”: false,“message”: “You’re almost done! We sent an activation mail to 2e6ac3603@example.com. Please follow the instructions in the mail to activate your account.If it doesn’t arrive, check your spam folder.”}

```

---

_[View the full topic](https://meta.discourse.org/t/creating-a-staged-user-with-an-api-call/84667)._
