Cutover API
>
Examples
>
How to archive users

How to archive users

This example shows you how to archive users when they leave your organization. This helps you to build a secure joiners, movers and leavers (JML) process, making sure leavers no longer have any sort of access or receive any kind of communications.

1. Look up the user by email address

Let’s archive the user jane.smith@cutover.com:

We can use an authenticated call to the Get a User endpoint. This will allow us to identify the user jane.smith@cutover.com in Cutover.

The URL request will look like this: 

https://api.client_name.cutover.com/core/users/jane.smith%40cutover.com/archive

The response will include the ID of the user, all key attributes associated with the user and any user roles. 

2. Archive the user

With an authenticated call, we will need to use the Archive a User endpoint and the user ID. In this example, the user ID is 3235

We can send a PATCH request to archive the user as shown below: 

https:/api.client_name.cutover.com/core/users/3235/archive

We will get a 204 response which will confirm the successful archiving of the user.  By going into Cutover and searching for the user, we can now see they no longer exist.