# Creating and activating users from the API

**URL:** <https://meta.discourse.org/t/creating-and-activating-users-from-the-api/162124>\
**Category:** Development\
**Created:** [August 26, 2020, 12:15pm UTC](https://meta.discourse.org/t/creating-and-activating-users-from-the-api/162124 "2020-08-26T12:15:22Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![yerttle](https://avatars.discourse-cdn.com/v4/letter/y/58f4c7/32.png) [@yerttle](https://meta.discourse.org/u/yerttle)\
**Post date:** [September 16, 2020, 9:52am UTC](https://meta.discourse.org/t/creating-and-activating-users-from-the-api/162124/3 "2020-09-16T09:52:36Z")

</div>

Tried the curl command and the response shows user is not active. The message says the user will be activated through email.

```plaintext
C:\Windows\system32>curl -i -sS -X POST https://our-discourse-host/users -H "Content-Type: multipart/form-data;" -H "Api-Key: The-API-key" -H "Api-Username: The-username" -F "name=8fe87241ca91a69f5ccd" -F "username=8fe87241ca91a69f5ccd" -F "email=8fe87241ca91a69f5ccd@testemail.test" -F "password=c9193506a8f5e402a88cf2f8cee3f258" -F "active=true" -F "approved=true"

```

```plaintext
HTTP/1.1 200 OK
{
"success":true,
"active":false,
"message":"\u003cp\u003eYouΓÇÖre almost done! We sent an activation mail to \u003cb\u003e8fe87241ca91a69f5ccd@testemail.test\u003c/b\u003e. Please follow the instructions in the mail to activate your account.\u003c/p\u003e\u003cp\u003eIf it doesnΓÇÖt arrive, check your spam folder.\u003c/p\u003e",
"user_id":13
}

```

---

_[View the full topic](https://meta.discourse.org/t/creating-and-activating-users-from-the-api/162124)._
