Skip to main content
Answered

How to add unsubscribe links to emails sent with API

  • October 12, 2020
  • 1 reply
  • 312 views

Hello guys.

I was wondering how can I send unsubscribe links with emails I send with the API (create conversation) I've tried few things:

  1. Add {{ unsubscribe_link }} to the email but I got back an error: "there is no variable called 'unsubscribe_link'"
  2. Create the unsubscribe link myself but I noticed that in order to do so I most modify the conversation id, and unfortunately I only manage to get it after I send the message.
  3. Change template - tried to create a custom template with the unsubscribe button but it seems like the create message API doesn't support any other template besides "plain" and "personal".
  4. Add unsubscribe button to all mails by default - couldn't find any setting like this

 

Any suggestions?

Best, Tomer.

Best answer by Roy

Hello @tomer​ , As far as I know, unsubscribe links only appear in e-mails sent from outgoing campaigns. 

 

Unfortunately, there is no way to create an outgoing e-mail campaign from API, it's only available in the Intercom web interface.

 

Here some workaround:

1) You can build a script and include this URL in the e-mails.

2) Once the user clicks these links: https://example.com/unsubscribe/userid?key/p>

3) Update user parameter via API "unsubscribed_from_emails=true"

 

Hopes this helps.

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+5
  • Expert User
  • 1152 replies
  • Answer
  • October 13, 2020

Hello @tomer​ , As far as I know, unsubscribe links only appear in e-mails sent from outgoing campaigns. 

 

Unfortunately, there is no way to create an outgoing e-mail campaign from API, it's only available in the Intercom web interface.

 

Here some workaround:

1) You can build a script and include this URL in the e-mails.

2) Once the user clicks these links: https://example.com/unsubscribe/userid?key/p>

3) Update user parameter via API "unsubscribed_from_emails=true"

 

Hopes this helps.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings