There is no automatic “retention policy” feature, but you might accomplish this by getting a list of users with a last_login date of longer than a year, iterating over that list and deleting the users.
-
to get the list of users that have not logged in in a year, you’ll need to use the GET /api/v2/users endpoint with the query
last_login: [* TO 2020-04-29]
-
to delete the users, you can use the DELETE /api/v2/users/{id} endpoint with each of the user ids
You can then create a script to run this periodically. Be sure to check the rate limits, specially for the delete users step.