Transactional Email via API Unsublink not working

rindoshaldo

New Member
Hi guys,

I'm trying to send transactional emails through API however the token [UNSUBSCRIBE_LINK] does not work, and it just shows the actual token in the email ...

how can i make it so transactional emails will also get a optout link and get added to the global suppression list.. So in the event next time it will deny the api request.

Is this possible?
 
That's expected, transactional emails are totally disconnected from lists, campaigns, etc.
If you know the list and the subscriber in the list, you can construct the unsubscribe url manually.
Assuming you're sending the transactional email via API, with the same api you can get info about the subscriber and list and construct the unsub url like:
Code:
https://domain.com/index.php/lists/[LIST_UID]/unsubscribe/[SUBSCRIBER_UID]

Adding to the suppression list will be more tricky as there is no api endpoint for it. BUT you could search the subscriber in list and if the status is any other then confirmed, don't send the transactional email.
 
That's expected, transactional emails are totally disconnected from lists, campaigns, etc.
If you know the list and the subscriber in the list, you can construct the unsubscribe url manually.
Assuming you're sending the transactional email via API, with the same api you can get info about the subscriber and list and construct the unsub url like:
Code:
https://domain.com/index.php/lists/[LIST_UID]/unsubscribe/[SUBSCRIBER_UID]

Adding to the suppression list will be more tricky as there is no api endpoint for it. BUT you could search the subscriber in list and if the status is any other then confirmed, don't send the transactional email.
Thanks for the speedy response.. problem is these are not contacts added to the system. (i just use API transactional email to send emails via API) they never get added to a list or a campaign, there is no way of creating a opt-out link so their email never gets hit again with another API request/campaign?
 
In this case you need to manage the process on your own :(
You could still potentially add them(if legislations allows it for your case) to a list with single opt-in and single opt-out only to get the benefit of the unsubscribe feature, etc.
Otherwise, you have to design your own unsubscribe process.
Or you could create an endpoint in the api where you add these emails in the customer blacklist, and add them there when they unsubscribe, this way, next time when you try to send, the transactional email will be accepted but won't go out because the email is blacklisted.
So you have some options, none simple...
 
Back
Top