# Cleanup stale domains **POST /api/domains/cleanup** Clean up custom domains that have been inactive (not verified) for a specified number of days. This uses Cloudflare as the source of truth to determine domain activity. ## Servers - Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.) ## Authentication methods - O auth2 ## Parameters ### Body: application/json (object) - **staleDays** (number) The number of days a domain must be inactive before it is considered stale and eligible for cleanup. ## Responses ### 200 The cleanup result summary. #### Body: application/json (object) - **scannedCount** (number) - **deletedCount** (number) - **skippedActiveCount** (number) - **failedCount** (number) ### 400 Bad Request ### 401 Unauthorized ### 403 Forbidden [Powered by Bump.sh](https://bump.sh)