Deactivate users

Deactivate users now or on a date. Their history stays in reports.

POST https://cotlet.dev/api/v1/ispring/users/deactivate

write Confirm

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

Parameters: deactivate_users
NameTypeDescription
user_ids string[] required string[] Users from list_users.
deactivate_on date date Schedule the deactivation for this date. Default: now.

Request

cURL
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"]}'
Python
result = client.call("ispring", "deactivate_users", {"user_ids":["u_92b7c1","u_92b7c2"]})
Node.js
const result = await cotlet.call('ispring', 'deactivate_users', {"user_ids":["u_92b7c1","u_92b7c2"]});
CLI
cotlet call ispring deactivate_users --data '{"user_ids":["u_92b7c1","u_92b7c2"]}'

Example response

JSON

{
  "deactivated": 2,
  "scheduled_for": null,
  "users": [
    {
      "user_id": "u_92b7c1",
      "name": "Maria Silva",
      "status": "inactive"
    },
    {
      "user_id": "u_92b7c2",
      "name": "Jake Ortiz",
      "status": "inactive"
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.