---
title: "Delete Expired Users"
method: DELETE
path: "/api/users/expired"
tags: ["User"]
---

# Delete Expired Users

`DELETE /api/users/expired`

Delete cleanup-target users in the specified scope.

- **target**: `expired` | `limited` | `on_hold` | `disabled`
- **expired_after** / **expired_before** UTC datetime (optional)
- For `expired`: filters by expiration date.
- For `limited` / `on_hold` / `disabled`: filters by last_status_change (when they entered that status).
- **dry_run**: if true, returns users that would be deleted without deleting them.

## Query parameters

- `admin_username` string, nullable
- `target` 'expired' | 'limited' | 'on_hold' | 'disabled'
- `expired_after` string, date-time, nullable
- `expired_before` string, date-time, nullable
- `dry_run` boolean

## Response `200`

Successful Response

- RemoveUsersResponse
  - `users` string[], required
  - `count` integer, required

## Other responses

- `401` — Unauthorized Error
- `422` — Validation Error

---

[API](https://skmtc.dev/socialser/apis/pasarguardapi.md) · [All operations](https://skmtc.dev/socialser/apis/pasarguardapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/socialser/pasarguardapi/revisions/4b082bbcb6c3/schema)
