https://<subdomain>.sendsmaily.net/api/contact.php


Parameters

All parameters must be URL encoded.


Parameter

Value

list

ID of the user-made filter. Listing IDs can be done with “List user-made filters”. Required.

offset

So-called “page” number, which begins at 0. 0 gives contacts from 0 to 25000. 1 gives 25001 to 50000 etc. If not specified, 0 will be set.

limit

Number of subscribers on one “page”. If not specified, 25000 will be set, which is also the maximum value. If set as more than 25000, no error will be given, but the value will be defaulted back to 25000.


Results are sorted increasingly, based on the email address. Field values and their meanings see at Response codes.

In addition to email address and subscription status, latest delivery status code is given - last_response_code. The last_response_code field values and their meanings see at Possible results.


Example query:


Load subscriber data from list

Get data from the list “Estonian subscribers” (ID: 1).

 

$username = 'YOUR_USERNAME';
$password = 'YOUR_PASSWORD';
$location = 'https://<subdomain>.sendsmaily.net/api/contact.php';
$query = 'list=1&offset=4&limit=25000';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $location . '?' . $query);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");

$result = curl_exec($ch);
curl_close($ch);


Result for a successful query:

  

[
  {
    "email": "support@smaily.com",
    "is_unsubscribed": 0,
    "created_at": "2014-04-23 10:32:55",
    "modified_at": "2015-03-22 19:22:31",
    "last_open_at": "0000-00-00 00:00:00",
    "total_opens": "0",
    "last_click_at": "0000-00-00 00:00:00",
    "total_clicks": "0",
    "kuuluvus_1": "jah",
    ...
  },
  {
    "email": "tugi@smaily.com",
    "is_unsubscribed": 1,
    "created_at": "2014-04-23 10:32:55",
    "modified_at": "2015-03-22 19:22:31",
    "last_open_at": "0000-00-00 00:00:00",
    "total_opens": "0",
    "last_click_at": "0000-00-00 00:00:00",
    "total_clicks": "0",
    "kuuluvus_1": "jah",
    ...
  },
  ...
]

 

 See also other possible results from Possible results.