listNew — create new mail list

listNew (string apikey, string name)

Method creates new mail list.

Parameters
apikey Your account API key
name Neme for mail list
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output=json

Request form: http://api.feedgee.com/1.0/listNew?apikey=APIKEY&name=NAME

The return value: the data of the created list
success 1 for success, 0 for error
errors Number of errors
error Error description
code Error code
warning Additional warnings for xml, empty when null
data Array with mail list data
MailLst Array with id and mail list name
id mail list unique number
name

mail list name

Example (XML)

<ResultOfMailList>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<MailList>
<id>int</id>
<name>string</name>
</MailList>
</data>
</ResultOfMailList>

Example (JSON)

{
"success":int,
"errors":int,
"error":"string",
"warning":"string",
"code":int,
"data":
[{"id":"int",
"name":"string"},
}

Request in PHP

<?
// Your key to access the API
$api_key = "00000000000000000000000000000000";
//Method name
$method = "listNew";
echo "Method: " . $method. "<br>";
//parameters
$name = "list1";
$parameters = "apikey=$api_key&campaign_id=$campaign_id&name=$name";
echo "Parameters: " . $parameters. "<br>";
// Create a GET-request
$api_url = "http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo "Url: " . $api_url . "<br><hr/>";
// Make a request to the API-server
$result = file_get_contents($api_url);
if ($result) {
// Decoding of answer API-server
$jsonObj = json_decode($result);
if(null===$jsonObj) {
// Error in the received reply
echo "Invalid JSON";
}
else {
// Error of get the mail list data
if(!empty($jsonObj->error)) {echo "An error occured: " . $jsonObj->error . "<br/>";}
// Display the names and values
echo "Here's a list of your data:<br>";
foreach ($jsonObj->data as $key => $jsons) { // This will search in the 2 jsons
foreach($jsons as $key => $custom) {
if(is_array($custom)){
echo $key . ":<br/>";
foreach ($custom as $one) {
echo "&nbsp;&nbsp;&nbsp;&nbsp;->" . $one->name . ":" . $one->value . "<br/>";
}
} else {
echo $key . ":" . $custom . "<br/>";
}
}
}
}
} else {
// Error connecting to API-server
echo "API access error";
}
?>

SOAP request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:listNew>
<tem:apikey>string</tem:apikey>
<tem:name>string</tem:name>
</tem:listNew>
</soapenv:Body>
</soapenv:Envelope>

listGetAll — get all mail lists Ids and names

listGetAll (string ApiKey)

Method outputs all mail lists' Ids and mail lists' names from your account. Mail list Id after can be used to call other mail list or subscribers methods.

Parameters
apikey API key to access to your account
By default output is in XML. To get result in JSON add additional parameter &output=json

Request form: http://api.feedgee.com/1.0/listGetAll?apikey=API_KEY

The return value
success 1 for success, 0 for error
errors Number of errors
error Error description
code Error code
warning Additional warnings for xml, empty when null
total Total number of mail lists
data Array with mail lists
MailLst Array with Id and mail list name
id mail list unique number
name mail list name

Example (XML)

<ResultOfMailList>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<MailList>
<id>int</id>
<name>string</name>
</MailList>
<MailList>
<id>int</id>
<name>string</name>
</MailList>
</data>
</ResultOfMailList>

Example (JSON)

{
"success":int,
"errors":int,
"error":"string",
"warning":"string",
"code":int,
"data":
[{"id":"int",
"name":"string"},
{"id":"int",
"name":"string"}]
}

Request in PHP

<?
// Your key to access the API
$api_key = "00000000000000000000000000000000";
//Method name
$method = "listGetAll";
echo "Method: " . $method. "<br>";
// Create a GET-request
$api_url = "http://api.test.feedgee.com/1.0/$method?apikey=$api_key&output=json";
echo "Url: " . $api_url . "<br><hr/>";
// Make a request to the API-server
$result = file_get_contents($api_url);
if ($result) {
// Decoding of answer API-server
$jsonObj = json_decode($result);
if(null===$jsonObj) {
// Error in the received reply
echo "Invalid JSON";
}
elseif(!empty($jsonObj->Error)) {
// Error of get the list of subscribers
echo "An error occured: " . $jsonObj->Error;
} else {
// Displays the codes and titles of all available lists
echo "Here's a list of your mailing lists:<br>";
foreach ($jsonObj->data as $one) {
echo "List #" . $one->id . " (" . $one->name. ")". "<br>";
}
}
} else {
// Error connecting to API-server
echo "API access error";
}
?>

SOAP request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:listUnsubscribe>
<tem:apikey>string</tem:apikey>
<tem:list_id>int</tem:list_id>
<tem:emails>string</tem:emails>
<tem:phones>string</tem:phones>
</tem:listUnsubscribe>
</soapenv:Body>
</soapenv:Envelope>

listSubscribeOptInNow — add subscriber to mail list

listSubscribeOptInNow (string apikey, int list_id, string email, string phone, string mobilecountry, string fname, string lname, string names, string values, bool optin, bool update_existing)

This method adds subscribers to your account Address Book and subscribes them to requested mail list. It also updates profiles for existing in your Address Book subscribers. A new profile is added to mail list with Subscribed status. Not empty value either for email or phone is required.

Parameters
apikey Your account API key
list_id mail list Id (can be received with listsGetAll)
email Email
phone Mobile phone
mobilecountry Country name for mobile number international format validation (must be in English)
fname Name of subscriber
lname Last name of subscriber
names Custom field names and values (make comma separated if several)
gender Gender
language Language
dateofbirth Date of birth
city City
zip Zip
stateorprovince State or province
country Country
interests Interests
occupation Occupation
values Values for subscriber profile custom fields (make comma separated if several)
optin Set TRUE if you want opt-in confirmation to be sent to subscribers email
update_existing Set TRUE if you want to update custom fields of existing subscribers
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output=json

Request form: http://api.feedgee.com/1.0/listSubscribeOptInNow?apikey=APIKEY&list_id=LIST_ID&email=EMAIL&phone=PHONE&
mobilecountry=COUNTRY&
fname=FNAME&lname=LNAME&names=NAMES&values=VALUES&optin=TRUE&update_existing=TRUE

This method output returns imported subscriber profile details with status imported. If requested profile exists and you have set parameter update_existing=TRUE profile data will be returned with updated status, otherwise status field returns error message like 'example@exampleemail.com profile not found'.

The return value
success The number of successful requests
errors Number of errors
error Error description
code Error code
warning Additional warnings for xml, empty when null
data Array with subscribers data
Profile Array with single subscriber data
email Email
phone Phone
firstname Name
lastname Last name
customfields Array with custom fields
customfield Custom fields name and value
name Name, for example"Gender"
value Value, for example «Male»
status Status of subscriber

Example (XML)

<ResultOfProfile>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName>
<customfields>
<CustomField>
<name>string</name>
<value>string</value>
</CustomField>
<CustomField>
<name>string</name>
<value>string</value>
</CustomField>
<status>string</status>
</Profile>
</data>
</ResultOfProfile>

Example (JSON)

{"success":int,
"errors":int,
"error":"string",
"warning":"string",
"code":int,
"data":
[{"email":"string",
"phone":"string",
"firstname":"string",
"lastname":"string",
"customfields":
[{"name":"string","value":"string"},
{"name":"string","value":"string"}],
"status":"Updated"}]
}

Request in PHP

<?
// Your key to access the API
$api_key = "00000000000000000000000000000000";
//Method name
$method = "listSubscribeOptInNow";
echo "Method: " . $method. "<br>";
//parameters
$email = "test@test.com";
$phone = urlencode("+380500000000");
$fname = "fname";
$lname = "lname";
$country = "country";
$parameters = "apikey=$api_key&list_id=$list_id&email=$email&phone=$phone&mobilecountry=$mobilecountry&
fname=$fname&lname=$lname&names=&values=&optin=$optin&update_existing=true";
echo "Parameters: " . $parameters. "<br>";
// Create a GET-request
$api_url = "http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo "Url: " . $api_url . "<br><hr/>";
// Make a request to the API-server
$result = file_get_contents($api_url);
if ($result) {
// Decoding of answer API-server
$jsonObj = json_decode($result);
if(null===$jsonObj) {
// Error in the received reply
echo "Invalid JSON";
}
else {
// Error of get the list of subscribers
if(!empty($jsonObj->error))
{ echo "An error occured: " . $jsonObj->error . "<br/>";}
// Display the names and values
echo "Here's a list of your data:<br>";
foreach ($jsonObj->data as $key => $jsons) { // This will search in the 2 jsons
foreach($jsons as $key => $custom) {
if(is_array($custom)){
echo $key . ":<br/>";
foreach ($custom as $one) {
echo " ->" . $one->name . ":" . $one->value . "<br/>";
}
} else {
echo $key . ":" . $custom . "<br/>";
}
}
}
}
} else {
// Error connecting to API-server
echo "API access error";
}
?>

SOAP request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:listSubscribeOptinNow>
<tem:apikey>string</tem:apikey>
<tem:list_id>int</tem:list_id>
<tem:email>string</tem:email>
<tem:phone>string</tem:phone>
<tem:country>string</tem:country>
<tem:fname>string</tem:fname>
<tem:lname>string</tem:lname>
<tem:names>string</tem:names>
<tem:values>string</tem:values>
<tem:optin>boolean</tem:optin>
<tem:update_existing>boolean</tem:update_existing>
</tem:subscriberImport>
</soapenv:Body>
</soapenv:Envelope>

listSubscribeDoubleOptInNow — add subscriber with Double Opt-In request

listSubscribeDoubleOptInNow (string apikey, int list_id, string email, string phone, string mobilecountry, string fname, string lname, string names, string values, bool update_existing)

Method allows you to import a subscriber into database (or update information about existing subscriber) and invite him to subscribe to the mail list. The new profile of subscriber is added with the status «Invited» in the choosen list. Necessarily to fill one of the fields: email or phone.

Parameters
apikey API key to access to your account
list_id Id of mail list obtained by listsGetAll
email Email of subscriber
phone Mobile phone of subscriber
mobilecountry Country to validate the mobile phone number of subscriber (in English)
fname Name of subscriber
lname Last name of subscriber
names The name and value of an additional fields of subscriber which need to be filled in (separated by commas)
gender Gender
language Language
dateofbirth Date of birth
city City
zip Zip
stateorprovince State or province
country Country
interests Interests
occupation Occupation
values Values ​​for additional fields of subscriber which need to be filled in (separated by commas)
update_existing Parameter that respond for update information about existing subscribers
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/listSubscribeDoubleOptInNow?apikey=APIKEY&list_id=LIST_ID&email=EMAIL&phone=PHONE& mobilecountry=MOBILECOUNTRY&fname=FNAME&lname=LNAME&names=NAMES& values=VALUES&update_existing=TRUE

The return value contains the imported profile of subscriber. It has the status 'imported'. If the profile already existed update_existing = TRUE, then the profile will be shown with a status 'updated'. Otherwise, the field of status contains the cause of the error, such as «example@ex.com profile not found.»

The return value
success The number of successful requests
errors Number of errors
error Text description of the error
code Error code
warning Additional warnings for the xml, not output when null
data Array with the subscribers data
Profile Array with the data of one subscriber
email Email of subscriber
phone Phone
firstname Name
lastname Last name
customfields
Array with additional fields of subscriber
customfield The name and value of an additional field
name Name, for example"Gender"
value Value, for example «Male»
status Status of subscriber

Example (XML)


<ResultOfProfile>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName>
<customfields>
<CustomField>
<name>string</name>
<value>string</value>
</CustomField>
<CustomField>
<name>string</name>
<value>string</value>
</CustomField>
<status>string</status>
</Profile>
</data>
</ResultOfProfile>

Example (JSON)


{"success":int,
"errors":int,
"error":"string",
"warning":"string",
"code":int,
"data":
[{"email":"string",
"phone":"string",
"firstname":"string",
"lastname":"string",
"customfields":
[{"name":"string","value":"string"},
{"name":"string","value":"string"}],
"status":"Updated"}]
}

Request in PHP


<?
// Your key to access the API
$api_key = "00000000000000000000000000000000";
//Method name
$method = "listSubscribeDoubleOptInNow";
echo "Method: " . $method. "<br>";
//parameters
$email = "test@test.com";
$phone = urlencode("+380500000000");
$fname = "fname";
$lname = "lname";
$country = "country";
$parameters = "apikey=$api_key&list_id=$list_id&email=$email&phone=$phone&mobilecountry=$mobilecountry&
fname=$fname&lname=$lname&names=&values=&update_existing=true";
echo "Parameters: " . $parameters. "<br>";
// Create a GET-request
$api_url = "http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo "Url: " . $api_url . "<br><hr/>";
// Make a request to the API-server
$result = file_get_contents($api_url);
if ($result) {
// Decoding of answer API-server
$jsonObj = json_decode($result);
if(null===$jsonObj) {
// Error in the received reply
echo "Invalid JSON";
}
else {
// Error of get the list of subscribers
if(!empty($jsonObj->error))
{ echo "An error occured: " . $jsonObj->error . "<br/>";}
// Display the names and values
echo "Here's a list of your data:<br>";
foreach ($jsonObj->data as $key => $jsons) { // This will search in the 2 jsons
foreach($jsons as $key => $custom) {
if(is_array($custom)){
echo $key . ":<br/>";
foreach ($custom as $one) {
echo " ->" . $one->name . ":" . $one->value . "<br/>";
}
} else {
echo $key . ":" . $custom . "<br/>";
}
}
}
}
} else {
// Error connecting to API-server
echo "API access error";
}
?>

SOAP request


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:listSubscribeDoubleOptInNow>
<tem:apikey>string</tem:apikey>
<tem:list_id>int</tem:list_id>
<tem:email>string</tem:email>
<tem:phone>string</tem:phone>
<tem:country>string</tem:country>
<tem:fname>string</tem:fname>
<tem:lname>string</tem:lname>
<tem:names>string</tem:names>
<tem:values>string</tem:values>
<tem:update_existing>boolean</tem:update_existing>
</tem:subscriberImport>
</soapenv:Body>
</soapenv:Envelope>

listSubscribeOptIn - sign up your subscribers on the campaign

listSubscribeOptIn (string ApiKey, int listId, string emails, string phones, bool optin, bool update_existing)

Method allows you to sign up your subscribers on mail list. Sends an email to your subscriber with notification of subscription. Necessarily to fill one of the fields: email or phone

Parameters
apikey API key to access to your account
list id Id of mail list obtained by listsGetAll
Emails Email of subscribers to sign up, separated by commas
Phones Mobile phones of subscribers to sign up, separated by commas, you can use without «+"
optin Parameter that respond for sending a notification of a subscription to a subscriber
update_existing Parameter that respond for update information about existing subscribers
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

If you are use only the email-addresses of subscribers, then field Phones should be empty. And vice versa.

Request form: http://api.feedgee.com/1.0/listSubscribeOptIn?apikey=APIKEY&list_id=LIST_ID&emails=EMAILS&phones=PHONES&optin=TRUE/FALSE&update_existing=TRUE/FALSE

Email-address and mobile of subscribers are specified in pairs. Each pair refers to a single profile of subscriber. If you use only one of the arguments email or phone, the value of the second can be empty.

The return value
success The number of successful requests
errors Number of errors
error Text description of the error
code Error code
warning Additional warnings for the xml, not output when null
data Array with the subscribers data
Profile Array with the data of one subscriber
email Email of subscriber
phone Phone
firstname Name
lastname Last name
status Status of subscriber

Example (XML)

<ResultOfProfile>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName>
<status>string</status>
</Profile>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName>
<status>string</status>
</Profile>
</data>
</ResultOfProfile>

Example (JSON)

{
"success":int,
"errors":int,
"error":"string",
"warning":"string",
"code":int,
"data":
[{"email":"string",
"phone":"string",
"firstname":"string",
"lastname":"string",
"status":"Undefined"}]
}

Request in PHP

<?
// Your key to access the API
$api_key = "00000000000000000000000000000000";
//Method name
$method = "listSubscribeOptIn";
echo "Method: " . $method. "<br>";
//parameters
$emails = "test@test.com";
$phones = urlencode("+380500000000");
$list_id = "0001";
$optin="TRUE";
$parameters = "apikey=$api_key&list_id=$list_id&emails=$emails&phones=$phones&optin=$optin
echo "Parameters: " . $parameters. "<br>";
// Create a GET-request
$api_url = "http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo "Url: " . $api_url . "<br><hr/>";
// Make a request to the API-server
$result = file_get_contents($api_url);
if ($result) {
// Decoding of answer API-server
$jsonObj = json_decode($result);
if(null===$jsonObj) {
// Error in the received reply
echo "Invalid JSON";
}
else {
// Error of get the list of subscribers
if(!empty($jsonObj->error))
{ echo "An error occured: " . $jsonObj->error . "<br/>";}
// Display the names and values
echo "Here's a list of your data:<br>";
foreach ($jsonObj->data as $key => $jsons) { // This will search in the 2 jsons
foreach($jsons as $key => $custom) {
if(is_array($custom)){
echo $key . ":<br/>";
foreach ($custom as $one) {
echo "&nbsp;&nbsp;&nbsp;&nbsp;->" . $one->name . ":" . $one->value . "<br/>";
}
} else {
echo $key . ":" . $custom . "<br/>";
}
}
}
}
} else {
// Error connecting to API-server
echo "API access error";
}
?>

SOAP request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:listSubscribeOptIn>
<tem:apikey>string</tem:apikey>
<tem:list_id>int</tem:list_id>
<tem:emails>string</tem:emails>
<tem:phones>string</tem:phones>
<tem:optin>boolean</tem:optin>
</tem:listSubscribeOptIn>
</soapenv:Body>
</soapenv:Envelope>

listSubscribeDoubleOptIn - invite subscribers to subscribe on the campaign

listSubscribeDoubleOptIn (string ApiKey, int listId, string emails, string phones, bool double_optin, bool update_existing)

Method allows you to invite subscribers to subscribe to one mail list. Sends an invitation email to the subscriber to subscribe on the campaign.

Necessary to fill in the email field.

Parameters
apikey API key to access to your account
list id Id of mail list obtained by listsGetAll
Emails Email of subscribers to sign up, separated by commas
Phones Mobile phones of subscribers to sign up, separated by commas, you can use without «+"
double_optin Parameter that respond for sending an invitation to a subscriber to subscribe on the campaign
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/listSubscribeDoubleOptIn?apikey=APIKEY&list_id=LIST_ID&emails=EMAILS&phones=PHONES&double_optin=TRUE/FALSE

Email-address and mobile of subscribers are specified in pairs. Each pair refers to a single profile of subscriber. If you use only one of the arguments email or phone, the value of the second can be empty.

The return value
success The number of successful requests
errors Number of errors
error Text description of the error
code Error code
warning Additional warnings for the xml, not output when null
data Array with the subscribers data
Profile Array with the data of one subscriber
email Email of subscriber
phone Phone
firstname Name
lastname Last name
status Status of subscriber

Example (XML)

<ResultOfProfile>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName>
<status>string</status>
</Profile>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName>
<status>string</status>
</Profile>
</data>
</ResultOfProfile>

Example (JSON)

{
"success":int,
"errors":int,
"error":"string",
"warning":"string",
"code":int,
"data":
[{"email":"string",
"phone":"string",
"firstname":"string",
"lastname":"string",
"status":"Undefined"}]
}

Request in PHP

<?
// Your key to access the API
$api_key = "00000000000000000000000000000000";
//Method name
$method = "listSubscribeDoubleOptIn";
echo "Method: " . $method. "<br>";
//parameters
$emails = "test@test.com";
$phones = urlencode("+380500000000");
$list_id = "0001";
$double_optin="TRUE";
$parameters = "apikey=$api_key&list_id=$list_id&emails=$emails&phones=$phones&double_optin=$double_optin&;
echo "Parameters: " . $parameters. "<br>";
// Create a GET-request
$api_url = "http://api.test.feedgee.com/1.0/$method?$parameters&output=json";
echo "Url: " . $api_url . "<br><hr/>";
// Make a request to the API-server
$result = file_get_contents($api_url);
if ($result) {
// Decoding of answer API-server
$jsonObj = json_decode($result);
if(null===$jsonObj) {
// Error in the received reply
echo "Invalid JSON";
}
else {
// Error of get the list of subscribers
if(!empty($jsonObj->error))
{ echo "An error occured: " . $jsonObj->error . "<br/>";}
// Display the names and values
echo "Here's a list of your data:<br>";
foreach ($jsonObj->data as $key => $jsons) { // This will search in the 2 jsons
foreach($jsons as $key => $custom) {
if(is_array($custom)){
echo $key . ":<br/>";
foreach ($custom as $one) {
echo "&nbsp;&nbsp;&nbsp;&nbsp;->" . $one->name . ":" . $one->value . "<br/>";
}
} else {
echo $key . ":" . $custom . "<br/>";
}
}
}
}
} else {
// Error connecting to API-server
echo "API access error";
}
?>

SOAP request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:listSubscribeDoubleOptIn>
<tem:apikey>string</tem:apikey>
<tem:list_id>int</tem:list_id>
<tem:emails>string</tem:emails>
<tem:phones>string</tem:phones>
<tem:double_optin>boolean</tem:double_optin>
</tem:listSubscribeDoubleOptIn>
</soapenv:Body>
</soapenv:Envelope>

listGetAllSubscribers — export subscribers

listGetAllSubscribers (string apikey, int start, int count, string list_id, bool include_Custom_Fields)

This method outputs list of subscribers with additional fields from their profiles. If you specify particular mail list Id method returns subscription statuses for this mail list. If no mail list Id specified for compatibility for status method returns «undefined» value.

This is one of few methods that can be used only in upgraded accounts (not with Freemium subscription).

Parameters
apikey Your account API key
start Number of first subscriber to output (optional, default = 1)
count Number of the returned records of subscribers (optional, default = 10000, not more than 10,000 per request)
list_id Id of mail list obtained by listsGetAll for a particular list, or a value ALL to select all subscribers of the user (optional, default = ALL LISTS)
include_Custom_Fields Set TRUE in case you need to output subscriber's profile custom fields values (optional, default = FALSE)
By default output is in XML. To get result in JSON add additional parameter &output=json

Request form: http://api.feedgee.com/1.0/listGetAllSubscribers?apikey=APIKEY&start=START&count=COUNT&list_id=LIST_ID&include_Custom_Fields=TRUE

The return value
success Number of successful requests
errors Number of errors
error Error description
code Error code
warning Additional warnings for xml, empty when null
total Total number subscribers in mail list
data Array with subscribers data
Profile Array with single subscriber data
email Email
phone Phone
firstname Name
lastname Last name
status Status of subscriber

Example (XML)

<ResultOfProfile>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName> 
<status>string</status>
</Profile>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName> 
<status>string</status>
</Profile>
</data>
</ResultOfProfile>

Example (JSON)

{
"success":int,
"errors":int,
"error":"string",
"warning":"string",
"code":int,
"data":
[{"email":"string",
"phone":"string",
"firstname":"string",
"lastname":"string",
"status":"Undefined"}]
}

Request in PHP

<?
// Your key to access the API
$api_key = "00000000000000000000000000000000";
//Method name
$method = "subscribersGetAll";
echo "Method: " . $method. "<br>";
//Method name
$parameters = "apikey=$api_key&start=0&count=100&list_id=LISTID&INCLUDE_CUSTOM_FIELDS=TRUE";
echo "Parameters: " . $parameters. "<br>";
// Create a GET-request
$api_url = "http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo "Url: " . $api_url . "<br><hr/>";
// Make a request to the API-server
$result = file_get_contents($api_url);
if ($result) {
// Decoding of answer API-server
$jsonObj = json_decode($result);
if(null===$jsonObj) {
// Error in the received reply
echo "Invalid JSON";
}
elseif(!empty($jsonObj->error)) {
// Error of get the list of subscribers
echo "An error occured: " . $jsonObj->error;
} else {
// Display the names and values
echo "Here's a list of your data:<br>";
foreach ($jsonObj->data as $key => $jsons) { // This will search in the 2 jsons
foreach($jsons as $key => $custom) {
if(is_array($custom)){
echo $key . ":<br/>"; 
foreach ($custom as $one) {
echo "&nbsp;&nbsp;&nbsp;&nbsp;->" . $one->name . ":" . $one->value . "<br/>"; 
}
} else {
echo $key . ":" . $custom . "<br/>"; 
}
}
}
}
} else {
// Error connecting to API-server
echo "API access error";
}
?>

SOAP request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:subscribersGetAll>
<tem:apikey>string</apikey>
<tem:start>int</tem:start>
<tem:count>int</tem:count>
<tem:list_id>string</tem:list_id>
<tem:INCLUDE_CUSTOM_FIELDS>string</tem:INCLUDE_CUSTOM_FIELDS>
</tem:subscribersGetAll>
</soapenv:Body>
</soapenv:Envelope>

listUnsubscribe - unsubscribe subscribers from the mail list

listUnsubscribe (string apikey, int list_Id, string emails, string phones)

Method allows you to unsubscribe your subscribers from the mail list.

Parameters
apikey API key to access to your account
list_Id Id of mail list obtained by listsGetAll
emails Email of subscriber to search, separated by commas
phones Mobile phones of subscribers to search, separated by commas, you can use without "+"
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/listUnsubscribe?apikey=APIKEY&list_id=LIST_ID&emails=EMAILS&phones=PHONES

Email-address and mobile of subscribers are specified in pairs. Each pair refers to a single profile of subscriber . If you use only one of the arguments email or phone, the value of the second can be empty.

The return value
success The number of successful requests
errors Number of errors
error Text description of the error
code Error code
warning Additional warnings for the xml, not output when null
data Array with the subscribers data
Profile Array with the data of one subscriber
email Email of subscriber
phone Phone
firstname Name
lastname Last name
status Status of subscriber

Example (XML)

<ResultOfProfile>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName>
<status>unsubscribed</status>
</Profile>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName>
<status>unsubscribed</status>
</Profile>
</Profile>
</data>
</ResultOfProfile>

Example (JSON)

{"success":int,
"errors":int,
"error":"string",
"warning":"string",
"code":int,
"data":
[{"email":"string",
"phone":"string",
"firstname":"string",
"lastname":"string",
"status":"unsubscribed"}]
}

Request in PHP

<?
// Your key to access the API
$api_key = "00000000000000000000000000000000";
//Method name
$method = "listUnsubscribe";
echo "Method: " . $method. "<br>";
//parameters
$emails = "test@test.com";
$phones = urlencode("+380500000000");
$list_id = "0001";
$parameters = "apikey=$api_key&list_id=$list_id&emails=$emails&phones=$phones";
echo "Parameters: " . $parameters. "<br>";
// Create a GET-request
$api_url = "http://api.test.feedgee.com/1.0/$method?$parameters&output=json";
echo "Url: " . $api_url . "<br><hr/>";
// Make a request to the API-server
$result = file_get_contents($api_url);
if ($result) {
// Decoding of answer API-server
$jsonObj = json_decode($result);
if(null===$jsonObj) {
// Error in the received reply
echo "Invalid JSON";
}
else {
// Error of get the list of subscribers
if(!empty($jsonObj->error))
{ echo "An error occured: " . $jsonObj->error . "<br/>";}
// Display the names and values
echo "Here's a list of your data:<br>";
foreach ($jsonObj->data as $key => $jsons) { // This will search in the 2 jsons
foreach($jsons as $key => $custom) {
if(is_array($custom)){
echo $key . ":<br/>";
foreach ($custom as $one) {
echo "&nbsp;&nbsp;&nbsp;&nbsp;->" . $one->name . ":" . $one->value . "<br/>";
}
} else {
echo $key . ":" . $custom . "<br/>";
}
}
}
}
} else {
// Error connecting to API-server
echo "API access error";
}
?>

SOAP request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:listUnsubscribe>
<tem:apikey>string</tem:apikey>
<tem:list_id>int</tem:list_id>
<tem:emails>string</tem:emails>
<tem:phones>string</tem:phones>
</tem:listUnsubscribe>
</soapenv:Body>
</soapenv:Envelope>

listUnsubscribeFromAll - unsubscribe subscribers from all mail lists

listUnsubscribeFromAll (string apikey, string emails, string phones)

Method allows you to unsubscribe your subscribers from the all mail lists.

Parameters
apikey API key to access to your account
emails Email of subscriber to search, separated by commas
phones Mobile phones of subscribers to search, separated by commas, you can use without «+"
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/listUnsubscribeFromAll?apikey=APIKEY&emails=EMAILS&phones=PHONES

Email-address and mobile of subscribers are specified in pairs. Each pair refers to a single profile of subscriber. If you use only one of the arguments email or phone, the value of the second can be empty.

The return value: list of unsubscribed profiles
success The number of successful requests
errors Number of errors
error Text description of the error
code Error code
warning Additional warnings for the xml, not output when null
data Array with the subscribers data
Profile Array with the data of one subscriber
email Email of subscriber
phone Phone
firstname Name
lastname Last name
status Status of subscriber

Example (XML)

<ResultOfProfile>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName>
<status>unsubscribed</status>
</Profile>
<Profile>
<email>string</email>
<phone>string</phone>
<firstname>string</firstname>
<lastName>string</lastName>
<status>unsubscribed</status>
</Profile>
</Profile>
</data>
</ResultOfProfile>

Example (JSON)

{"success":int,
"errors":int,
"error":"string",
"warning":"string",
"code":int,
"data":
[{"email":"string",
"phone":"string",
"firstname":"string",
"lastname":"string",
"status":"unsubscribed"}]
}

Request in PHP

<?
// Your key to access the API
$api_key = "00000000000000000000000000000000";
//Method name
$method = "listUnsubscribeFromAll";
echo "Method: " . $method. "<br>";
//parameters
$emails = "test@test.com";
$phones = urlencode("+380500000000");
$parameters = "apikey=$api_key&emails=$emails&phones=$phones";
echo "Parameters: " . $parameters. "<br>";
// Create a GET-request
$api_url = "http://api.feedgee.com/1.0/$method?$parameters&output=json";
echo "Url: " . $api_url . "<br><hr/>";
// Make a request to the API-server
$result = file_get_contents($api_url);
if ($result) {
// Decoding of answer API-server
$jsonObj = json_decode($result);
if(null===$jsonObj) {
// Error in the received reply
echo "Invalid JSON";
}
else {
// Error of get the list of subscribers
if(!empty($jsonObj->error))
{ echo "An error occured: " . $jsonObj->error . "<br/>";}
// Display the names and values
echo "Here's a list of your data:<br>";
foreach ($jsonObj->data as $key => $jsons) { // This will search in the 2 jsons
foreach($jsons as $key => $custom) {
if(is_array($custom)){
echo $key . ":<br/>";
foreach ($custom as $one) {
echo "&nbsp;&nbsp;&nbsp;&nbsp;->" . $one->name . ":" . $one->value . "<br/>";
}
} else {
echo $key . ":" . $custom . "<br/>";
}
}
}
}
} else {
// Error connecting to API-server
echo "API access error";
}
?>

SOAP request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:listUnsubscribeFromAll>
<tem:apikey>string</tem:apikey>
<tem:emails>string</tem:emails>
<tem:phones>string</tem:phones>
</tem:listUnsubscribeFromAll>
</soapenv:Body>
</soapenv:Envelope>

listDelete - deleting the mail list

listDelete (string apikey, int list_id)

Method allows you to delete an existing mail list.

Parameters
apikey API key to access to your account
list_id Id of mail list obtained by listsGetAll
By default, the result is returned in XML, to get the JSON you need to add an additional parameter &output = json

Request form: http://api.feedgee.com/1.0/listDelete?apikey=APIKEY&list_id=LIST_ID

Return value: data of the deleted list
success Value 1 if success, 0 if error
errors Number of errors
error Text description of the error
code Error code
warning Additional warnings for the xml, not output when null
data Array with a list of subscribers
MailLst Array with the number and the title of the list
id Number of a list
name

Title of a list

Example (XML)

<ResultOfMailList>
<success>int</success>
<errors>int</errors>
<error>string</error>
<code>int</code>
<warning>string</warning>
<data>
<MailList>
<id>int</id>
<name>string</name>
</MailList>
</data>
</ResultOfMailList>

Example (JSON)

{
"success":int,
"errors":int,
"error":"string",
"warning":"string",
"code":int,
"data":
[{"id":"int",
"name":"string"},
}

Request in PHP

<?
// Your key to access the API
$api_key = "00000000000000000000000000000000";
//Method name
$method = "campaignEmailContent";
echo "Method: " . $method. "<br>";
//parameters
$campaign_id="00001";
$parameters = "apikey=$api_key&campaign_id=$campaign_id";
echo "Parameters: " . $parameters. "<br>";
// Create a GET-request
$api_url = "http://api.feedgee.com/$method?$parameters&output=json";
echo "Url: " . $api_url . "<br><hr/>";
// Make a request to the API-server
$result = file_get_contents($api_url);
//echo $result;
if ($result) {
// Decoding of answer API-server
$jsonObj = json_decode($result);
if(null===$jsonObj) {
// Error in the received reply
echo "Invalid JSON";
}
else {
if(!empty($jsonObj->error)) {
// Error of get the list of subscribers
echo "An error occured: " . $jsonObj->error; }
// Выводим названия и значения
echo "Here's a list of your data:<br>";
data_output($jsonObj->data);
}
} else {
// Error connecting to API-server
echo "API access error";
}
// Displays data from indented
function data_output($obj, $level = 0) {
if(is_array($obj) || is_object($obj)) {
if(is_object($obj)) {
$obj = (array)$obj;
}
echo count($obj) > 1 ? "<br/>n" : "";
foreach($obj as $key => $value) {
// it was object
if(!is_numeric($key)) {
$prefix = str_repeat("&nbsp;&nbsp;", $level - 1);
echo $prefix . $key . ":";
}
data_output($value, $level + 1);
}
}
else {
$prefix = "&nbsp;&nbsp;";
if($obj === false) $obj = 'false';
echo $prefix . $obj . "<br/>n";     
}
}
?>

SOAP request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:listDelete>
<tem:apikey>string</tem:apikey>
<tem:list_id>int</tem:list_id>
</tem:listDelete>
</soapenv:Body>
</soapenv:Envelope>