{"record":{"id":"5637cfd8f312dd0c","repo":"langgenius/dify","slug":"account-in-freeze","errorCode":"account_in_freeze","errorMessage":"This email account has been deleted within the past 30 daysand is temporarily unavailable for new account registration.","messagePattern":"This email account has been deleted within the past 30 daysand is temporarily unavailable for new account registration\\.","errorType":"error_code","errorClass":"AccountInFreezeError","httpStatus":400,"severity":"error","filePath":"api/controllers/console/auth/activate.py","lineNumber":168,"sourceCode":"        \"\"\"\n\n        normalized_request_email = req_data.email.lower() if req_data.email else None\n        invitation = RegisterService.get_invitation_with_case_fallback(\n            req_data.workspace_id, req_data.email, req_data.token, session=db.session()\n        )\n        if invitation is None:\n            raise AlreadyActivateError()\n\n        account = invitation[\"account\"]\n        if extract_access_token(request):\n            current_account, _ = current_account_with_tenant()\n            if current_account.id != account.id:\n                raise InvitationAccountMismatchError()\n\n        if dify_config.DEPLOYMENT_EDITION == DeploymentEdition.CLOUD and BillingService.is_email_in_freeze(\n            account.email\n        ):\n            raise AccountInFreezeError()\n\n        tenant = invitation[\"tenant\"]\n        raw_role = invitation[\"data\"].get(\"role\")\n        try:\n            role = TenantAccountRole(raw_role) if raw_role else TenantAccountRole.NORMAL\n        except ValueError:\n            role = TenantAccountRole.NORMAL\n        if not TenantAccountRole.is_non_owner_role(role):\n            role = TenantAccountRole.NORMAL\n\n        membership_id = db.session.scalar(\n            select(TenantAccountJoin.id).where(\n                TenantAccountJoin.tenant_id == tenant.id,\n                TenantAccountJoin.account_id == account.id,\n            )\n        )\n\n        requires_setup = invitation[\"data\"].get(\"requires_setup\")","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/api/controllers/console/auth/activate.py#L150-L186","documentation":"Raised as AccountInFreezeError (code 'account_in_freeze') on DeploymentEdition.CLOUD when BillingService.is_email_in_freeze(account.email) is true — the email was deleted within the last 30 days and is blocked from re-registration or re-activation on cloud.","triggerScenarios":"POST /console/api/activate (or /email-register/send) on the Cloud edition for an email whose account was deleted within the past 30 days; BillingService still reports it as frozen.","commonSituations":"User deleted their account and immediately tries to re-register/accept a new invite with the same email; admin re-invites a recently removed member before the freeze window elapses.","solutions":["Wait until the 30-day freeze window elapses, then retry activation/registration.","Contact support to have the email manually unfrozen if the deletion was a mistake.","Use a different email address to accept the invitation now."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await post('/activate', payload);\n} catch (e) {\n  if (e.code === 'account_in_freeze') {\n    // show: 'email unavailable for 30 days after deletion; contact support or use another email'\n  } else { throw e; }\n}","preventionTips":["Don't delete-then-recreate the same email expecting immediate reuse on Cloud.","Use a distinct email or wait out the freeze window."],"tags":["api","auth","cloud","billing","account","freeze"],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}