title: Create user in OpenDJ via REST
body: <p>I am trying to build a request to create a new user in OpenDJ via REST API. According to the <a href="http://opendj.forgerock.org/opendj-server/doc/bootstrap/admin-guide/index.html#chap-rest-operations" rel="nofollow">documentation</a>, I need to create a new resource. The given example is fairly easy and it will create a user named "newuser" with the given field:</p>
  
  <pre><code>$ curl \
   --request PUT \
   --user kvaughan:bribery \
   --header "Content-Type: application/json" \
   --header "If-None-Match: *" \
   --data '{
    "_id": "newuser",
    "contactInformation": {
      "telephoneNumber": "+1 408 555 1212",
      "emailAddress": "newuser@example.com"
    },
    "name": {
      "familyName": "New",
      "givenName": "User"
    },
    "displayName": "New User",
    "manager": [
      {
        "_id": "kvaughan",
        "displayName": "Kirsten Vaughan"
      }
    ]
   }' \
   http://opendj.example.com:8080/users/newuser
  </code></pre>
  
  <p>However, the user I need to create must have a password, a common name and its username should be its email address. I cannot find a reference on how to build my JSON to create the required user so that it can be authenticated via username (email) and password.</p>
  
  <p>Is there some documentation I can follow to build my JSON? </p>