AVAILABLE WITH BUSINESS SUBSCRIPTION

Request: POST /user/{user_id}/status

Permissions to Run the Request

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 subdepartments.

Course authors do not have access to the methods or data involved in requesting user information.

Request Headers

Header
Description
Authorization (required)Access token. You can obtain a token by making a request
Accept: application/json (required)Format of the response data: JSON
Content-Type: application/json (required)Format of the request body: JSON
ParameterDescription
user_id (required)The ID of a user you want to activate or deactivate
status
  • To block a user, set the status parameter to 3.
  • To activate a user, set the status parameter to 1.
  • To end user employment, set the status parameter to 5.

Existing customers may continue using ispringlearn.com, and new customers should use ispring.com.

Possible Response Codes

Code

Text

Description

200OKA user's status is changed
400Bad RequestA request error
401UnauthorizedAn authorization error
403Permission DeniedThe 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

 

Sample Request

POST /user/43f4a84c-6280-11e9-8686-a6210366ac32/status HTTP/1.1
Host: api-learn.ispringlearn.com
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE
Content-Type: application/json
Accept: application/json

{
  "status": 1
}
CODE

Sample Response

HTTP/1.1 200 OK
CODE