<@U04UQ68083H> When creating a new identity using ...
# ory-copilot
c
@chilly-king-10285 When creating a new identity using the API, is it possible to disable the confirmation email?
b
A message from kapa.ai
Yes, it's possible to control whether verification emails are sent when creating new identities in Ory. There are two main approaches to handle this: 1. Disable email verification entirely: You can disable the verification flow in your identity schema configuration if you don't need email verification at all. 2. Control notifications for unregistered addresses: If you want to keep verification enabled but prevent sending emails in specific cases, you can use the
notify_unknown_recipients
setting. By default, the
notify_unknown_recipients
feature is disabled in newly created Ory Network projects. This feature controls whether the system sends attempted verification notifications to unregistered email addresses, which helps prevent account enumeration attacks [Attempted verification notifications](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation#attempted-verification-notifications). To enable or disable this feature, you can use either the Ory Console or the Ory CLI: Using the Ory Console: 1. Go to Authentication → Email verification 2. Toggle "Notify unknown recipients" on or off Using the Ory CLI:
Copy code
ory get identity-config --project <project-id> --workspace <workspace-id> --format yaml > identity-config.yaml
Then modify the configuration:
Copy code
yaml flows:   verification:     enabled: true     lifespan: 15m     use: code     notify_unknown_recipients: false  # Set to false to disable notifications
And update the configuration:
Copy code
ory update identity-config --project <project-id> --workspace <workspace-id> --file identity-config.yaml
This approach helps prevent account enumeration attacks while still allowing you to control when verification emails are sent.