---
updatedAt: 2026-11-06T08:41:45.000Z
agentTools:
  projectIndex: https://docs.esputnik.com/llms.txt
---

# Double Opt-In

Learn how to configure double opt-in for a third-party form via API

<HTMLBlock>{`
<p align="right" style="color: gray;">
  <a href="https://docs-ua.esputnik.com/docs/nalashtuvannya-formi-pidpiski-ta-podvijnogo-pidtverdzhennya" style="color: gray; text-decoration: none;"><em>
    Read this article in Ukrainian ⮕
  </em></a>
</p>
`}</HTMLBlock>

**Double opt-in (DOI)** sends an additional email to a user after they submit a subscription form. It helps verify the email address and confirm that the contact wants to receive future communications. A subscriber becomes confirmed only after clicking a link or button in this email.

In eSputnik, you can configure subscription forms in three ways:

1. Built-in forms (<Anchor target="_blank" href="https://docs.esputnik.com/docs/setting-up-widgets-for-your-site">widgets</Anchor>) — created directly in your account.
   <Callout icon="📘" theme="info">
     ### Note

     **Double opt-in** for these forms **requires no additional setup**. System automatically creates the workflow and confirmation email.
   </Callout>

To use a custom workflow and confirmation emails, follow the  <Anchor target="_blank" href="https://docs.esputnik.com/docs/replacing-double-opt-in-system-workflow">instructions</Anchor> to replace the default Double Opt-In workflow.

<Callout icon="📘" theme="info">
  ### Note

  Each step of the widget subscription flow has its own language logic:

  - The widget is displayed in the language of the site page.
  - The subscription confirmation email is sent in the language of the user's browser.
  - The default subscription confirmation page ("Thank you for subscribing") is single-language: it's displayed in the language selected when the account was registered. To change its language, contact [support@esputnik.com](mailto:support@esputnik.com).

  To show your own confirmation page instead of the default one, specify the URL of a page on your verified domain in the widget settings — in the block that defines where the user is redirected after clicking the confirmation link.
</Callout>

2. Wix forms — use them for websites built on the Wix platform. They require additional setup. <Anchor label="Learn more in the guide >" target="_blank" href="https://docs.esputnik.com/docs/integration-with-wix-forms">Learn more in the guide ></Anchor>
3. Third-party forms integrated via <Anchor target="_blank" href="https://docs.esputnik.com/reference/subscribecontact-1">API</Anchor> — use them for custom or self-built forms on your website.

Next, configure **Double opt-in** for a third-party form integrated via API.

> 📘 A confirmed subscription is required for bulk campaigns
>
> Until a contact confirms the subscription, you can only send them transactional messages. A consent checkbox on your own form does not replace confirmation: an address collected that way still has to go through double opt-in before it can be included in a bulk campaign.

## Setting Up a Subscription Form

