This is a simplified showcase of how you can easily build your own Optin form in WordPress.
It can connect to any API that supports cURL (most of them do). There is no error reporting implemented. It uses exit intent detection script called Ouibounce, which needs to be enqueued in your functions.php