Subscriber status

This method can be applied on your server-side, in order to check the status of a subscriber (subscribed / unsubscribed)

Method: GET

URL: https://api.retargeting.app/v1/subscriber-status

Field Type Required Description
k number or text True The REST API Key can be found into your account Settings -> Integration -> REST API Key, second field.
email email True Email you want to check the status for

Your account status must be in one of the states: PAID, PAYMENT ERROR or ACCOUNT SUSPENDED.

If your account is Inactive or Closed the API call will not work.

The API call will respond with JSON format.

Example

1    <?php
2    require_once "vendor/autoload.php";
3 
4    $apiURL = "https://api.retargeting.app/v1/";
5    $apiKey = "MyAPI_REST_Key";
6 
7    $client = new GuzzleHttp\Client();
8 
9    $statusData = [
10        "k" => $apiKey,
11        "email" => "email@example.com"
12    ];
13 
14    $statusRequest = $client->request("GET", $apiURL . "subscriber-status", ["query" => $statusData]);

If the API call succeeds, then the response will be as seen below:

1 {
2     status: "success",
3     data: {
4         "email": "subscribed"
5         "sms": "subscribed"
6     }
7 }

If the API call fails, the response will be as seen below:

1 {
2     status: "error",
3     data: "Subscriber not found!"
4 }