You can integrate subscription form via API method [Subscribe contact](https://docs.esputnik.com/reference/subscribecontact-1). When a contact fills out the form, the following events are sent to your account:

* `subscribeFromApi` (when a contact fills out a form for the first time);
* `subscribeUpdateFromApi` (when filling again).

After setting up data transferring, create an email and two [workflows](https://docs.esputnik.com/docs/building-and-editing-workflows). The first workflow sends subscription confirmation email, the second makes a contact active.

<Callout icon="📘" theme="info">
  ### Note

  - When an unsubscribed contact subscribes again via the [Subscribe contact](https://docs.esputnik.com/reference/subscribecontact-1) resource, the contact becomes unconfirmed and receives the subscription confirmation email. The contact becomes active only after following the confirmation link.
  - If the contact was deleted, re-subscribing with the confirmation email restores them from the **Deleted** section. Until the contact clicks the confirmation link, they remain unconfirmed.
</Callout>

## Setting Up Confirmation Email

Create an email that the subscriber will receive after filling out the form.

1. Go to **Messages → Messages → Email** and click **New Email**.

<Image src="https://files.readme.io/33416af472f796c0c72ae2b1cc81a218c5e7176ab7cdaedc15a1e0d248659e20-image.png" align="center" width="80%"  alt="Messages list with the Email tab selected and the New Email button highlighted" />

2. Open the **Gallery** tab and select the **Welcome** email from the **Lifecycle emails** templates.

<Image src="https://files.readme.io/a39ea5242f4dd8c9c2a621b6066c30fa4c849c744e86f4c896208944238a545c-image.png" align="center" width="80% "  alt="Create new Email gallery with Lifecycle emails category and the Welcome template highlighted" />

Email confirmation block with default text and button looks like this:

<Image src="https://files.readme.io/dffdd416079593e3de2b5905f4ab8fd94367358463115b59594df3bb17b012df-image.png" align="center" width="80% "  alt="Email editor for Welcome to our family! with the confirmation text and Confirm my email button highlighted" />

3. Design the email in your brand style and enter the required text.
4. Link the [event](https://docs.esputnik.com/docs/creating-events) to the button or to the link in the email to launch the required workflow.

Select a block with a [button](https://docs.esputnik.com/docs/amp-technology-in-emails#cta-buttons) in the email. In the left panel, in the corresponding field, select the pre-prepared event `Confirmed subscription`:

<Image src="https://files.readme.io/45e7c1cd04415e0ab6086b0f0b447683514fdb9c3fdc4f03af23b1495323118a-image.png" align="center" width="80% "  alt="Email editor Button block panel with the Event type field set to Confirmed subscription" />

In the left settings panel, you can specify a link to the subscription confirmation page.

<Image src="https://files.readme.io/a234a2585d0acb9d777cd4342629fc179a457362902fb6377bb66b5b56030d85-image.png" align="center" width="80% "  alt="Email editor Button block panel with the Link field highlighted showing a site URL" />

> 📘 Note
>
> The **Link** can point to any page you host, including a custom confirmation page in your own design. The **Confirmed subscription** event fires when the button is clicked, regardless of the destination URL — the linked page itself doesn't need to call any API to confirm the subscription.

## Setting Up the Workflows

To send the confirmation email and change the contact status to active, you need to create two workflows.

### Workflow for Sending Confirmation Email

Filling out the form can launch 2 types of events.

1. `subscribeFromApi` — creating a new contact.
2. `subscribeUpdateFromApi` — Contact update (re-filling the form).

Only a request to the **Subscribe contact** method creates these events. A contact that arrived another way — by import, through another API method or through a custom event — does not create them and does not enter the workflow: belonging to a subscribers group has no effect on the launch.

<Image src="https://files.readme.io/2a4b318b7377bd24aeb14fc053a74dd4db87589c3e4f49bf61487d91779bb073-image.png" align="center" width="80% "  alt="Event types page filtered by Subscribe showing the subscribeFromApi and subscribeUpdateFromApi event types" />

To create a workflow:

1. Go to **Automation → Workflows** and click **New workflow**.

<Image src="https://files.readme.io/9712023f096e6dc45be5b84c9eeb79a29eb98427e8e1229011d304681c6372be-image.png" align="center" width="80% "  alt="Automation menu with Workflows selected and the New workflow button highlighted" />

2. Enter the workflow name and add the **Start**, **[Send obligatory (transactional) Email](https://docs.esputnik.com/docs/sending-blocks#transactional-messages)**, and **End** blocks.
3. In the **Send obligatory (transactional) Email** block parameters, select the required email: Confirmation email.

<Image src="https://files.readme.io/e71983cc52b4740e5d33c3c6b4d5e957ddf7e7e9e4a237bea640842721d192e5-image.png" align="center" width="80% "  alt="Workflow builder with a Send obligatory (transactional) email block with Message set to Confirmation" />

<Callout icon="📘" theme="info">
  ### Note

  A confirmation email marked as obligatory is sent to unsubscribed contacts as well. This is the intended behavior of double opt-in: the obligatory flag lets a contact who previously unsubscribed confirm the subscription again and become available for campaigns.
</Callout>

4. Click **Save and exit**.

### Workflow to Confirm a Contact

This workflow launches after clicking the button in the confirmation email and makes a contact available for further campaigns.

To create the workflow:

1. Go to **Automation** → **Workflows** and click **New workflow**.
2. Enter the workflow name and add the **Start**, **[Confirm contact](https://docs.esputnik.com/docs/actions-blocks#confirm-contact)**, and **End** blocks. The **Confirm contact** block requires no additional configuration.

<Image src="https://files.readme.io/4987b965392327bdf026732c3e9ad4e48f2e11d109bbd866a06cf81feb618267-image.png" align="center" width="80% "  alt="Workflow builder with a Confirm contact block" />

3. Click **Save and exit**.

#### Welcome Emails Chain After Confirm Contact Block

To send a welcome series, you need to supplement your **Confirm contact** workflow.

<Image src="https://files.readme.io/8dac94e7077f45346d211c29d56e2964a2f3b37bd1cf4f8840356b3e8021e235-image.png" align="center" width="80% "  alt="Workflow builder with Confirm contact, a Welcome for all email, a 1-day timer, and a second Email block connected to End" />

### Launching Workflow Conditions

1. Go to **Start/stop configuration** of created workflows.

<Image src="https://files.readme.io/c6f8314f53598949fbfc42ca7b2f67bfbe517e38d5033a9a2ac1a22a7f9c0aa0-image.png" align="center" width="80% "  alt="Workflows list with the Start/Stop configuration links highlighted for the Confirm contact and Filled form workflows" />

2. Select the following events:

* `subscribeFromApi`: Filled form workflow
* `Confirm contact`: Confirm contact workflow.

<Image src="https://files.readme.io/46a27170405eb6223d0c4fcba4fb2bc97ea876f69e0d2bdd954333ee89168bcd-image.png" align="center" width="80% "  alt="Start/Stop configuration dialog with Event-based option and the subscribeFromApi event selected" />

[Learn more about creating events >](https://docs.esputnik.com/docs/creating-events)

3. Click **Apply**.
4. Activate workflows.

<Image src="https://files.readme.io/f208b17fba72f085af37f08893286b804267b9d5942421263db84255e52f9f37-image.png" align="center" width="80% "  alt="Workflows list with the Activate icons highlighted for the Confirm contact and Filled form workflows" />

If needed, set up processing unique events (1 hour by default). You can opt that the contacts who fill in the subscription form several times a day still receive only one confirmation email. In case of re-subscribe, another event -  `subscribeUpdateFromApi` - will be sent. The confirmation email won't be sent, and contact data will be updated.

<Callout icon="📘" theme="info">
  ### Important

  The segment for contacts who have confirmed subscription is created in the system by default, but if you transfer data via the API, you can specify the name of the segment in the request.

  If the subscribe request specifies a list of segments to which the contact should be added after subscribing, and then the workflow checks for membership in one of these segments, use a timer of at least 4 minutes between these actions. This will ensure the correct workflow operation and consistent execution of all requests in the system.
</Callout>

## Follow-Up Welcome Series

You can add a welcome email or a series of welcome emails to your contact confirmation workflow. They will be sent after the contact confirms the subscription and gets active in the system. You can vary the number of welcome emails depending on your needs.

<Image src="https://files.readme.io/811c00912251d4fd6aa6e30388c8e86e3fcd8e492777cf3c53d36093d00081ea-image.png" align="center" width="80% "  alt="Workflow builder named Welcome Series with Confirm contact followed by Welcome, Follow-up 1, and Follow-up 2 emails separated by 1-day timers" />

<Callout icon="📘" theme="info">
  ### Note

  A contact becomes available (active) for your campaigns only after they confirm their subscription in the confirmation email. You cannot send broadcasts to unconfirmed contacts.
</Callout>

After all the settings, run a test: fill in the form on the website and check if your email address gets to the segment Subscribers in the system. This segment is the default, but you can specify the segment name in the request if you send contact data via API.

If the subscribe request specifies a list of segments to which the contact should be added after subscribing, and then the workflow checks for membership in one of these segments, use a timer of at least 4 minutes between these actions. This will ensure the correct workflow operation and consistent execution of all requests in the system.

## Notes

1. If you have several forms assigned to different confirmation emails, you need to create separate workflows and events for each form.

<Callout icon="❗️" theme="error">
  ### Important

  For the event category Click, Key is a required field. The text is optional, but we recommend using Latin without numbers. For example: click, subscription, confirmation, etc.
</Callout>

2. When creating a subscription form, add a checkbox with your terms of use. According to the [GDPR rules](https://docs.esputnik.com/docs/gdpr-compliance), the user must check the box to confirm they agree to your terms of use and privacy policies and want to receive broadcasts from you.

<Callout icon="❗️" theme="error">
  ### Important

  For an EU audience, don't auto-subscribe contacts to promotional communications through the same email that confirms the double opt-in — this isn't GDPR-compliant. Promotional consent needs its own explicit action, such as a separate button or checkbox, not a checkbox pre-checked or implied by the DOI confirmation itself.
</Callout>

<br />