How can I prevent the registration email from being send if a customer is registered using the REST API (storeurl/store-api/account/register)? I already tried to set the flag "acceptedDataProtection" to true.
I am trying to register our customers from another database to Shopware, therefor they already have accepted the data protection and should not be receiving an email telling them that they have to opt-in again.
Just add a tag to that customer like "migrated" and then check via rule for tag != migrated
in the flow builder. There should be an entry for the registration event. This would be the easiest way and also the one without any additional individualization needed. You can also check for the sales channel, when using the headless sales channel for the registrations and exclude it.