# JS SDK createUsers() call fails "No record(s) detected in request"

**URL:** <https://community.dreamfactory.com/t/js-sdk-createusers-call-fails-no-record-s-detected-in-request/951>\
**Category:** Client SDKs\
**Created:** [March 26, 2015, 12:53pm UTC](https://community.dreamfactory.com/t/js-sdk-createusers-call-fails-no-record-s-detected-in-request/951 "2015-03-26T12:53:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim\_tjr](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@tim\_tjr](https://community.dreamfactory.com/u/tim_tjr)\
**Post date:** [March 26, 2015, 12:53pm UTC](https://community.dreamfactory.com/t/js-sdk-createusers-call-fails-no-record-s-detected-in-request/951/1 "2015-03-26T12:53:20Z")

</div>

Hi there,

I am new to DreamFactory, and doing some initial investigation of the functionality. So far looks very impressive.

I was trying to create a new user using the JS SDK, based on the example .  
I have authenticated and have the correct privileges, and can create users in the DSP User admin and Live SDK.

A code snippet is shown below, and I get the error response, “No record(s) detected in request”

I feel as though I am doing something stupid. The documentation is brief for the SDK, it just says body, so I am translating the required body from the Live SDK info. It works in the Live SDK but not in the JS SDK call?

Running a local version of 1.9

Thanks

Tim

```
var body = { "record": [
    {
      "id": 0,
      "email": newUsrEmail,
      "password": "",
      "first_name": newUsrFirstname,
      "last_name": newUsrSurname,
      "display_name": "",
      "phone": newUsrPhone,
      "is_active": false,
      "is_sys_admin": false,
      "role_id": newUsrRole
    }
  ]
};
/* newUsrLang
   newUsrTz*/
window.df.apis.system.createUsers(body, function (response) {
  //Do something with the data;
  document.getElementById("newUsrResults").innerHTML = JSON.stringify(response);

}, function(response) {
  document.getElementById("newUsrResults").innerHTML = window.app.getErrorString(response);
});
```

---

<div class="post-metadata">

**Author:** ![tim\_tjr](https://avatars.discourse-cdn.com/v4/letter/t/d07c76/32.png) [@tim\_tjr](https://community.dreamfactory.com/u/tim_tjr)\
**Post date:** [March 26, 2015, 4:48pm UTC](https://community.dreamfactory.com/t/js-sdk-createusers-call-fails-no-record-s-detected-in-request/951/2 "2015-03-26T16:48:36Z")

</div>

I found the solution to my own problem.

I had constructed the record correctly but needed to put the Record data within a { body : … }

```
var RecordBody = {"record":[{"id":0,"email":newUsrEmail,"first_name":newUsrFirstname,"last_name":newUsrSurname,"display_name":"TAT","phone":newUsrPhone,"is_active":false,"is_sys_admin": false,"role_id":newUsrRole}]};
window.df.apis.system.createUsers({body: body}, function (response) {
```
