---
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` (time-based) or `limited` (usage-based)
- **expired_after** UTC datetime (optional)
- **expired_before** UTC datetime (optional)
- Date range filters are applied only when target is `expired`

## Query parameters

- `admin_username` string, nullable
- `target` 'expired' | 'limited'
- `expired_after` string, date-time, nullable
- `expired_before` string, date-time, nullable

## Response `200`

Successful Response

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

## Other responses

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

---

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