Unsubscribe

API endpoint to unsubscribe the user from receiving emails.

Relevant for those products that have an unsubscribe page. If the user no longer wants to receive emails, they can be unsubscribed via the API endpoint, where source_id can be:

  • 8 – if the user was unsubscribed due to account blocking or deletion;
  • 9 – if the user unsubscribed from the product settings on their own.

🚧

Please note that it is impossible to unsubscribe from system emails.

Also, the following methods to unsubscribe can be used:

  • addBySettings – if the user unsubscribed on your product's settings page;
  • addByClient – if, for some reason, you unsubscribed the user in your system.
$projectId = 1;
$user = $sendios->user->getByEmail('[email protected]', $projectId);
$unsub = $sendios->unsub->addBySettings($user);
//$unsub = $sendios->unsub->addByClient($user);
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!