# does api /communication-preferences/v3/subscribe invoke double opt-in?

**URL:** <https://community.hubspot.com/t/does-api-communication-preferences-v3-subscribe-invoke-double-opt-in/83603>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [June 16, 2023, 5:22pm UTC](https://community.hubspot.com/t/does-api-communication-preferences-v3-subscribe-invoke-double-opt-in/83603 "2023-06-16T17:22:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brettski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brettski/32/98336_2.png) [@brettski](https://community.hubspot.com/u/brettski)\
**Post date:** [June 16, 2023, 5:22pm UTC](https://community.hubspot.com/t/does-api-communication-preferences-v3-subscribe-invoke-double-opt-in/83603/1 "2023-06-16T17:22:16Z")

</div>

Does the API endpoint, /communication-preferences/v3/subscribe, invoke the double opt-in email for subscriptions set to use double opt-in through settings?

If it does not, how can a double opt-in be acheived using the API?

---

<div class="post-metadata">

**Author:** ![softway](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/softway/32/20791_2.png) [@softway](https://community.hubspot.com/u/softway)\
**Post date:** [June 27, 2023, 9:35am UTC](https://community.hubspot.com/t/does-api-communication-preferences-v3-subscribe-invoke-double-opt-in/83603/2 "2023-06-27T09:35:42Z")

</div>

I have the exact same question.

I’m using the official PHP package to create a contact with API V3:

```lia-code-sample
$hubspot->crm()->contacts()->basicApi()->create(new SimplePublicObjectInput([
'properties' => $properties
]));

```

and need this process to send the double opt-in email. I have double opt-in enabled on HS.

In API V2 we would submit a “Form” via api like this:

` $response = $hubspot->forms()->submit($portal_id, $form_id, ...)`

appending a ‘legalConsentOptions’.

How can we replicate that?

It seems V2 no longer works and I’m forced to create a “Private App” with a new API Key.

The problem is that the functionality has been lost or the documentation is lacking.

---

<div class="post-metadata">

**Author:** ![brettski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brettski/32/98336_2.png) [@brettski](https://community.hubspot.com/u/brettski)\
**Post date:** [June 27, 2023, 1:22pm UTC](https://community.hubspot.com/t/does-api-communication-preferences-v3-subscribe-invoke-double-opt-in/83603/3 "2023-06-27T13:22:20Z")

</div>

Here a reply received from HubSpot support on this.

I understand, so the question basically was if when a contact is subscribed via an API if they then get the DOI email? If that is the case, the contact would _not_ receive the email because the DOI is also not tied to subscriptions. If you have the DOI feature enabled contacts will automatically get the email once the submitted a form but not because they subscribed.

So it seems only through their forms. There is the api endpoints to submit to a form, e.g. `

[https://api.hsforms.com/submissions/v3/integration/submit/`](https://api.hsforms.com/submissions/v3/integration/submit/%60). We may try this route

---

<div class="post-metadata">

**Author:** ![softway](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/softway/32/20791_2.png) [@softway](https://community.hubspot.com/u/softway)\
**Post date:** [June 27, 2023, 2:02pm UTC](https://community.hubspot.com/t/does-api-communication-preferences-v3-subscribe-invoke-double-opt-in/83603/4 "2023-06-27T14:02:43Z")

</div>

Do you have a docs page to that endpoint?

Like this one: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/marketing-api/subscriptions-preferences) but for form submissions?

---

<div class="post-metadata">

**Author:** ![brettski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brettski/32/98336_2.png) [@brettski](https://community.hubspot.com/u/brettski)\
**Post date:** [June 27, 2023, 2:37pm UTC](https://community.hubspot.com/t/does-api-communication-preferences-v3-subscribe-invoke-double-opt-in/83603/5 "2023-06-27T14:37:29Z")

</div>

No I do not. I believe we got the end point from the form when creating it. I did find this via googling: [https://legacydocs.hubspot.com/docs/methods/forms/submit\_form](https://legacydocs.hubspot.com/docs/methods/forms/submit_form)

I personally find it very confusing that there are “legacy docs” and v3 docs, with much of the “legacy docs” still active and important. 🤷‍
