Learn how to offboard users via the User API.
When users leave the organization or do not need access to the Staffbase platform, you can offboard them from the platform.
Although Staffbase offers different methods to offboard users, we recommend using the User API when you need to offboard a large number of users.
In this article, we’ll look at how to offboard users via the User API for different use cases.
If your application is hosted on the German Hosting Infrastructure, you will need to adjust the base URL used in the request examples. Learn more about it here.
If you do not already have the id
or externalID
of the user, do the following:
GET
request to the endpoint /users
to list all users. userID
of the user.Make a PUT
request to the endpoint /users/{userID}
and in the request body schema, set the status
parameter to deactivated
.
If you want to activate a deactivated user account, set the status parameter to activated.
Once a user account is deleted, it cannot be restored by either the administrators or Staffbase. A new user account must be created.
GET
request to the endpoint /users
to list all users with the filter staffbase.status
set to deactivated
. Learn more about user account filters here.
DELETE
request to endpoint /users/{userID}
for each user.Once a user account is deleted, it cannot be restored by either the administrators or Staffbase. A new user account must be created.
You can delete user accounts that were deactivated within a specific time period.
GET
request to the endpoint /users
to list all users with the following parameters:staffbase.status
set to deactivated
gt
, ge
, le
, lt
, eq
, n
Learn more about user account filters here.
userID
s of deactivated user accounts.DELETE
request to endpoint /users/{userID}
.Once a user account is deleted, it cannot be restored by either the administrators or Staffbase. A new user account must be created.
Pending user accounts belong to those users who have been invited to the Staffbase platform but yet to register in the platform. You can clean up the pending user accounts by deleting them from the platform.
GET
request to the endpoint /users
to list all users with the filter staffbase.status
set to pending
. Learn more about user account filters here.
userID
s of pending user accounts.DELETE
request to the endpoint /users/{userID}
for each user.Once a user account is deleted, it cannot be restored by either the administrators or Staffbase. A new user account must be created.
Your users can have tags on their profiles. These tags are custom-defined attributes. They can be created based on departments, interest groups, or locations. Learn more here.
GET
request to the endpoint /users
to list all users and filter for:user accounts with staffbase.status
set to one of following:
pending
activated
deactivated
To get all the tags used in the platform, make a GET request to the endpoint /tags.
Filter the list of users in the response for the desired tag and gather the userID
s of those accounts.
Make a DELETE
request to the endpoint /users/{userID}
for each user.