# Creating Active Users via the API gem

**URL:** https://meta.discourse.org/t/creating-active-users-via-the-api-gem/33133
**Category:** Development
**Tags:** rest-api
**Created:** [September 11, 2015, 6:06pm UTC](https://meta.discourse.org/t/creating-active-users-via-the-api-gem/33133 "2015-09-11T18:06:38Z")
**Posts on this page:** 1
**Showing post:** 36

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [February 8, 2018, 2:50pm UTC](https://meta.discourse.org/t/creating-active-users-via-the-api-gem/33133/36 "2018-02-08T14:50:43Z")

</div>

I believe this is now possible as have just tested it and seems to work ok -

```plaintext
{
"name": "string",
"email": "string",
"password": "string",
"username": "string",
"active": true,
"approved": true,
}

```

> **[Discourse API Docs](https://docs.discourse.org/#tag/Users%2Fpaths%2F~1users%2Fpost)**

I used the **active = true** and **approved = true** when creating a new user and got the response (with no email sent) -

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

```

where as if I set them to false - I get the email and a response

```plaintext
{
    "success": true,
    "active": false,
    "message": "<p>You’re almost done! We sent an activation mail to <b>###@gmail.com</b>. Please follow the instructions in the mail to activate your account.</p><p>If it doesn’t arrive, check your spam folder.</p>",
    "user_id": 3
}

```

---

_[View the full topic](https://meta.discourse.org/t/creating-active-users-via-the-api-gem/33133)._
