Archive/Unarchive Users

As we strongly do not recommend deleting users from the system (users in archived status are not counted in the seat plan and have no access to the platform), Connecteam's API allows you to archive users in two different ways (note that unarchiving is only possible using the Update Users method):

  • Using the Update Users endpoint (and also for archiving)
  • Using Delete Users endpoint.
  1. Update Users Method
    When updating user details, you can specify the isArchived parameter to archive or unarchive a user.
    The relevant parameter is:
  • isArchived (boolean): Indicates the user's status (archived or active).

📘

Did you know?

Archiving users is possible with phone number as the unique ID, but when archiving using the unique identifier of the user in the system only.

Payload example for archiving user using Update users method:

{  
  "userId": 123456,   
  "isArchived": true   // Set to true to archive the user  
}
  1. Delete (archive) Users Method
    Alternatively, you can archive users by using the Delete Users endpoint. This method allows you to archive individual or multiple users by their unique user IDs.

Only one parameter should be specified:

  • userIds:List of the unique IDs of the users you want to archive. This can be a single or multiple user IDs passed as an array.

Payload example for archiving users using Delete users method

{  
  "userIds": [123456, 789012]  // Array of user IDs to be archived  
}

🚧

Important to know:

When archiving users, ensure that you are using the correct user IDs and formats to avoid errors. If you need to restore a user, you must use the Update Users method with the appropriate user ID.

Payload example for restoring user from archive using Update users method

{  
  "userId": 123456,  
  "isArchived": false   // Set to false to restore the user back to the system 
}

Archive users API reference