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.
POST
/api/domains/cleanup
curl \
--request POST 'https://[tenant_id].logto.app/api/domains/cleanup' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"staleDays":42.0}'
Request examples
{
"staleDays": 42.0
}
Response examples (200)
{
"scannedCount": 42.0,
"deletedCount": 42.0,
"skippedActiveCount": 42.0,
"failedCount": 42.0
}