var newContent = {
  firstname: 'My Name Is',
  lastname: 'Jonas'

// Using callbacks (NodeJS or Web Browser)
  .updateSelf(newContent, function (err, updatedUser) {


// Using promises (NodeJS)
  .then(updatedUser => {

JSONObject newContent = new JSONObject()
  .put("firstname", "My Name Is")
  .put("lastname", "Jonas");

  .updateSelf(newContent, new ResponseListener<JSONObject>() {
    public void onSuccess(JSONObject user) {


    public void onError(JSONObject error) {

use \Kuzzle\Kuzzle;
use \Kuzzle\Security\User;

$kuzzle = new Kuzzle('localhost');
$newContent = [
  'firstname' => 'My Name Is',
  'lastname' => 'Jonas'

try {
  $updatedUser = $kuzzle->updateSelf($newContent);
  // $updatedUser instanceof User
catch (ErrorException $e) {


updateSelf(content, [options], [callback])

Performs a partial update on the current user.

Arguments Type Description
content JSON Object A plain javascript 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

Return value

Returns the Kuzzle SDK object to allow chaining.

Callback Response

Returns the updated user object.