ReferenceError: createParents is not defined


When i use the following below code i get an error "ReferenceError: createParents is not defined"

const addPhoneToContact = (bucket,contact_id,phone)=>{
return new Promise((resolve,reject)=>{
        .arrayAppend('phone',phone, createParents)
        .execute((err, result)=>{
  if(err) return reject(err);
  return resolve(result);

what am i missing so the array append will create parent if it does not exist. Also where can i find nodeJs
specific docs as the samples in nodeJs is python which is diffrent syntax


Hey @makeawish,

You should pass createParents as an options block with value true, for instance:

  .arrayAppend('phone', phone, {createParents: true})

Cheers, Brett


Thanks, that worked. is there any where actual docs for NodeJS or does one have to guess or ask for all functions which are a bit off mainstream.


Hey @makeawish,

You can find the API reference here:

P.S. What do you mean by ‘a bit off mainstream’? We are always looking to improve the SDKs, so it would be wonderful to get your opinion here!

Cheers, Brett


I think it would be much more helpful with only having nodeJS samples in the nodeJS guide not mixed java, php and python as syntax varries from language. Also most google searches go back to main page instead to references as links broken,