How do I programmatically suspend or activate users?

You can use Openpath’s API to suspend or activate large volumes of users at once.

To suspend or activate large volumes of users:

  1. Start by issuing an auth/login request using your Control Center username (email address) and password
    1. In the response, you’ll receive an authorization token that you can use to authorize calls, eg: {"data": { "token": "eyJh...Rk", ... }
    2. Learn more about authenticating
  2. Next, use the set user’s status endpoint
    1. You’ll need your orgID, which is found in the URL of your Control Center, for example in the orgID is 302, following the /o/
    2. You’ll also need your users’ IDs, which you can get using the list all users endpoint
    3. In the header, paste the full authorization token
    4. Using a loop, set your users’ status to ‘S’ (for Suspended)
    5. Check in the Control Center that users’ statuses are now Suspended 
    6. You can repeat this process for reactivating users, by setting their status to 'A' for Active
Was this article helpful?
1 out of 1 found this helpful



Please sign in to leave a comment.

Have more questions?

Request support