Method: updateUserProfile

Permissions to Run the Request

Account Owner, Account Administrators, Department Administrators, or custom roles

Department Administrators and users with a custom role can edit profiles of the users belonging to the departments they manage and their sub-departments.

Request Headers


ParameterTypeDescription
credentials (required)credentialsRead the description of the Credentials object.
userId (required)stringThe ID of the user whose profile you want to update.
email (optional)stringThe email of the user.
password (optional)stringThe password of the user. 
login (required)stringThe login of the user.
departmentId (required)stringThe department ID the user belongs to.
role (optional)string

If you assign one of the standard roles to the user (except for Account Owner and Publisher), use one of the following values for the role parameter:

  • learner
  • department_administrator
  • administrator

If you assign the Publisher role or one of the custom roles to the users, use the custom value for the role parameter. 

Learn more about using the role parameter in the Important section.

roleId (required if the custom value is used for the role parameter)stringThe roleId parameter is used, if you assign or the Publisher role or one of the custom roles to the user. In this case, you will need to use the needed role ID for the roleId parameter.

Learn more about using the roleId parameter in the Important section.
manageableDepartmentIds (required if the user's role is Department Administrator,Publisher,or a custom role)string[]

An array with the IDs of the departments the user will manage.

groups (optional)string[]Array of IDs of the groups the user will be added to.
roles  (optional)string[]An array of data using which you can assign one or two roles to a user. You will need to use the needed role ID for the roleId parameter inside the array.

If you assign two roles, one of them will be Learner, and the second role — one of the administrative roles (Account Administrator, Department Administrator, Publisher, or a custom role).

Learn more about using the roles parameter in the Important section.

Important: 

  1. If in the account there are required user profile fields (apart from the fields of the 'Country' format), they should be also put into the request.

  2. The user role can be assigned in one of two ways:

    1. Using the role (if the assigned role is Account Administrator, Department Administrator, or Learner) and roleId (if the role is Publisher or a custom role) tags,

    2. Using the roles array of data.

  3. If you use the roles array of data to assign a user role, you will be able to select two roles at once. 

    One of the roles will be Learner and the second role will be one of the administrative roles (Account Administrator, Department Administrator, Publisher, or a custom role).

    If you add two administrative role to the roles array of data, the user won't be added.

  4. If you have assigned a user role both with the role/roleId tags and the roles array of data, the user will be assigned to a role or roles specified in the roles array of data and the value specified in the role/roleId tags will be then ignored.

  5. If you haven't specified the user role with the role/roleId tags or with the roles array of data, the user will be assigned to the Learner role.


Return Value

After the request has been completed, the system returns an object with the following properties:

ParameterTypeDescription
successboolTrue if the user's profile has been updated.

Possible Errors


TypeDescription
Unknown userThe user with the specified ID was not found.
Permission deniedThe user has no permissions to update info of the specified user.
Wrong ParametersOne of the specified parameters is incorrect.
Invalid value <field_value>. Field <field_name> must be unique.An error occurs if the Login and Email 'user_fields' have been changed. They should be unique.

Sample Call

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://new.webservice.namespace">
  <SOAP-ENV:Body>
    <UpdateUserProfileRequest>
      <credentials>
        <accountUrl>http://myaccount.ispringlearn.com</accountUrl>
        <email>email@email.com</email>
        <password>password</password>
      </credentials>
      <userId>string</userId>
      <fields>
        <field>
          <name>LOGIN</name>
          <value>kate.smith@ispringsolutions.com</value>
        </field>
        <field>
          <name>PASSWORD</name>
          <value>1234</value>
        </field>
        <field>
          <name>EMAIL</name>
          <value>kate.smith@ispringsolutions.com</value>
        </field>
        <field>
          <name>FIRST_NAME</name>
          <value>John</value>
        </field>
        <field>
          <name>LAST_NAME</name>
          <value>Smith</value>
        </field>
        <field>
          <name>COUNTRY</name>
          <value>1</value>
        </field>
      </fields>
      <groups>
        <id>string</id>
        <id>string</id>
      </groups>
      <role>department_administrator</role>
      <departmentId>string</departmentId>
      <manageableDepartmentIds>
        <id>string</id>
        <id>string</id>
      </manageableDepartmentIds>
    </UpdateUserProfileRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://new.webservice.namespace">
  <SOAP-ENV:Body>
    <UpdateUserProfileResult>
      <success>true</success>
    </UpdateUserProfileResult>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>