---
title: "Deletes and archives historical data based on `expungeAndArchiveDataConfig`. Currently, 1. deletes historical users not attached to any service 2. deletes historical invites 3. deletes forgotten passwords 4. archives services without transactions within the configured number of days and detaches users from service"
method: POST
path: "/v1/tasks/expunge-and-archive-historical-data"
tags: ["Tasks"]
---

# Deletes and archives historical data based on \`expungeAndArchiveDataConfig\`. Currently, 1. deletes historical users not attached to any service 2. deletes historical invites 3. deletes forgotten passwords 4. archives services without transactions within the configured number of days and detaches users from service

`POST /v1/tasks/expunge-and-archive-historical-data`

## Request

- The document declares no server URL.
- Auth: none declared

## Response `200`

OK

## Changes

- **2023-11-08** `8d6a4b54fae9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/government-digital-service/apis/adminusers-api/changes/v1/tasks/expunge-and-archive-historical-data/post.md)

---

[API](https://skmtc.dev/government-digital-service/apis/adminusers-api.md) - [All operations](https://skmtc.dev/government-digital-service/apis/adminusers-api/llms.txt) - [OpenAPI document](https://skmtc.dev/government-digital-service/apis/adminusers-api/revisions/8f9d543f352b?raw)
