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

<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: [August 27, 2020, 11:05pm UTC](https://meta.discourse.org/t/creating-and-activating-users-from-the-api/162124/2 "2020-08-27T23:05:31Z")

</div>

It looks like 2.5.0.beta3 was released on [April 22, 2020](https://github.com/discourse/discourse/tags?after=v2.4.4) and the fix I made for [this issue](https://meta.discourse.org/t/creating-active-users-via-the-api-gem/33133/43) was released on [April 14, 2020](https://github.com/discourse/discourse/commit/fec68d3d25bfc80d084af52e17882ad886fd5cd0) so you should be able to create an active user via the API with a single request.

Can you verify your requests and response look similar to this curl command:

```plaintext
curl -i -sS -X POST "http://localhost:3000/users" \
-H "Content-Type: multipart/form-data;" \
-H "Api-Key: 079fb2bb12d3b436bb11bde8eb58aaa9a36560fa7d79b14b3087aa40b1ebc2c4" \
-H "Api-Username: blake.erickson" \
-F "name=8fe87241ca91a69f5ccd" \
-F "username=8fe87241ca91a69f5ccd" \
-F "email=8fe87241ca91a69f5ccd@example.com" \
-F "password=c9193506a8f5e402a88cf2f8cee3f258" \
-F "active=true" \
-F "approved=true"

HTTP/1.1 200 OK

{
  "success": true,
  "active": true,
  "message": "Your account is activated and ready to use.",
  "user_id": 10
}

```

---

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