> For the complete documentation index, see [llms.txt](https://www.locksmith.guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.locksmith.guide/keys/more/newsletter-keys.md).

# Newsletter keys

Locksmith allows you to integrate directly with either **Mailchimp** or **Klaviyo**. When setup, Locksmith will ask customers for an email address when they arrive on a locked page. Once the email is entered, a customer is immediately granted access, and Locksmith will automatically send the subscription information to the corresponding service.

![](/files/1onUSNeUaUHZ28DKy2Hi)

{% hint style="info" %}
**Note**: Mailchimp and Klaviyo both have their own policies regarding double opt in, and it is typically enabled by default. This setting is adjusted in your Mailchimp or Klaviyo dashboards - it is not a setting that is controlled by Locksmith.
{% endhint %}

## Mailchimp

Detailed information on how to setup Mailchimp can be found here:

{% content-ref url="/pages/1gBNBlY4Klt4vAB8hcIc" %}
[Use Mailchimp to collect customer emails](/tutorials/more/mailchimp.md)
{% endcontent-ref %}

## Klaviyo

If using Klaviyo, you have the option to simply request that visitors subscribe in order to gain access:

{% content-ref url="/pages/z1IVLGpbpnWnaD5XQ6MI" %}
[Grow your subscriber lists with Klaviyo](/tutorials/more/klaviyo.md)
{% endcontent-ref %}

Or, you can also use Klaviyo to grant access only to those who are *already* subscribed to a specific list in your Klaviyo account:

{% content-ref url="/pages/77iwUv68N0neEBD4ZfM9" %}
[Use a Klaviyo list or segment as an access control list](/tutorials/more/use-a-klaviyo-list-or-segment-as-an-access-control-list.md)
{% endcontent-ref %}

## Using your default Shopify mailing list

Shopify ships out of the box with a marketing mailing list service. If you would like to use Locksmith to grant access to those who have already subscribed to this, you can do so using a custom Liquid key condition.

This is slightly different than the above options, in that **it will only grant access to a signed in customers - if the customer is already subscribed**! To start, check out our guide on this here:

{% content-ref url="/pages/ve2JX4pz2jetN297ciB6" %}
[Custom Liquid key-condition basics](/keys/more/custom-liquid-key-condition-basics.md)
{% endcontent-ref %}

The condition you're looking for is:

`{% if customer.accepts_marketing %}`

When set up, this will present the customer will the regular prompt to sign in (as opposed to the subscription prompt):

![](/files/VQwivnx6b2jpZMbm3Baj)

If desired, you can adjust your message prompt to direct your customers to the page footer(in most stores) to subscribe to your newsletter. More information on editing messages here:

{% content-ref url="/pages/YN4tss8Ren6LqyAQ78LD" %}
[Customizing messages](/tutorials/more/customizing-messages.md)
{% endcontent-ref %}

## Using other mail services

Locksmith does not support other mail services at this time.

However, if you have a mail service that automatically tags customers that are subscribed, you can use Locksmith to check for a customer tag:

{% content-ref url="/pages/vojen44dvTjRpsHujhOA" %}
[Customer account keys](/keys/customer-account-keys.md)
{% endcontent-ref %}

Please feel free to contact us via email at **<team@uselocksmith.com>** if you have any questions!

### Related pages:

{% content-ref url="/pages/7PIPytApjJcujLf3YPWc" %}
[Why isn't my passcode, secret link, newsletter, or location key working?](/faqs/more/why-isnt-my-remote-key-condition-working.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.locksmith.guide/keys/more/newsletter-keys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
