Unknown SDK


Performs a partial update on an existing user.

updateUser(id, content, [options], [callback])

Arguments Type Description
id string Unique user identifier
content JSON Object A plain JSON object representing the user
options string (Optional) Optional arguments
callback function (Optional) Callback handling the response


Filter Type Description Default
queuable boolean Make this request queuable or not true
refresh string If set to wait_for, Kuzzle will wait for the persistence layer to finish indexing (available with Elasticsearch 5.x and above) undefined

Return Value

Returns the Security object to allow chaining.

Callback Response

Returns an updated User object.


Copied to clipboard!
var newContent = {
  firstname: 'My Name Is',
  lastname: 'Jonas'
// Using callbacks (NodeJS or Web Browser)
  .updateUser("User ID", newContent, function (err, updatedUser) {
    // "updatedUser" is an instance of a User object
// Using promises (NodeJS)
  .updateUserPromise("User ID", newContent)
  .then(updatedUser => {
    // "updatedUser" is an instance of a User object