Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

Trigger double opt-in notification for customer created via API

Shopify Partner
32 0 15

I'm wondering if there's a way to trigger the double opt-in email notification when creating a customer via the REST (or GraphQL) API. If you have that setting on, it doesn't appear to send a double opt-in regardless of the "email_marketing_consent" state or opt-in level.


Does the double opt-in only work when subscribing using the storefront APIs?

Replies 6 (6)

Shopify Staff
129 15 24

Hey @MarcBaumbach - thanks for reaching out and for this great question. 


I was able to get in touch with our developers on this  - specifically about how customer creation through the Admin API works and how it further  relates to marketing consent/double opt-in on the customer level. At the moment, it is expected behaviour of the Admin API that the double opt-in email won't trigger when a customer is created through the Admin API, even if the the marketing consent fields are properly populated. You are correct though, that the only way to trigger the opt-in emails through our APIs is by making a createCustomer mutation request through our Storefront API.


That said, I'm going to pass along some feedback to our developers directly so that we can take a look at adding this type of functionality to the Admin API, as I definitely understand how it would be useful within the wider context of an app that already uses the Admin API as part of its workflow. I can't guarantee what the response will be here or what the timeline would be - but I'm happy to advocate for this on my end - can definitely see where there would be a use case for this functionality in the Admin API 


I'm also going to get in touch with the team that handles our developer documentation to see if they can provide more clarity when it comes to expected behaviour for email consent/double opt-in functionality for our APIs.


Let me know if I can clarify anything on our end here - cheers! 

Alan | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit or the Shopify Web Design and Development Blog

Shopify Partner
32 0 15

Thanks @Alan! I appreciate you vouching for us. As an email service provider (Seguno) that is dedicated to working closely with Shopify's data and treating Shopify as the system of record we try to ensure that the experience is consistent regardless of how you get your data into Shopify. I think this would also affect the Shopify Email experience as well, which depends on the double opt-in for certain merchants who require it based on their local laws.


I'd be happy to chat at any point about any ways we can help or test any solutions out. Thanks again!

3 0 2

Dear @Alan and @MarcBaumbach I've came across the problem too. We at OptiMonk are a website personalization tool that offers subscription popups and embedded solutions and some of our customers are required to use double opt-in, but the Admin API's Customer resource (we're using the REST API) doesn't triggers the DOI confirmation.

I think we tried the same as @MarcBaumbach earlier this year.

Is there and news @Alan about the DOI triggering via Admin API?


Can you elaborate WHY the API does not work this way we need? Why on earth does the marketing opt-in level contain the confirmed_opt_in setting in a PUT action if it doesn't work - both in REST and GraphQL the option is there?


Thanks in advance.

Shopify Partner
5 0 1

Dear @Alan, is there an update on this?

Shopify Partner
5 0 1

Dear @Alan, is there an update on this? It seems that the behavior is still unchanged. Using the GraphQL Storefront API works fine for new users. But for existing users it's impossible to trigger the opt-in email without having the user's password, which is necessary for the updateCustomer mutation request. That is really inconvenient in this case.

Shopify Partner
3 0 1

Hey @Alan We'd love to see this capability added to the API as well. We have several merchants requesting it particularly from the EU.


Also, curious to know if anyone has found a workaround using Shopify Flow?