Account Owner, Account Administrators, Department Administrators, or custom roles.
Department Administrators and users with a custom role may activate or deactivate only users belonging to the departments they manage or their daughter departments.
|X-Auth-Account-Url (required)||The base URL of the account, e.g. http://myaccount.ispringlearn.com|
|X-Auth-Email (required)||The login of Account Owner, Account Administrator, Department Administrator, or a user with a custom role.|
|X-Auth-Password (required)||The password of Account Owner, Account Administrator, Department Administrator, or a user with a custom role.|
|user_id (required)||The ID of a user you want to activate or deactivate.|
|status||To block a user, add 3 (<status>3</status>) in the status row. To active a user, type 1 (<status>1</status>).|
Possible Response Codes
|200||Successful operation||A user's status is changed.|
|400||Bad Request||A request error.|
|401||Unauthorized||An authorization error.|
|403||Permission Denied||The user doesn't have enough permissions to activate or deactivate users. For example, Department Administrators can't activate or deactivate users who don't belong to the departments they manage.|
POST /user/43f4a84c-6280-11e9-8686-a6210366ac32/status HTTP/1.1 Host: api-learn.ispringlearn.com X-Auth-Account-Url: https://myaccount.ispringlearn.com X-Auth-Email: firstname.lastname@example.org X-Auth-Password: password Content-Type:application/xml <?xml version="1.0" encoding="UTF-8"?> <request> <status>1</status> </request>
HTTP/1.1 200 Successful operation Connection: close