Deactivate users
Deactivate users now or on a date. Their history stays in reports.
POST https://cotlet.dev/api/v1/ispring/users/deactivate
Sets users to Inactive, now or on deactivate_on. Inactive users cannot sign in, get notifications, open their courses or be assigned new ones, and they stop counting as active users. Their statistics stay for reports, and an administrator can reactivate them later. The Account Owner cannot be deactivated, and Department Administrators can deactivate only users in their departments. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| user_ids string[] required | string[] | Users from list_users. |
| deactivate_on date | date | Schedule the deactivation for this date. Default: now. |
Request
curl -X POST https://cotlet.dev/api/v1/ispring/users/deactivate \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_ids":["u_92b7c1","u_92b7c2"]}' result = client.call("ispring", "deactivate_users", {"user_ids":["u_92b7c1","u_92b7c2"]}) const result = await cotlet.call('ispring', 'deactivate_users', {"user_ids":["u_92b7c1","u_92b7c2"]}); cotlet call ispring deactivate_users --data '{"user_ids":["u_92b7c1","u_92b7c2"]}' Example response
{
"deactivated": 2,
"scheduled_for": null,
"users": [
{
"user_id": "u_92b7c1",
"name": "Maria Silva",
"status": "inactive"
},
{
"user_id": "u_92b7c2",
"name": "Jake Ortiz",
"status": "inactive"
}
]
}