Page tree
Skip to end of metadata
Go to start of metadata

You can update a user's profile by sending the POST request with the XML data to the following URL:  /user/{user_id}.

Permissions to run the request: Account Owner, Administrators, Department Administrators.

Department Administrators can update profiles only if users belong to the department they manage or its daughter departments.

Request Headers

ParameterDescription
X-Auth-Account-Url(required)Base URL of the account, e.g. http://myaccount.ispringlearn.com
X-Auth-Email (required)Login of Account Owner, Administrator, or Department Administrator.
X-Auth-Password (required)Password of Account Owner, Administrator, or Department Administrator.

After the request is successfully processed, the system returns the response with the 200 code.

Possible Response Codes

CodeTextDescription
200Successful operationA user's profile is updated.
400Bad RequestA request error.
401UnauthorizedAn authorization error.
403Permission DeniedThe user doesn't have enough permissions to update another users' profiles, For instance, Department Administrators can't change profiles of users belonging to a department they don't manage.

Sample Request

POST /user/43f4a84c-6280-11e9-8686-a6210366ac32 HTTP/1.1
Host: api-learn.ispringlearn.com
X-Auth-Account-Url: https://myaccount.ispringlearn.com
X-Auth-Email: email@gmail.com
X-Auth-Password: 12345Q
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8"?>
<request>
	<fields>
      <login>new_user</login>
      <email>kate@mail.ru</email>
      <first_name>Kate</first_name>
      <last_name>Smith</last_name>
      <job_title>Sales Manager</job_title>
    </fields>  
	</fields>
	<departmentId>3fa85f64-5717-4562-b3fc-2c963f66afa6</departmentId>
	<groupIds>
		<id>3fa85f64-5717-4562-b3fc-2c963f66afa6</id>
	</groupIds>
	<role>string</role>
	<manageableDepartmentIds>
		<id>3fa85f64-5717-4562-b3fc-2c963f66afa6</id>
	</manageableDepartmentIds>
</request>

Sample Response

HTTP/1.1 200 Successful operation
Connection: close
  • No labels