How does it work

If you are not a developer, read this article, it will make it much easier to use API 2.0.

You can unsubscribe contacts by making a request to the service API programmatically.

The request is sent by the POST method in the URLencode format to the address: https://username.justclick.io/api/unsubscribelead, where username is the user’s login in the system and his 3rd level domain in the JustClick service.

In response to the request, your system will receive the function execution result in JSON format. For example, like this:

{"error_code":0,"error_text":"OK","result":[],"hash":"******************************"}

For more details, see the article “Service API Responses“.

Parameters passed in the request

The request parameters are as follows, the required parameter is “rps_key” – your API key:

  • rpsKey – API key; the key for your account is in the “Integration and API” section, the link to the section is in the footer of your personal account or here /shops/setts/apisettings/
  • lead_email – contact email (if not specified, it will be created without email); line

As a result, the contact will be completely unsubscribed from your account.

PHP example (cURL)

<?php

  $curl = curl_init();

  curl_setopt_array($curl, array(
   CURLOPT_URL => 'https://username.justclick.io/api/unsubscribelead', //your username
   CURLOPT_RETURNTRANSFER => true,
   CURLOPT_ENCODING => '',
   CURLOPT_MAXREDIRS => 10,
   CURLOPT_TIMEOUT => 0,
   CURLOPT_FOLLOWLOCATION => true,
   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
   CURLOPT_CUSTOMREQUEST => 'POST',
   CURLOPT_POSTFIELDS => 'rpsKey={your API key}&lead_email={lead email}',
   CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>

Rate article

1 star2 stars3 stars4 stars5 stars (No votes)
Loading...