![]() |
VOOZH | about |
The response format is JSON. Requests with a message-body use plain JSON to set or update resource attributes. Successful requests will return a 200 OK HTTP status.
Some general information about responses:
Resource IDs are returned as integers.
System dates are returned as timestamp.
Blank fields are generally included as null or emtpy string instead of being omitted.
Occasionally you might encounter errors when accessing the REST API. There are seven possible types:
400 Bad Request - Invalid request, e.g. using an unsupported HTTP method.
401 Unauthorized - Authentication or permission error, e.g. incorrect API keys.
403 Forbidden - The request contained valid data and was understood by the server, but the server is refusing action.
404 Not Found - The requested resource could not be found.
409 Conflict - Indicates that the request could not be processed because of conflict in the current state of the resource.
429 Too Many Requests - The user has sent too many requests in a given amount of time.
500 Internal Server Error - Server Error.
REST API requests of all types and to all endpoints are limited in the following ways:
Account - 240 requests per minute.
If the quota of requesting a MarketingPlatform API is exceeded, the API returns an error code 429 and a message that the account has exceeded the quota.
Makes a request call on all the Lists that this user either owns or has access to.
GET
/Lists/
Integer
listid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET
'https://api.mailmailmail.net/v2.0/Lists?listid=0&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings = array();
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 0; // // if listid is set up, then response will be only with selected list data
$limit = 100;
$offset = 0;
$result = $parser->GetLists(listid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 0;
int limit = 100;
int offset = 0;
string result = parser.GetLists(listid, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"listid":2,
"name":"List 1",
"description":"List 1 description",
"mobile_prefix":"",
"sender_name":"test",
"sender_email":"test@emailplatform.com",
"reply_email":"test@emailplatform.com",
"company_name":"",
"company_email":"test@emailplatform.com",
"company_address":"",
"company_phone":"",
"company_domain":""
},
{
"listid":22,
"name":"List 2",
"description":"List 2 description",
"mobile_prefix":"",
"sender_name":"Marketing Platform",
"sender_email":"support@emailplatform.com",
"reply_email":"support@emailplatform.com",
"company_name":"",
"company_email":"support@emailplatform.com",
"company_address":"",
"company_phone":"",
"company_domain":""
}
]
}
This method creates a List based on the current class variables.
POST
/Lists/
String
name
String
description
String
mobile_prefix
String
sender_name
String
sender_email
String
reply_email
String
company_name
String
company_email
String
company_address
String
company_phone
String
company_domain
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Lists' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name":"Create Test List","description":"List description", "mobile_prefix":"389"}'
{
"name": "Create Test List",
"description": "List description",
"mobile_prefix": "45",
"sender_name":"Marketing Platform",
"sender_email":"support@marketingplatform.com",
"reply_email":"support@marketingplatform.com",
"company_name":"Marketing Platform",
"company_email":"support@marketingplatform.com",
"company_address":"Nørregade 12a, 6600 Vejen, Denmark",
"company_phone":"+4572444444",
"company_domain":"marketingplatform.com"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listName = "Create Test List";
$description = "List description";
$mobilePrefix = "389";
$result = $parser->CreateList($listName, $description, $mobilePrefix);
print_r($result);
using MarketingPlatform;
string username = "API_USERNAME";
string token = "API_TOKEN";
ApiParser parser = new ApiParser(username, token);
String listName = "Create Test List";
String description = "List description";
String mobilePrefix = "389";
string result = parser.CreateList(listName, description, mobilePrefix, senderName, senderEmail);{
"status":true,
"code":201,
"listid":49
}
{
"status":false,
"code":400,
"message":"Parameter name is empty"
}
This method link data fields to the specific list.
POST
/Lists/AddDataFieldsToList/
Integer
listid
Array
data_fields
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Lists/AddDataFieldsToList' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"listid":26,"data_fields":[1,2,3,4]}'
{
"listid": 26,
"data_fields": [1, 2, 3, 4]
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 26;
$dataFields = array (1, 2, 3, 4);
$result = $parser->AddDataFieldsToList($listid, $dataFields);
print_r($result);
using MarketingPlatform;
string username = "API_USERNAME";
string token = "API_TOKEN";
ApiParser parser = new ApiParser(username, token);
int listid = 26;
int[] datafields = new int[] {1, 2, 3, 4};
string result = parser.AddDataFieldsToList(listid, dataFields);{
"status":true,
"code":200,
"message":"Data fields have been successfuly added to the list."
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
This method unlink data fields from the specific list.
POST
/Lists/RemoveDataFieldsFromList/
Integer
listid
Array
data_fields
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Lists/RemoveDataFieldsFromList' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"listid":26,"data_fields":[1,2,3,4]}'
{
"listid": 26,
"data_fields": [1, 2, 3, 4]
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 26;
$dataFields = array (1, 2, 3, 4);
$result = $parser->RemoveDataFieldsFromList($listid, $dataFields);
print_r($result);
using MarketingPlatform;
string username = "API_USERNAME";
string token = "API_TOKEN";
ApiParser parser = new ApiParser(username, token);
int listid = 26;
int[] datafields = new int[] {1, 2, 3, 4};
string result = parser.RemoveDataFieldsFromList(listid, dataFields);{
"status":true,
"code":200,
"message":"Data fields have been successfuly unlink from the list."
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Fetches Data Fields for the specific List.
GET
/Lists/GetDataFields/
Integer
listid
String
field_type
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Lists/GetDataFields?listid=12&field_type=dropdown' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 12;
$fieldType = "dropdown";
$result = $parser->GetDataFields($listid, $fieldType);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 12;
string fieldType = "dropdown";
string result = parser.GetDataFields(listid, fieldType);
{
"status":true,
"code":200,
"data":[
{
"fieldid":2,
"name":"First Name",
"field_type":"text",
"default_value":"",
"settings":{
"field_length":50,
"min_length":0,
"max_length":0,
"apply_default":""
}
},
{
"fieldid":11,
"name":"Gender",
"field_type":"radiobutton",
"default_value":"",
"settings":{
"options":[
{
"Male":"Male",
"Female":"Female"
}
]
}
}
]
}
{
"status":false,
"code":400,
"message":"List 8 does not have data fields"
}
Updates a current List based on the current class variables.
PUT
/Lists/
Integer
listid
String
name
String
description
String
mobile_prefix
String
sender_name
String
sender_email
String
reply_email
String
company_name
String
company_email
String
company_address
String
company_phone
String
company_domain
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Lists' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"listid":"26","name":"New list name","description":"New list description","mobile_prefix":"45"}'
{
"listid": 26,
"name": "New list name",
"description": "New list description",
"mobile_prefix": "45",
"sender_name":"new sender name Marketing Platform",
"sender_email":"new sender email support@marketingplatform.com",
"reply_email":"new reply email support@marketingplatform.com",
"company_name":"new company name Marketing Platform",
"company_email":"new comapany email support@marketingplatform.com",
"company_address":"new address Nørregade 12a, 6600 Vejen, Denmark",
"company_phone":"+4572444444",
"company_domain":"new domain marketingplatform.com"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 26;
$listName = "New list name";
$description = "New list description";
$mobilePrefix = "45";
$result = $parser->UpdateList($listid, $listName, $description, $mobilePrefix);
print_r($result);
using MarketingPlatform;
string username = "API_USERNAME";
string token = "API_TOKEN";
ApiParser parser = new ApiParser(username, token);
int listid = 26;
string listName = "New list name";
string description = "New list description";
string mobilePrefix = "45";
string result = parser.UpdateList(listid, listName, mobilePrefix, senderName);
{
"status":true,
"code":200,
"message": "The selected contact list has been successfully updated."
}
{
"status":false,
"code":400,
"message":"This user is not owner of the list"
}
{
"status":false,
"code":400,
"message":"Mobile prefix is not valid"
}`
Copy List details including data fields.
POST
/Lists/CopyList/
Integer
listid
String
name
String
description
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Lists/CopyList' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"listid":26,"name":"Copied list name","description":"Copied list description"}'
{
"listid": 26,
"name": "Copied list name",
"description": "Copied list description"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 26;
$listName = "Copied list name";
$description = "Copied list description";
$result = $parser->CopyList($listid, $listName, $description);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 26;
String listName = "Copied list name";
String description = "Copied list description";
string result = parser.CopyList(listid, listName, description);
{
"status":true,
"code":202,
"listid":55
}
{
"status":false,
"code":202,
"message":"This user is not owner of the list"
}
Delete a List from the database.
DELETE
/Lists/
Integer
listid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE 'https://api.mailmailmail.net/v2.0/Lists?listid=26' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 26;
$result = $parser->DeleteList($listid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 26;
string result = parser.DeleteList(listid);
[
"status":true,
"code":200
"message": "Profile list has been deleted."
]
Loads the data fields.
GET
/DataFields/
Integer
fieldid
Boolean
load_lists
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET
'https://api.mailmailmail.net/v2.0/DataFields?fieldid=11&load_lists=true' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldid = 11;
$loadLists = true;
$result = $parser->LoadDataFields($fieldid, $loadLists);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int fieldid = 11;
bool loadLists = true;
string result = parser.LoadDataFields(fieldid, loadLists);
{
"status":true,
"code":200,
"data":{
"fieldid":2,
"name":"First Name",
"field_type":"text",
"default_value":"",
"settings":{
"field_length":50,
"min_length":0,
"max_Length":0,
"apply_default":""
},
"lists":[
8,
10
]
}
}
{
"status":false,
"code":403,
"message":"This user is not owner of the custom field"
}
Create a new data field.
POST
/DataFields/
String
name
String
field_type
String
default_value
Array
settings
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name":"Text_Field","field_type":"text"}'
{
"name": "Text_Field",
"field_type": "text"
}
curl POST 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name":"Number_Field","field_type":"number","settings":[]}'
{
"name": "Number_Field",
"field_type": "number"
}
curl POST 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name":"Radio_Field","field_type":"radiobutton","settings":{"options":[{"male":"male","female":"female"}]}}'
{
"name": "Radio_Field",
"field_type": "radiobutton",
"settings":{
"options":
{
"male":"male",
"female":"female"
}
}
}
curl POST 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name":"CheckBox_Field","field_type":"checkbox","settings":{"options":[{"Red":"Red","Blue":"Blue","Yellow":"Yellow","Black":"Black","Grey":"Grey","White":"White","Silver":"Silver"}]}}'
{
"name": "CheckBox_Field",
"field_type": "checkbox",
"settings": {
"options":
{
"Red":"Red",
"Blue":"Blue",
"Yellow":"Yellow",
"Black":"Black",
"Grey":"Grey",
"White":"White",
"Silver":"Silver"
}
}
}
curl POST 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name":"Dropdown_Field","field_type":"dropdown","settings":{"options":[{"Monday":"Monday","Tuesday":"Tuesday","Wednesday":"Wednesday","Wednesday":"Wednesday","Friday":"Friday","Saturday":"Saturday","Sunday":"Sunday"}]}}'
{
"name": "Dropdown_Field",
"field_type": "dropdown",
"settings": {
"options":
{
"Monday":"Monday",
"Tuesday":"Tuesday",
"Wednesday":"Wednesday",
"Thursday":"Thursday",
"Friday":"Friday",
"Saturday":"Saturday",
"Sunday":"Sunday"
}
}
}
curl POST 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name":"Date_Field","field_type":"date","settings":{"display_order_1":"year","display_order_2":"month","display_order_3":"day","start_year":1990,"end_year":2030}}'
{
"name": "Date_Field",
"field_type": "date",
"settings": {
"display_order": "d-m-y",
"start_year": 1990,
"end_year": 2030
}
}
curl POST 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "MyOneToMany","field_type": "relational","settings": {"FirstName": "Text","MyNumber": "Number","Active": "Bool","UserInfo": {"properties": {"Email": "Text","Lastname": "Text","HasDog": "Bool","DogId": "Number","DogDetails": {"properties": {"DogName": "Text","DogNumber": "Number","isAgresive": "Bool","DOB": "Date"}}}}}}'
{
"name": "MyOneToMany",
"field_type": "relational",
"settings": {
"FirstName": "Text",
"MyNumber": "Number",
"Active": "Bool",
"UserInfo": {
"properties": {
"Email": "Text",
"Lastname": "Text",
"HasDog": "Bool",
"DogId": "Number",
"DogDetails": {
"properties": {
"DogName": "Text",
"DogNumber": "Number",
"isAgresive": "Bool",
"DOB": "Date"
}
}
}
}
}
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "text";
$result = $parser->CreateDataField($fieldName, $fieldType);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "date";
$fieldSettings = array (
'display_order' => "d-m-Y",
'start_year' => 1990,
'end_year' => 2030
);
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "number";
$fieldSettings = array (
'max_length' => 50,
'min_length' => 10
);
$defaultValue = '50';
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings, $defaultValue);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "radiobutton";
$fieldSettings = array (
'options' => array (
"male"=>"male",
"female"=>"female"
)
);
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "checkbox";
$fieldSettings = array (
'options' => array (
"Monday"=>"Monday",
"Tuesday"=>"Tuesday",
"Wednesday"=>"Wednesday",
"Thursday"=>"Thursday",
"Friday"=>"Friday",
"Saturday"=>"Saturday",
"Sunday"=>"Sunday"
)
);
$defaultValue = "Monday";
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings, $defaultValue, $required);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "dropdown";
$fieldSettings = array (
'options' => array (
"Red"=>"Red",
"Blue"=>"Blue",
"Yellow"=>"Yellow",
"Black"=>"Black",
"Grey"=>"Grey",
"White"=>"White",
"Silver"=>"Silver"
)
);
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldText fieldType = new DataFieldText();
string result = parser.CreateDataField(fieldName, fieldType);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of Data field';
DataFieldDate fieldType = new DataFieldDate();
fieldType.settings["display_order"] = "d-m-Y";
fieldType.settings["start_year"] = "1990";
fieldType.settings["end_year"] = "2030";
string defaultValue = "26/05/2020";
string result = parser.CreateDataField(fieldName, fieldType, defaultValue);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldNumber fieldType = new DataFieldNumber();
fieldType.settings["max_length"] = "50";
fieldType.settings["min_length"] = "10";
string result = parser.CreateDataField(fieldName, fieldType);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldRadioButton fieldType = new DataFieldRadioButton();
List
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldCheckBox fieldType = new DataFieldCheckBox();
List
{
"status":true,
"code":201,
"fieldid": 1
}
{
"status":false,
"code":409,
"message":"This field name already exist"
}
{
"status":false,
"code":400,
"message":"Invalid parameter for field settings"
}
Update data field.
PUT
/DataFields/
String
name
integer
fieldid
String
default_value
Array
settings
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name":"Text_Field_Update","settings": {"FieldLength": 256,"MinLength": 26,"MaxLength": 78}}'
{
"name":"Text_Field_Update",
"settings": {
"FieldLength": 256,
"MinLength": 26,
"MaxLength": 78
}
}
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "Number_Field_Update","settings": {"FieldLength": 2323,"MinLength": 11,"MaxLength": 22}}'
{
"name": "Number_Field_Update",
"settings": {
"FieldLength": 15,
"MinLength": 2,
"MaxLength": 10
}
}
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "Radio_Field","settings":{"options":{"male":"male", "female":"female"}}}'
{
"name": "Radio_Field",
"settings":{
"options":
{
"male":"male",
"female":"female"
}
}
}
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "CheckBox_Field_Update","settings": {"options":{"Red":"Red","Blue":"Blue","Green":"Green"}}}'
{
"name": "CheckBox_Field_Update",
"settings": {
"options":
{
"Red":"Red",
"Blue":"Blue",
"Green":"Green"
}
}
}
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "Dropdown_Field_Update","settings": {"options":{"Apple":"Apple","Orange":"Orange","Banana":"Banana"}}}'
{
"name": "Dropdown_Field_Update",
"settings": {
"options":
{
"Apple":"Apple",
"Orange":"Orange",
"Banana":"Banana"
}
}
}
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "Date_Field_2","settings": {"display_order": "m-d-y","start_year": 1999,"end_year": 2020}}'
{
"name": "Date_Field",
"settings": {
"display_order": "d-m-y"
"start_year": 1990,
"end_year": 2030
}
}
Posible date formats : "d-m-y","m-d-y","y-m-d";
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "text";
$result = $parser->CreateDataField($fieldName, $fieldType);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "date";
$fieldSettings = array (
'display_order' => "d-m-Y",
'start_year' => 1990,
'end_year' => 2030
);
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "number";
$fieldSettings = array (
'max_length' => 50,
'min_length' => 10
);
$defaultValue = '50';
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings, $defaultValue);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "radiobutton";
$fieldSettings = array (
'options' => array (
"male"=>"male",
"female"=>"female"
)
);
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "checkbox";
$fieldSettings = array (
'options' => array (
"Monday"=>"Monday",
"Tuesday"=>"Tuesday",
"Wednesday"=>"Wednesday",
"Thursday"=>"Thursday",
"Friday"=>"Friday",
"Saturday"=>"Saturday",
"Sunday"=>"Sunday"
)
);
$defaultValue = "Monday";
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings, $defaultValue, $required);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "dropdown";
$fieldSettings = array (
'options' => array (
"Red"=>"Red",
"Blue"=>"Blue",
"Yellow"=>"Yellow",
"Black"=>"Black",
"Grey"=>"Grey",
"White"=>"White",
"Silver"=>"Silver"
)
);
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldText fieldType = new DataFieldText();
string result = parser.CreateDataField(fieldName, fieldType);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of Data field';
DataFieldDate fieldType = new DataFieldDate();
fieldType.settings["display_order"] = "d-m-Y";
fieldType.settings["start_year"] = "1990";
fieldType.settings["end_year"] = "2030";
string defaultValue = "26/05/2020";
string result = parser.CreateDataField(fieldName, fieldType, defaultValue);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldNumber fieldType = new DataFieldNumber();
fieldType.settings["max_length"] = "50";
fieldType.settings["min_length"] = "10";
string result = parser.CreateDataField(fieldName, fieldType);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldRadioButton fieldType = new DataFieldRadioButton();
List
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldCheckBox fieldType = new DataFieldCheckBox();
List
{
"status":true,
"code":201,
"fieldid": 1
}
{
"status":false,
"code":409,
"message":"This field name already exist"
}
{
"status":false,
"code":400,
"message":"Invalid parameter for field settings"
}
Update data field.
PUT
/DataFields/
String
name
integer
fieldid
String
default_value
Array
settings
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name":"Text_Field_Update","settings": {"FieldLength": 256,"MinLength": 26,"MaxLength": 78}}'
{
"name":"Text_Field_Update",
"settings": {
"FieldLength": 256,
"MinLength": 26,
"MaxLength": 78
}
}
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "Number_Field_Update","settings": {"FieldLength": 2323,"MinLength": 11,"MaxLength": 22}}'
{
"name": "Number_Field_Update",
"settings": {
"FieldLength": 15,
"MinLength": 2,
"MaxLength": 10
}
}
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "Radio_Field","settings":{"options":{"male":"male", "female":"female"}}}'
{
"name": "Radio_Field",
"settings":{
"options":
{
"male":"male",
"female":"female"
}
}
}
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "CheckBox_Field_Update","settings": {"options":{"Red":"Red","Blue":"Blue","Green":"Green"}}}'
{
"name": "CheckBox_Field_Update",
"settings": {
"options":
{
"Red":"Red",
"Blue":"Blue",
"Green":"Green"
}
}
}
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "Dropdown_Field_Update","settings": {"options":{"Apple":"Apple","Orange":"Orange","Banana":"Banana"}}}'
{
"name": "Dropdown_Field_Update",
"settings": {
"options":
{
"Apple":"Apple",
"Orange":"Orange",
"Banana":"Banana"
}
}
}
curl --request PUT 'https://api.mailmailmail.net/v2.0/DataFields' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"name": "Date_Field_2","settings": {"display_order": "m-d-y","start_year": 1999,"end_year": 2020}}'
{
"name": "Date_Field",
"settings": {
"display_order": "d-m-y"
"start_year": 1990,
"end_year": 2030
}
}
Posible date formats : "d-m-y","m-d-y","y-m-d";
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "text";
$result = $parser->CreateDataField($fieldName, $fieldType);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "date";
$fieldSettings = array (
'display_order' => "d-m-Y",
'start_year' => 1990,
'end_year' => 2030
);
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "number";
$fieldSettings = array (
'max_length' => 50,
'min_length' => 10
);
$defaultValue = '50';
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings, $defaultValue);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "radiobutton";
$fieldSettings = array (
'options' => array (
"male"=>"male",
"female"=>"female"
)
);
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "checkbox";
$fieldSettings = array (
'options' => array (
"Monday"=>"Monday",
"Tuesday"=>"Tuesday",
"Wednesday"=>"Wednesday",
"Thursday"=>"Thursday",
"Friday"=>"Friday",
"Saturday"=>"Saturday",
"Sunday"=>"Sunday"
)
);
$defaultValue = "Monday";
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings, $defaultValue, $required);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldName = "Name of data field";
$fieldType = "dropdown";
$fieldSettings = array (
'options' => array (
"Red"=>"Red",
"Blue"=>"Blue",
"Yellow"=>"Yellow",
"Black"=>"Black",
"Grey"=>"Grey",
"White"=>"White",
"Silver"=>"Silver"
)
);
$result = $parser->CreateDataField($fieldName, $fieldType, $fieldSettings);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldText fieldType = new DataFieldText();
string result = parser.CreateDataField(fieldName, fieldType);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of Data field';
DataFieldDate fieldType = new DataFieldDate();
fieldType.settings["display_order"] = "d-m-Y";
fieldType.settings["start_year"] = "1990";
fieldType.settings["end_year"] = "2030";
string defaultValue = "26/05/2020";
string result = parser.CreateDataField(fieldName, fieldType, defaultValue);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldNumber fieldType = new DataFieldNumber();
fieldType.settings["max_length"] = "50";
fieldType.settings["min_length"] = "10";
string result = parser.CreateDataField(fieldName, fieldType);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldRadioButton fieldType = new DataFieldRadioButton();
List
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string fieldName = 'Name of data field';
DataFieldCheckBox fieldType = new DataFieldCheckBox();
List
{
"status":true,
"code":201,
"fieldid": 1
}
{
"status":false,
"code":409,
"message":"This field name already exist"
}
{
"status":false,
"code":400,
"message":"Invalid parameter for field settings"
}
Get sample data for OtM field.
GET
/DataFields/GetSampleDataForOTM/
Integer
fieldid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/DataFields/GetSampleDataForOTM?fieldid=14' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldid = 14;
$result = $parser->GetSampleDataForOTM($fieldid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int fieldid = 14;
string result = parser.GetSampleDataForOTM(fieldid);
{
"status":true,
"code":200,
"data":{
"Firstname":"enter text here",
"ID":"enter number here",
"DOB":"enter date here",
"Active":"enter boolean here (true/false)",
"Orders":[
{
"OrderName":"enter text here",
"OrderID":"enter number here",
"OrderDate":"enter date here",
"Send":"enter boolean here (true/false)",
"Products":[
{
"ProductName":"enter text here",
"ProductId":"enter number here",
"ProductDate":"enter date here",
"InStock":"enter boolean here (true/false)"
},
{
"ProductName":"enter text here",
"ProductId":"enter number here",
"ProductDate":"enter date here",
"InStock":"enter boolean here (true/false)"
}
],
"Parts":{
"PartName":"enter text here",
"PartID":"enter number here",
"PartDate":"enter date here",
"HavePart":"enter boolean here (true/false)"
}
},
{
"OrderName":"enter text here",
"OrderID":"enter number here",
"OrderDate":"enter date here",
"Send":"enter boolean here (true/false)",
"Products":[
{
"ProductName":"enter text here",
"ProductId":"enter number here",
"ProductDate":"enter date here",
"InStock":"enter boolean here (true/false)"
},
{
"ProductName":"enter text here",
"ProductId":"enter number here",
"ProductDate":"enter date here",
"InStock":"enter boolean here (true/false)"
}
],
"Parts":{
"PartName":"enter text here",
"PartID":"enter number here",
"PartDate":"enter date here",
"HavePart":"enter boolean here (true/false)"
}
}
],
"MyCompany":{
"CompanyName":"enter text here",
"CompanyID":"enter number here",
"OpenDate":"enter date here",
"Working":"enter boolean here (true/false)",
"MyProducts":[
{
"MyProductName":"enter text here",
"MyProductID":"enter number here",
"MyProductDate":"enter date here",
"MyProductInStock":"enter boolean here (true/false)"
},
{
"MyProductName":"enter text here",
"MyProductID":"enter number here",
"MyProductDate":"enter date here",
"MyProductInStock":"enter boolean here (true/false)"
}
],
"Owners":{
"OwnerGroup":"enter text here",
"OwnershipID":"enter number here",
"OwnedFrom":"enter date here",
"StillOwning":"enter boolean here (true/false)"
}
}
}
}
{
"status":false,
"code":403,
"message":"This user is not owner of the field."
}
Fetches Data Fields for the specific List.
DELETE
/DataFields/
Integer
fieldid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE 'https://api.mailmailmail.net/v2.0/DataFields?fieldid=12' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$fieldid = 12;
$result = $parser->DeleteDataField($fieldid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int fieldid = 12;
string result = parser.DeleteDataField(fieldid);
{
"status":true,
"code":200,
"message":"Data field has been deleted"
}
{
"status":false,
"code":403,
"message":"This user is not owner of the field."
}
Get profile data.
GET
/Profiles/GetProfileDetails/
Integer
profileid
Integer
listid
String
email_address
String
mobile_number
String
mobile_prefix
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET
'https://api.mailmailmail.net/v2.0/Profiles/GetProfileDetails?profileid=39&listid=2&email_address=contact@marketingplatform.com&mobile_number=72444444&mobile_prefix=45' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 39;
$listid = 2;
$emailaddres = "contact@marketingplatform.com";
$mobileNumber = "72444444";
$mobilePrefix = "45";
$result = $parser->GetProfileDetails($profileid, $listid, $emailaddress, $mobileNumber, $mobilePrefix);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 39;
int listid = 2;
string emailaddres = "contact@marketingplatform.com";
string mobileNumber = "72444444";
string mobilePrefix = "45";
string result = parser.GetProfileDetails(profileid, listid, emailaddress, mobileNumber, mobilePrefix);
{
"status":true,
"code":200,
"data":{
"profileid":39,
"listid":2,
"email_address":"contact@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"domain":"@marketingplatform.com",
"format":"h",
"confirmed":false,
"request_date":1551698732,
"confirm_date":0,
"subscribe_date":0,
"bounced":0,
"unsubscribed":0,
"rating":1,
"disabled":0,
"sms_unsubscribed":0,
"leadscore":0,
"sign_up_source" "Manual",
"data_fields": [
{
"fieldid": "524",
"field_name": "Firs tName",
"field_type": "text",
"field_value": "Jon"
},
{
"fieldid": "284226",
"field_name": "AGE",
"field_type": "number",
"field_value": 23
}
]
}
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
This method adds a profile to a Profile List.
POST
/Profiles/
Wiki Link
Integer
listid
String
email_address
String
mobile_number
String
mobile_prefix
Array
data_fields
Boolean
confirmed
Boolean
mobile_permission
Boolean
email_permission
Boolean
add_to_autoresponders
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Profiles' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"listid":24,"email_address":"contact@marketingplatform.com","mobile_number":"72444444","mobile_prefix":"45","data_fields":[{"fieldid":70,"field_value":123123213}],"confirmed":false,"add_to_autoresponders":false}'
{
"listid": 24,
"email_address": "contact@marketingplatform.com",
"mobile_number": "72444444",
"mobile_prefix": "45",
"data_fields": [{
"fieldid": 70,
"field_value": 123123213
}],
"confirmed": false,
"mobile_permission": false,
"email_permission": false
"add_to_autoresponders": false
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 24;
$emailaddress = "contact@marketingplatform.com";
$mobileNumber = "72444444";
$mobilePrefix = "45";
$confirmed = false;
$addToAutoreposnders = false;
$dataFields = array ('fieldid' => 70, 'field_value' => 123123213);
$result = $parser->AddProfileToList($listid, $emailaddress, $mobileNumber, $mobilePrefix, $dataFields, $confirmed, $addToAutoreposnders);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 24;
string emailaddress = "contact@marketingplatform.com";
string mobileNumber = "72444444";
string mobilePrefix = "45";
bool confirmed = false;
bool addToAutoresponders = false;
List<Dictionary<string, object>> dataFields = new List<Dictionary<string, object>>();
Dictionary<string, object> dataField = new Dictionary<string, object>();
dataField.Add("fieldid", "70");
dataField.Add("field_value", "123123123");
dataFields.Add(dataField);
string result = parser.AddProfileToList(listid, emailaddress, mobileNumber, mobilePrefix, confirmed, addToAutoresponders, dataFields);
{
"status":true
"code":201,
"profileid":1098
}
{
"status":false,
"code":400,
"message":"Invalid parameters specified to use this function."
}
This method inserts or updates a contact profile based solely on the optional parameters specified in the endpoint definition (such as data fields and consents).
Note: Default consent values, if optional parameters are missing, for very first insert on a new profile:
"confirmed = false" <=> "View Profile Screen → Confirmation status = Unsubscribed"
"email_permission = true" <=> "View Profile Screen → Email Permission = Active"
"mobile_permission = true" <=> "View Profile Screen → Mobile permission = Active"
** In all other cases, consent parameters remain optional.
Note: The endpoint supports updating profile attributes and consent values and can, if explicitly requested, override the customer’s current consent preferences.
POST
/Profiles/UpsertProfileToList
Wiki Link
Integer
listid
String
email_address
String
mobile_number
String
mobile_prefix
Array
data_fields
Boolean
confirmed
Boolean
mobile_permission
Boolean
email_permission
Boolean
add_to_autoresponders
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Profiles/UpsertProfileToList' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"listid":24,"email_address":"contact@marketingplatform.com","mobile_number":"72444444","mobile_prefix":"45","data_fields":[{"fieldid":70,"field_value":123123213}],"confirmed":false,"mobile_permission":false,"email_permission":false,"add_to_autoresponders":false}'
{
"listid": 24,
"email_address": "contact@marketingplatform.com",
"mobile_number": "72444444",
"mobile_prefix": "45",
"data_fields": [{
"fieldid": 70,
"field_value": 123123213
}],
"confirmed": false,
"mobile_permission": false,
"email_permission": false
"add_to_autoresponders": false
}
{
"status":true
"code":201,
"profileid":1098
}
{
"status":false,
"code":400,
"message":"Invalid parameters specified to use this function."
}
This method updates profile dataFields.
PUT
/Profiles/UpdateProfile
Integer
profileid
Array
data_fields
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Profiles/UpdateProfile' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"listid":1,"profileid":15753,"data_fields":[{"fieldid":"2","field_value":"Name Update"},{"fieldid":"7","field_value":"City Update"}]}'
{
"profileid": 15753,
"data_fields": [{
"fieldid": "2",
"field_value": "Name Update"
}, {
"fieldid": "7",
"field_value": "City Update"
}]
}'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1;
$dataFields = array(
array(
'fieldid' => 2,
'fieldvalue' => "Name Update"
),
array(
'fieldid' => 7,
'fieldvalue' => "City Update"
)
);
$result = $parser->UpdateProfile($profileid, $listid, $dataFields);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1;
List<Dictionary<string, object>> dataFields = new List<Dictionary<string, object>>();
Dictionary<string, object> dataField = new Dictionary<string, object>();
Dictionary<string, object> dataField2 = new Dictionary<string, object>();
dataField.Add("fieldid", "2");
dataField.Add("field_value", "Name Update");
dataField2.Add("fieldid", "7");
dataField2.Add("field_value", "City Update");
dataFields.Add(dataField);
dataFields.Add(dataField2);
string result = parser.UpdateProfile(profileid, listid, dataFields);
{
"status":true,
"code":200,
"message":"Profile has been successfully updated"
}
{
"status":false,
"code":400,
"message":"Invalid parameters specified to use this function."
}
This method updates profile dataFields.
PUT
/Profiles
Integer
profileid
Array
data_fields
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Profiles' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"listid":1,"profileid":15753,"data_fields":[{"fieldid":"2","fieldvalue":"Name Update"},{"fieldid":"7","fieldvalue":"City Update"}]}'
{
"profileid": 15753,
"data_fields": [{
"fieldid": "2",
"fieldvalue": "Name Update"
}, {
"fieldid": "7",
"fieldvalue": "City Update"
}]
}'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1;
$listid = 1;
$dataFields = array(
array(
'fieldid' => 2,
'fieldvalue' => "Name Update"
),
array(
'fieldid' => 7,
'fieldvalue' => "City Update"
)
);
$result = $parser->UpdateProfile($profileid, $listid, $dataFields);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int rofileid = 1;
int listid = 1;
List<Dictionary<string, object>> dataFields = new List<Dictionary<string, object>>();
Dictionary<string, object> dataField = new Dictionary<string, object>();
Dictionary<string, object> dataField2 = new Dictionary<string, object>();
dataField.Add("fieldid", "2");
dataField.Add("field_value", "Name Update");
dataField2.Add("fieldid", "7");
dataField2.Add("field_value", "City Update");
dataFields.Add(dataField);
dataFields.Add(dataField2);
string result = parser.UpdateProfile(profileid, listid, dataFields);
{
"status":true,
"code":200,
"message":"Profile has been successfully updated"
}
{
"status":false,
"code":400,
"message":"Invalid parameters specified to use this function."
}
All profile information is deleted and email/mobile is restricted from subscribing again - it will not be possible to add this profile again except from ResubscribeProfile that the profile needs to confirm.
DELETE
/Profiles/
Integer
profileid
Integer
listid
String
email_address
String
mobile_number
String
mobile_prefix
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE
'https://api.mailmailmail.net/v2.0/Profiles?profileid=62&listid=5&email_address=contact@marketingplatform.com&mobile_number=72444444&mobile_prefix=45' -H
'Apiusername: API_USERNAME' -H
'Apitoken: API_TOKEN' -H
'Content-Type: application/json' -d
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 62;
$listid = 5;
$emailaddress = "contact@marketingplatform.com";
$mobileNumber = "72444444";
$mobilePrefix = "45";
$result = $parser->DeleteProfile($profileid, $listid, $emailaddress, $mobileNumber, $mobilePrefix);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 62;
int listid = 5;
string emailaddress = "contact@marketingplatform.com";
string mobileNumber = "72444444";
string mobilePrefix = "45";
string result = parser.DeleteProfile(profileid, listid, emailaddress, mobileNumber, mobilePrefix);
{
"status": true,
"code": 202,
"message":"Profile has been successfully deleted"
}
{
"status":false,
"code":202,
"message":"This user is not owner of the list"
}
Get a list of data fields for profiles.
GET
/Profiles/LoadProfileDataFields/
Integer
profileid
Integer
listid
String
email_address
String
mobile_number
String
mobile_prefix
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/LoadProfileDataFields?profileid=1080&listid=11&email_address=contact@marketingplatform.com&mobile_number=72444444&mobile_prefix=45' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1080;
$listid = 11;
$emailaddres = "contact@marketingplatform.com";
$mobileNumber = "72444444";
$mobilePrefix = "45";
$result = $parser->LoadProfileDataFields($profileid, $listid, $emailaddress, $mobileNumber, $mobilePrefix);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1080;
int listid = 11;
string emailaddres = "contact@marketingplatform.com";
string mobileNumber = "72444444";
string mobilePrefix = "45";
string result = parser.LoadProfileDataFields(profileid, listid, emailaddress, mobileNumber, mobilePrefix);
{
"status": true,
"code": 200,
"data": [
{
"fieldid":1,
"field_value":"",
"field_name":"Title",
"field_type":"dropdown"
},
{
"fieldid":2,
"field_value":"Toni",
"field_name":"First Name",
"field_type":"text"
},
{
"fieldid":3,
"field_value":"Mladenovski",
"field_name":"Last Name",
"field_type":"text"
},
{
"fieldid":6,
"field_value":"11/06/1993",
"field_name":"Birth Date",
"field_type":"date"
},
{
"fieldid":7,
"field_value":"Kumanovo",
"field_name":"City",
"field_type":"text"
},
{
"fieldid":10,
"field_value":"Macedonia",
"field_name":"Country",
"field_type":"dropdown"
},
{
"fieldid":11,
"fieldvalue":"Male",
"field_name":"Gender",
"field_type":"radiobutton"
},
{
"fieldid":12,
"field_value": [
{
"value": "green",
"label": "Green"
},
{
"value": "red",
"label": "Red"
}
],
"field_name":"Color",
"field_type":"checkbox"
}
]
}
{
"status":false,
"code":403,
"message":"Profile not found."
}
Saves data field information for particular Profile, particular List and particular Field.
POST
/Profiles/SaveProfileDataField/
Integer
profileid
Integer
fieldid
String
field_value
Boolean
skip_empty_data
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Profiles/SaveProfileDataField' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"profileid":1097,"fieldid":11,"field_value":"MKD","skip_empty_data":false}'
{
"profileid": 1097,
"fieldid": 11,
"field_value": "MKD",
"skip_empty_data": false
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$fieldid = 11; // Field ID for Country.
$fieldValue = "MKD"; /* Use 3 letter ISO 3166 international standard
[Denmark => "DNK", Norway => "NOR"] */
$skipEmptyData = false;
$result = $parser->SaveProfileDataField($profileid, $fieldid, $fieldValue);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$fieldid = 14;
$fieldValue = array("Fri", "Sun"); /* Use option values.
This example will select Fiday and Sunday*/
$skipEmptyData = false;
$result = $parser->SaveProfileDataField($profileid, $fieldid, $fieldValue);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1097;
DataField field = new DataField();
field.fieldid = 11; // Field ID for Country
field.fieldvalue = new string[] { "MKD" }; /* Use 3 letter ISO 3166 international standard
[Denmark => "DNK", Norway => "NOR"] */
bool skipEmptyData = false;
string result = parser.SaveProfileDataField(profileid, field, skipEmptyData);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1097;
DataField field = new DataField();
field.fieldid = 11; // Field ID for Country
field.fieldvalue = new string[] { "Fri", "Sun" }; /* Use option values.
This example will select Fiday and Sunday*/
bool skipEmptyData = false;
string result = parser.SaveProfileDataField(profileid, field, skipEmptyData);
{
"status": true,
"code": 200,
"message":"You have successfully updated profile field"
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Saves data field information for particular Profile, particular List and particular Field.
PUT
/Profiles/SaveProfileDataField/
Integer
profileid
Integer
fieldid
String
field_value
Boolean
skip_empty_data
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Profiles/SaveProfileDataField' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"profileid":1097,"fieldid":11,"field_value":"MKD","skip_empty_data":false}'
{
"profileid": 1097,
"fieldid": 11,
"field_value": "MKD",
"skip_empty_data": false
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$fieldid = 11; // Field ID for Country.
$fieldValue = "MKD"; /* Use 3 letter ISO 3166 international standard
[Denmark => "DNK", Norway => "NOR"] */
$skipEmptyData = false;
$result = $parser->SaveProfileDataField($profileid, $fieldid, $fieldValue);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$fieldid = 14;
$fieldValue = array("Fri", "Sun"); /* Use option values.
This example will select Fiday and Sunday*/
$skipEmptyData = false;
$result = $parser->SaveProfileDataField($profileid, $fieldid, $fieldValue);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1097;
DataField field = new DataField();
field.fieldid = 11; // Field ID for Country
field.fieldvalue = new string[] { "MKD" }; /* Use 3 letter ISO 3166 international standard
[Denmark => "DNK", Norway => "NOR"] */
bool skipEmptyData = false;
string result = parser.SaveProfileDataField(profileid, field, skipEmptyData);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1097;
DataField field = new DataField();
field.fieldid = 11; // Field ID for Country
field.fieldvalue = new string[] { "Fri", "Sun" }; /* Use option values.
This example will select Fiday and Sunday*/
bool skipEmptyData = false;
string result = parser.SaveProfileDataField(profileid, field, skipEmptyData);
{
"status": true,
"code": 200,
"message":"You have successfully updated profile field"
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get a list of otm fields for profiles.
GET
/Profiles/LoadProfileOTMFields/
Integer
profileid
Integer
listid
String
email_address
String
mobile_number
String
mobile_prefix
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/LoadProfileOTMFields?profileid=1080&listid=11&email_address=contact@marketingplatform.com&mobile_number=72444444&mobile_prefix=45' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1080;
$listid = 11;
$emailaddres = "contact@marketingplatform.com";
$mobileNumber = "72444444";
$mobilePrefix = "45";
$result = $parser->LoadProfileOTMFields($profileid, $listid, $emailaddress, $mobileNumber, $mobilePrefix);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1080;
int listid = 11;
string emailaddres = "contact@marketingplatform.com";
string mobileNumber = "72444444";
string mobilePrefix = "45";
string result = parser.LoadProfileOTMFields(profileid, listid, emailaddress, mobileNumber, mobilePrefix);
{
"status": true,
"code": 200,
"data": [
{
"fieldid":14,
"field_value":null,
"field_name":"Movie",
"field_type":"Relational"
},
{
"fieldid":17,
"field_value":{
"Movie":[
{
"Title":"Bohemian Rhapsody",
"ReleaseDate":"2018-11-02T00:00:00.000+01:00",
"Actors":[
{
"FirstName":"Rami",
"LastName":"Malek",
"BirthDate":"1981-05-12T00:00:00.000+02:00",
"emp_trigger":0
},
{
"FirstName":"Lucy",
"LastName":"Boynton",
"BirthDate":"1994-01-17T00:00:00.000+01:00",
"emp_trigger":0
}
],
"Oscar":true,
"Rating":8.4,
"Premiere":[
{
"Country":"Denmark",
"Cinema":"Cineplexx",
"PremiereDate":"2018-11-21T00:00:00.000+01:00",
"emp_trigger":0
},
{
"Country":"Macedonia",
"Cinema":"Cineplexx",
"PremiereDate":"2018-11-01T00:00:00.000+01:00",
"emp_trigger":0
}
],
"emp_trigger":0
},
{
"Title":"The Prestige",
"ReleaseDate":"2006-10-20T00:00:00.000+02:00",
"Actors":[
{
"FirstName":"Christian",
"LastName":"Bale",
"BirthDate":"1974-01-30T00:00:00.000+01:00",
"emp_trigger":0
},
{
"FirstName":"Hugh",
"LastName":"Jackman",
"BirthDate":"1968-10-12T00:00:00.000+01:00",
"emp_trigger":0
},
{
"FirstName":"Scarlett",
"LastName":"Scarlett",
"BirthDate":"1984-11-22T00:00:00.000+01:00",
"emp_trigger":0
}
],
"Oscar":false,
"Rating":8.5,
"Premiere":[
{
"Country":"Italy",
"Cinema":"Cineplexx",
"PremiereDate":"2006-10-17T00:00:00.000+02:00",
"emp_trigger":0
},
{
"Country":"Austria",
"Cinema":"Cineplexx",
"PremiereDate":"2007-01-05T00:00:00.000+01:00",
"emp_trigger":0
},
{
"Country":"Denmark",
"Cinema":"CineDK",
"PremiereDate":"2007-01-05T00:00:00.000+01:00",
"emp_trigger":0
}
],
"emp_trigger":0
},
{
"Title":"Lucky Number Slevin",
"ReleaseDate":"2006-02-24T00:00:00.000+01:00",
"Actors":[
{
"FirstName":"Josh",
"LastName":"Hartnett",
"BirthDate":"1978-07-21T00:00:00.000+01:00",
"emp_trigger":0
},
{
"FirstName":"Ben",
"LastName":"Kingsley",
"BirthDate":"1943-12-31T00:00:00.000+01:00",
"emp_trigger":0
},
{
"FirstName":"Morgan",
"LastName":"Freeman",
"BirthDate":"1937-06-01T00:00:00.000+01:00",
"emp_trigger":0
},
{
"FirstName":"Bruce",
"LastName":"Willis",
"BirthDate":"1955-03-19T00:00:00.000+01:00",
"emp_trigger":0
}
],
"Oscar":false,
"Rating":7.8,
"Premiere":[
{
"Country":"United Kingdom",
"Cinema":"Cineplexx",
"PremiereDate":"2006-02-24T00:00:00.000+01:00",
"emp_trigger":0
},
{
"Country":"Spain",
"Cinema":"Cineplexx",
"PremiereDate":"2006-03-30T00:00:00.000+02:00",
"emp_trigger":0
},
{
"Country":"Canada",
"Cinema":"Cine",
"PremiereDate":"2006-04-07T00:00:00.000+02:00",
"emp_trigger":0
},
{
"Country":"Columbia",
"Cinema":"CineC",
"PremiereDate":"2006-09-10T00:00:00.000+02:00",
"emp_trigger":0
}
],
"emp_trigger":0
}
],
"emp_trigger":0
},
"field_name":"Movies",
"field_type":"Relational"
}
]
}
{
"status":false,
"code":403,
"message":"Profile not found."
}
Inserts entire OTM document or saves partial One-To-Many data for specific Profile.
POST
/Profiles/AddToOTMDocument/
Integer
profileid
Integer
fieldid
Array
field_value
String
path
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Profiles/AddToOTMDocument' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"profileid":1097,"fieldid":17,"field_value":[{"Title":"John Wick: Chapter 3 - Parabellum","ReleaseDate":"17.05.2019","Actors":[{"FirstName":"Keanu","LastName":"Reeves","BirthDate":"02.09.1964"},{"FirstName":"Halle","LastName":"14.08.1966"}],"Oscar":false,"Rating":7.5,"Premiere":[{"Country":"Macedonia","Cinema":"Cineplexx","PremiereDate":"15.05.2019"}]}],"path":""}'
{
"profileid": 1097,
"fieldid": 17,
"field_value": [{
"Title": "John Wick: Chapter 3 - Parabellum",
"ReleaseDate": "17.05.2019",
"Actors": [{
"FirstName": "Keanu",
"LastName": "Reeves",
"BirthDate": "02.09.1964"
}, {
"FirstName": "Halle",
"LastName": "Colman",
"Oscars": [{
"Year": 2015,
"AwardedFor": "Best Performance",
}]
}],
"Oscar": false,
"Rating": 7.5,
"Premiere": [{
"Country": "Macedonia",
"Cinema": "Cineplexx",
"PremiereDate": "15.05.2019"
}]
}],
"path": ""
}
{
"profileid": 1097,
"fieldid": 17,
"field_value": [{
[{
"FirstName": "Keanu",
"LastName": "Reeves",
"BirthDate": "02.09.1964"
}]
}],
"path": "Actors"
}
{
"profileid": 1097,
"fieldid": 17,
"field_value": [{
[{
"Year": 2015,
"AwardedFor": "Best Performance",
}]
}],
"path": "Actors.Oscars"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$fieldid = 17;
$fieldValue = array (
array (
"Title" => "John Wick: Chapter 3 - Parabellum",
"ReleaseDate" => "17.05.2019",
"Actors" => array (
array (
"FirstName" => "Keanu",
"LastName" => "Reeves",
"BirthDate" => "02.09.1964"
),
array (
"FirstName" => "Halle",
"LastName" => "Berry",
"LastName" => "14.08.1966"
)
),
"Oscar" => false,
"Rating" => 7.5,
"Premiere" => array (
array (
"Country" => "Macedonia",
"Cinema" => "Cineplexx",
"PremiereDate" => "15.05.2019"
)
)
)
);
$path = "";
$result = $parser->AddToOTMDocument($profileid, $fieldid, $fieldValue, $path);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$fieldid = 17;
$search = array (
"connector" => "and",
"values" => array (
array (
"subitem" => "Title",
"value" => 'John Wick: Chapter 3 - Parabellum',
"operator" => "=",
"type" => "text"
)
)
);
$fieldValue = array (
"FirstName" => "Ian",
"LastName" => "McShane",
"BirthDate" => "29.09.1942"
);
$path = "Actors";
$result = $parser->AddToOTMDocument($profileid, $fieldid, $fieldValue, $path, $search);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
Add entire document
int profileid = 1097;
int fieldid = 17;
Dictionary<string, object> movie = new Dictionary<string, object>();
List<Dictionary<string, object>> actors = new List<Dictionary<string, object>>();
List<Dictionary<string, object>> premieres = new List<Dictionary<string, object>>();
Dictionary actor1 = new Dictionary();
actor1.Add("FirstName", "Keanu");
actor1.Add("LastName", "Reeves");
actor1.Add("BirthDate", "02.09.1964");
Dictionary actor2 = new Dictionary();
actor2.Add("FirstName", "Halle");
actor2.Add("LastName", "Berry");
actor2.Add("BirthDate", "14.08.1966");
actors.Add(actor1);
actors.Add(actor2);
Dictionary premiere = new Dictionary();
premiere.Add("Country", "Macedonia");
premiere.Add("Cinema", "Cineplexx");
premiere.Add("PremiereDate", "15.05.2019");
premieres.Add(premiere);
movie.Add("Title", "John Wick: Chapter 3 - Parabellum");
movie.Add("ReleaseDate", "17.05.2019");
movie.Add("Actors", actors);
movie.Add("Oscar", false);
movie.Add("Rating", 7.5);
movie.Add("Premiere", premieres);
string path = "";
string result = parser.AddToOTMDocument(profileid, fieldid, movie, path);
using MarketingPlatform;
int profileid = 1097;
int fieldid = 17;
Dictionary<string, object> search = new Dictionary<string, object>();
List<Dictionary<string, object>> searchValues = new List<Dictionary<string, object>>();
Dictionary<string, object> searchValue = new Dictionary<string, object>();
search.Add("connector", "and");
searchValue.Add("subitem", "Title");
searchValue.Add("value", "John Wick: Chapter 3 - Parabellum");
searchValue.Add("operator", "=");
searchValue.Add("type", "text");
Dictionary<string, object> actor = new Dictionary<string, object>();
actor.Add("FirstName", "Ian");
actor.Add("LastName", "McShane");
actor.Add("BirthDate", "29.09.1942");
string path = "Actors";
search.Add("values", searchValues);
string result = parser.AddToOTMDocument(profileid, fieldid, actor, path, search);
{
"status": true,
"code": 200,
"message":"You have successfully added One-To-Many field"
}
{
"status":false,
"code":409,
"message":"Can not add more than one object."
}
Update One-To-Many data for specific Profile.
PUT
/Profiles/UpdateOTMDocument/
Integer
profileid
Integer
fieldid
Mixed
replace
String
path
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Profiles/UpdateOTMDocument'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'-d'{"profileid":1097,"fieldid":17,"search":[{"connector":"and","values":[{"subitem":"Title","value":"John Wick: Chapter 2","operator":"=","type":"text"}]}],"replace":[{"subitem":"Title","value":"John Wick 2","type":"text"},{"subitem":"ReleaseDate","value":"30.01.2018","type":"text"}],"path":""}'
{
"profileid": 1097,
"fieldid": 17,
"search": [{
"connector": "and",
"values": [{
"subitem": "Title",
"value": "John Wick: Chapter 2",
"operator": "=",
"type": "text"
}]
}],
"replace": [{
"subitem": "Title",
"value": "John Wick 2",
"type": "text"
}, {
"subitem": "ReleaseDate",
"value": "30.01.2018",
"type": "text"
}],
"path": ""
}
{
"profileid": 1097,
"fieldid": 17,
"search": [{
"connector": "and",
"values": [{
"subitem": "FirstName",
"value": "Keannu",
"operator": "=",
"type": "text"
}]
}],
"replace": [{
"subitem": "FirstName",
"value": "Kalle",
"type": "text"
}]"
}],
"path": "Actors"
}
{
"profileid": 1097,
"fieldid": 17,
"search": [{
"connector": "and",
"values": [{
"subitem": "Year",
"value": 2012,
"operator": "=",
"type": "number"
}]
}],
"replace": [{
"subitem": "Year",
"value": 2013,
"type": "number"
}]"
}],
"path": "Actors.Oscars"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$fieldid = 17;
$search = array (
"connector" => "and",
"values" => array (
array (
"subitem" => "Title",
"value" => "John Wick: Chapter 2",
"operator" => "=",
"type" => "text"
)
)
);
$replace = array (
array (
"subitem" => "Title",
"value" => "John Wick 2",
"type" => "text"
),
array (
"subitem" => "ReleaseDate",
"value" => "30.01.2018",
"type" => "text"
)
);
$path = "";
$result = $parser->UpdateOTMDocument($profileid, $fieldid, $search, $replace, $path);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$fieldid = 17;
$search = array (
"connector" => "and", //connector can be "OR" if you whant to match Any of the search values before UPDATE
"values" => array (
array (
"subitem" => "FirstName",
"value" => 'Ian',
"operator" => "=",
"type" => "text"
),
array (
"subitem" => "LastName",
"value" => 'McShane',
"operator" => "=",
"type" => "text"
)
)
);
$replace = array (
array (
"subitem" => "BirthDate",
"value" => '29.09.1942',
"type" => "date"
)
);
$path = "Actors";
$result = $parser->UpdateOTMDocument($profileid, $fieldid, $search, $replace, $path);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
Update Title and ReleaseDate on 2nd Movie
int profileid = 1097;
int fieldid = 17;
List<Dictionary<string, object>> searchValues = new List<Dictionary<string, object>>();
List<Dictionary<string, object>> replace = new List<Dictionary<string, object>>();
Dictionary<string, object> search = new Dictionary<string, object>();
Dictionary<string, object> searchValue = new Dictionary<string, object>();
Dictionary<string, object> replaceValue = new Dictionary<string, object>();
Dictionary<string, object> replaceValue2 = new Dictionary<string, object>();
search.Add("connector", "and");
searchValue.Add("subitem", "Title");
searchValue.Add("value", "John Wick: Chapter 2");
searchValue.Add("operator", "=");
searchValue.Add("type", "text");
searchValues.Add(searchValue);
search.Add("values", searchValues);
replaceValue.Add("subitem", "Title");
replaceValue.Add("value", "John Wick 2");
replaceValue.Add("type", "text");
replaceValue2.Add("subitem", "ReleaseDate");
replaceValue2.Add("value", "20.08.2018");
replaceValue2.Add("type", "date");
replace.Add(replaceValue);
replace.Add(replaceValue2);
string path = "";
string result = parser.UpdateOTMDocument(profileid, fieldid, search, replace, path);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
$profileid = 1097;
$fieldid = 17;
List<Dictionary<string, object>> searchValues = new List<Dictionary<string, object>>();
List<Dictionary<string, object>> replace = new List<Dictionary<string, object>>();
Dictionary<string, object> search = new Dictionary<string, object>();
Dictionary<string, object> searchValue = new Dictionary<string, object>();
Dictionary<string, object> replaceValue = new Dictionary<string, object>();
search.Add("connector", "and");
searchValue.Add("subitem", "FirstName");
searchValue.Add("value", "Ian");
searchValue.Add("operator", "=");
searchValue.Add("type", "text");
searchValues.Add(searchValue);
search.Add("values", searchValues);
replaceValue.Add("subitem", "LastName");
replaceValue.Add("value", "Wick");
replaceValue.Add("type", "text");
replace.Add(replaceValue);
string path = "Actors"
string result = parser.UpdateOTMDocument(profileid, fieldid, search, replace, path);
{
"status": true,
"code": 201,
"data": {
"message":"You have successfully updated One-To-Many field"
}
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Remove One-To-Many data for specific Profile.
DELETE
/Profiles/RemoveOTMDocument/
Integer
profileid
Integer
fieldid
String
path
Integer
index
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE 'https://api.mailmailmail.net/v2.0/Profiles/RemoveOTMDocument'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'-d'{"profileid":1097,"fieldid":17,"search":[{"connector":"and","values":[{"subitem":"Title","value":"John Wick: Chapter 3 - Parabellum","operator":"=","type":"text"}]}],"path":""}'
{
"profileid": 1097,
"fieldid": 17,
"search": [{
"connector": "and",
"values": [{
"subitem": "Title",
"value": "John Wick: Chapter 3 - Parabellum",
"operator": "=",
"type": "text"
}]
}],
"path": ""
}
{
"profileid": 1097,
"fieldid": 17,
"search": [{
"connector": "and",
"values": [{
"subitem": "FirstName",
"value": "Keannu",
"operator": "=",
"type": "text"
}]
}],
"path": "Actors"
}
{
"profileid": 1097,
"fieldid": 17,
"search": [{
"connector": "and",
"values": [{
"subitem": "Year",
"value": 2013,
"operator": "=",
"type": "number"
}]
}],
"path": "Actors.Oscars"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$fieldid = 17;
$path = "";
$search = array (
"connector" => "and",
"values" => array (
array (
"subitem" => "Title",
"value" => 'John Wick: Chapter 3 - Parabellum',
"operator" => "=",
"type" => "text"
)
)
);
$result = $parser->RemoveOTMDocument($profileid, $fieldid, $search, $path);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$fieldid = 17;
$path = "Actors";
$search = array (
"connector" => "and",
"values" => array (
array (
"subitem" => "FirstName",
"value" => 'Keanu',
"operator" => "=",
"type" => "text"
)
)
);
$result = $parser->RemoveOTMDocument($profileid, $fieldid, $search, $path);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
Remove 2nd Movie
int profileid = 1097;
int fieldid = 17;
List<Dictionary<string, object>> searchValues = new List<Dictionary<string, object>>();
Dictionary<string, object> search = new Dictionary<string, object>();
Dictionary<string, object> searchValue = new Dictionary<string, object>();
search.Add("connector", "and");
searchValue.Add("subitem", "Title");
searchValue.Add("value", "John Wick: Chapter 3 - Parabellum");
searchValue.Add("operator", "=");
searchValue.Add("type", "text");
searchValues.Add(searchValue);
search.Add("values", searchValues);
string path = "";
string result = parser.RemoveOTMDocument(profileid, fieldid, search, path);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1097;
int fieldid = 17;
string path = "Actors";
List<Dictionary<string, object>> searchValues = new List<Dictionary<string, object>>();
Dictionary<string, object> search = new Dictionary<string, object>();
Dictionary<string, object> searchValue = new Dictionary<string, object>();
search.Add("connector", "and");
searchValue.Add("subitem", "FirstName");
searchValue.Add("value", "Keanu");
searchValue.Add("operator", "=");
searchValue.Add("type", "text");
searchValues.Add(searchValue);
search.Add("values", searchValues);
string result = parser.RemoveOTMDocument(profileid, fieldid, search, path);
{
"status": true,
"code": 200,
"message":"You have successfully removed One-To-Many field"
}
{
"status":false,
"code":409,
"message":"Can not delete OTM field"
}
Resubscribe Profile if the profile is deleted.
POST
/Profiles/ResubscribeProfile/
String
email_address
String
mobile_number
String
mobile_prefix
Boolean
add_to_autoresponders
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Profiles/ResubscribeProfile' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"email_address":"contact@marketingplatform.com","mobile_number":"72444444","mobile_prefix":"45","add_to_autoresponders":false}'
{
"email_address": "contact@marketingplatform.com",
"mobile_number": "72444444",
"mobile_prefix": "45",
"add_to_autoresponders": false
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$emailaddress = "contact@marketingplatform.com";
$mobileNumber = "72444444";
$mobilePrefix = "45";
$addToAutoreposnders = false;
$result = $parser->ResubscribeProfile($emailaddress, $mobileNumber, $mobilePrefix, $addToAutoreposnders);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string emailaddress = "contact@marketingplatform.com";
string mobileNumber = "72444444";
string mobilePrefix = "45";
bool addToAutoresponders = false;
string result = parser.ResubscribeProfile(emailaddress, mobileNumber, mobilePrefix, addToAutoreposnders);
{
"status": true,
"code": 200,
"data": [
{
"listid":2,
"result":"Profile has been successfully resubscribed.",
"profileid":1179
},
{
"listid":3,
"result":"Profile has been successfully resubscribed.",
"profileid":1180
}
]
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Request to change current email address.
PUT
/Profiles/RequestUpdateEmail/
Integer
profileid
String
old_email
String
new_email
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Profiles/RequestUpdateEmail' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"profileid":1092,"old_email":"contact@marketingplatform.com","new_email":"info@marketingplatform.com"}'
{
"profileid": 1092,
"old_email": "contact@marketingplatform.com",
"new_email": "info@marketingplatform.com"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1092;
$oldEmail = "contact@marketingplatform.com";
$newEmail = "info@marketingplatform.com";
$result = $parser->RequestUpdateEmail($profileid, $oldEmail, $newEmail);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1092;
string oldEmail = "contact@marketingplatform.com";
string newEmail = "info@marketingplatform.com";
string result = parser.RequestUpdateEmail(profileid, oldEmail, newEmail);
{
"status": true,
"code": 200,
"message":"You have successfully made update request"
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Change current email address without sending confirmation email.
A confirmation formis required for every list that needs to be updated, as the recovery page is part of the confirmation form and cannot function without it.
When using a mobile number as the reference ID for identifying and updating profiles, the number must begin with either “+” or “00” to ensure proper format recognition and matching.
When a profile update is performed using a mobile number, and the associated profile has an email address configured for recovery, a recovery email will automatically be sent to that email address.
PUT
/Profiles/emailaddres
Multitype
Reference
String
new_email
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Profiles/emailaddress' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{
"reference":"8237",
"new_email":"info@marketingplatform.com"
}'
{
"reference": 1092,
"new_email": "info@marketingplatform.com"
}
{
"reference": "+45283848", // || 0045283848
"new_email": "info@marketingplatform.com"
}
{
"reference": "exmple@gmail.com",
"new_email": "info@marketingplatform.com"
}
{
"status": true,
"code": 200,
"Response_Info": {
"New emailaddress is duplicate on list(s).": [
"255",
"257",
"258",
"256",
"260",
"259",
"248",
"250",
"267"
],
"Unconfiermed emailaddress on list(s).": {
"261": "8210",
"262": "8213"
},
"Bounce emailaddress on list(s).": {
"263": "8211"
},
"Disabled emailaddress on list(s).": {
"264": "8212"
},
"Emailaddres updated on list(s).": {
"266": "8214",
"265": "8215"
}
}
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Change mobile of a profile.
PUT
/Profiles/ChangeMobile/
Integer
profileid
Integer
mobile_number
Integer
mobile_prefix
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Profiles/ChangeMobile' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"profileid":1097,"mobile_number":"72444444","mobile_prefix":"45"}'
{
"profileid": 1097,
"mobile_number": "72444444",
"mobile_prefix": "45"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$mobileNumber = "72444444";
$mobilePrefix = "45";
$result = $parser->ChangeMobile($profileid, $mobileNumber, $mobilePrefix);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1097;
string mobileNumber = "72444444";
string mobilePrefix = "44";
string result = parser.ChangeMobile(profileid, mobileNumber, mobilePrefix);
{
"status": true,
"code": 200,
"message":"Mobile Number has been changed"
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Checks whether a Profile is on a particular List based on their Email Address or profile ID.
GET
/Profiles/IsProfileOnList/
Integer
listid
String
email_address
String
mobile_number
String
mobile_prefix
Integer
profileid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/IsProfileOnList?listid=10&email_address=contact@marketingplatform.com&mobile_number=72444444&mobile_prefix=45&profileid=51'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 10;
$emailaddress = "contact@marketingplatform.com";
$mobileNumber = "72444444";
$mobilePrefix = "45";
$profileid = 51;
$result = $parser->IsProfileOnList($listid, $emailaddress, $mobileNumber, $mobilePrefix, $profileid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 10;
string emailaddress = "contact@marketingplatform.com";
string mobileNumber = "72444444";
string mobilePrefix = "45";
int profileid = 51;
string result = parser.IsProfileOnList(listid, emailaddress, mobileNumber, mobilePrefix, profileid);
{
"status": true,
"code": 200,
"profileid":51
}
{
"status":false,
"code":200,
"message":"Subscriber is not on the list"
}
Checks whether an email address is an 'unsubscriber'.
GET
/Profiles/IsUnsubscriberEmail/
Integer
listid
String
email_address
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/IsUnsubscriberEmail?listid=10&email_address=contact@marketingplatform.com'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 10;
$emailaddress = "contact@marketingplatform.com";
$result = $parser->IsUnsubscriberEmail($listid, $emailaddress);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 10;
string emailaddress = "contact@marketingplatform.com";
string result = parser.IsUnsubscriberEmail(listid, emailaddress);
{
"status": true,
"code": 202,
"profileid":466
}
{
"status":false,
"code":202,
"message":"This user is not owner of the list"
}
Checks whether an email address is an 'unsubscriber'.
GET
/Profiles/IsUnsubscriberMobile/
Integer
listid
String
mobile_number
String
mobile_prefix
Integer
profileid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/IsUnsubscriberMobile?listid=10&mobile_number=72444444&mobile_prefix=45'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 10;
$mobileNumber = "72444444";
$mobilePrefix = "45";
$result = $parser->IsUnsubscriberEmail($listid, $mobileNumber, $mobilePrefix);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 10;
string mobileNumber = "72444444";
string mobilePrefix = "45";
string result = parser.IsUnsubscriberMobile(listid, mobileNumber, mobilePrefix);
{
"status": true,
"code": 202,
"profileid":1182
}
{
"status":false,
"code":202,
"message":"This user is not owner of the list"
}
Unsubscribes an Email Address from a specific List.
POST
/Profiles/UnsubscribeProfileEmail/
Integer
listid
String
email_address
Integer
profileid
Integer
statid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Profiles/UnsubscribeProfileEmail'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'-d'{"listid":10,"email_address":"contact@marketingplatform.com","profileid":26,"statid":3}'
{
"listid": 10,
"email_address": "contact@marketingplatform.com",
"profileid": 26,
"statid": 3
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 10;
$emailaddress = "contact@marketingplatform.com";
$profileid = 26;
$statid = 3;
$result = $parser->UnsubscribeProfileEmail($listid, $emailaddress, $profileid, $statid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 10;
string emailaddress = "contact@marketingplatform.com";
int profileid = 26;
int statid = 3;
string result = parser.UnsubscribeProfileEmail(listid, emailaddress, profileid, statid);
{
"status": true,
"code": 200,
"message":"The profile has been successfully unsubscribed"
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list"
}
Unsubscribes a mobile from a specific List.
POST
/Profiles/UnsubscribeProfileMobile/
Integer
listid
String
mobile_number
String
mobile_prefix
Integer
profileid
Integer
statid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Profiles/UnsubscribeProfileMobile'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'-d'{"listid":10,"mobile_number":"72444444","mobile_prefix":"45","profileid":26,"statid":3}'
{
"listid": 10,
"mobile_number": "72444444",
"mobile_prefix": "45",
"profileid": 26,
"statid": 3
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 10;
$mobileNumber = "72444444";
$mobilePrefix = "45";
$profileid = 26;
$statid = 3;
$result = $parser->UnsubscribeProfileMobile($listid, $mobileNumber, $mobilePrefix, $profileid, $statid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 10;
string mobileNumber = "72444444";
string mobilePrefix = "45";
int profileid = 26;
int statid = 3;
string result = parser.UnsubscribeProfileMobile(listid, mobileNumber, mobilePrefix, profileid, statid);
{
"status": true,
"code": 200,
"message":"The profile has been successfully unsubscribed"
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list"
}
Get all profiles.
GET
/Profiles
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles?count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetAllProfiles($countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetAllProfiles(countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":2,
"listid":2,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1542796778,
"confirm_date":1542796778,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
},
{
"profileid":5,
"listid":3,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1542987065,
"confirm_date":1542987065,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Connector - FTP OTM data"
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get all profiles.
GET
/Profiles/GetAllProfiles/
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetAllProfiles?count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetAllProfiles($countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetAllProfiles(countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":2,
"listid":2,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1542796778,
"confirm_date":1542796778,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
},
{
"profileid":5,
"listid":3,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1542987065,
"confirm_date":1542987065,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Connector - FTP OTM data"
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get only active profiles.
GET
/Profiles/GetActiveProfiles/
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetActiveProfiles?count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetActiveProfiles($countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
bool countOnly = false;
int limit = 2;
int offset = 0
string result = parser.GetActiveProfiles(countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":2,
"listid":2,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1542796778,
"confirm_date":1542796778,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "API - test_api_key"
},
{
"profileid":10,
"listid":4,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1544429993,
"confirm_date":1544429993,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get a list of profiles for the specific list.
GET
/Profiles/GetProfilesByList/
Integer
listid
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesByList?listid=24&count_only=false&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 24;
$countOnly = false;
$limit = 1;
$offset = 0;
$result = $parser->GetProfilesByList($listid, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 24;
bool countOnly = false;
int limit = 1;
int offset = 0;
string result = parser.GetProfilesByList(listid, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid": 68268,
"listid": 24,
"email_address": "support@marketingplatform.com",
"mobile": "78546072",
"mobile_prefix": "45",
"subscribe_date": 1617282743,
"confirm_date": 1617283743,
"unsubscribed": 0,
"sms_unsubscribed":0
"disabled": 0,
"bounced": 0,
"rating": 1,
"leadscore": 0,
"sign_up_source" "Connector"
}
]
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list."
}
Get a list of profiles based on a link click.
GET
/Profiles/GetProfilesByLinkClick/
Integer
linkid
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesByLinkClick?linkid=24&count_only=false&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$linkid = 24;
$countOnly = false;
$limit = 1;
$offset = 0;
$result = $parser->GetProfilesByLinkClick($linkid, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int linkid = 24;
bool countOnly = false;
int limit = 1;
int offset = 0;
string result = parser.GetProfilesByLinkClick(linkid, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":1097,
"listid":24,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":null,
"subscribe_date": 1617272743,
"confirm_date": 1617283543,
"unsubscribed": 0,
"sms_unsubscribed":0
"disabled": 0,
"bounced": 0,
"rating": 1,
"leadscore": 0,
"sign_up_source" "Manual"
}
]
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list."
}
Get a list of profiles from autoresponder.
GET
/Profiles/GetProfilesByAutoresponder/
Integer
autoresponderid
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesByAutoresponder?autoresponderid=24&count_only=false&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$autoresponderid = 24;
$countOnly = false;
$limit = 1;
$offset = 0;
$result = $parser->GetProfilesByAutoresponder($autoresponderid, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int autoresponderid = 24;
bool countOnly = false;
int limit = 1;
int offset = 0;
string result = parser.GetProfilesByAutoresponder(autoresponderid, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":1096,
"listid":24,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1575032494,
"confirm_date":0,
"unsubscribed":0,
"sms_unsubscribed":0
"disabled": 0,
"bounced": 0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
}
]
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list."
}
Get a list of profiles who are receiving a newsletter.
GET
/Profiles/GetProfilesByNewsletter/
Integer
newsletterid
String
type
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesByNewsletter?newsletterid=24&type=open&count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 24;
$type = "open"; // Availbale options: "sent", "open", "notopen"
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesByNewsletter($newsletterid, $type, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 24;
string type = "open"; // Availbale options: "sent", "open", "notopen"
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesByNewsletter(newsletterid, type, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":52,
"listid":7,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1552312263,
"confirm_date":1552312263,
"unsubscribed":0,
"sms_unsubscribed":0
"disabled": 0,
"bounced": 0,
"rating":1,
"leadscore":0,
"sign_up_source" "Import"
},
{
"profileid":51,
"listid":2,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1552312263,
"confirm_date":1552312263,
"unsubscribed":0,
"sms_unsubscribed":0
"disabled": 0,
"bounced": 0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
}
]
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list."
}
Get a list of profiles from the segment.
GET
/Profiles/GetProfilesFromSegment/
Integer
segmentid
Boolean
count_only
Integer
limit
Integer
offset
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesFromSegment?segmentid=24&count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$segmentid = 24;
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesFromSegment($segmentid, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int segmentid = 24;
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesFromSegment(segmentid, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":52,
"listid":7,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1552312263,
"confirm_date":1552312263,
"unsubscribed":0,
"sms_unsubscribed":0
"disabled": 0,
"bounced": 0,
"rating":1,
"leadscore":0,
"sign_up_source" "Flow"
},
{
"profileid":51,
"listid":2,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1552312263,
"confirm_date":1552312263,
"unsubscribed":0,
"sms_unsubscribed":0
"disabled": 0,
"bounced": 0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
}
]
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list."
}
Get a list of profiles based on their email address.
GET
/Profiles/GetProfilesByEmail/
String
email_address
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesByEmail?email_address=contact@marketingplatform.com&count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$emailaddress = "contact@marketingplatform.com";
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesByEmail($emailaddress, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string emailaddress = "contact@marketingplatform.com";
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesByEmail(emailaddress, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":2,
"listid":2,
"email_address":"contact@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1542796778,
"confirm_date":1542796778,
"unsubscribed":0,
"sms_unsubscribed":0
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Import"
},
{
"profileid":10,
"listid":4,
"email_address":"contact@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1544429993,
"confirm_date":1544429993,
"unsubscribed":0,
"sms_unsubscribed":0
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Flow"
}
]
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get a list of profiles based on their mobile number.
GET
/Profiles/GetProfilesByMobile/
String
mobile_number
String
mobile_prefix
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesByMobile?mobile_number=72444444&mobile_prefix=45&count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$mobileNumber = "72444444";
$mobilePrefix = "45"
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesByMobile($mobileNumber, $mobilePrefix, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = "API_USERNAME";
string token = "API_TOKEN";
ApiParser parser = new ApiParser(username, token);
string mobileNumber = "72444444";
string mobilePrefix = "45";
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesByMobile(mobileNumber, mobilePrefix, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":10,
"listid":4,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1544429993,
"confirm_date":1544429993,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Zapier"
},
{
"profileid":1065,
"listid":11,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1565686709,
"confirm_date":1565686709,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Import"
}
]
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get a list of profiles based on their domain.
GET
/Profiles/GetProfilesByDomain/
String
domain
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesByDomain?domain=@marketingplatform.com&count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$domain = "@marketingplatform.com";
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesByDomain($domain, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string domain = "@marketingplatform.com";
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesByDomain(domain, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":2,
"listid":2,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1542796778,
"confirm_date":1542796778,
"unsubscribed":0,
"sms_unsubscribed":0
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Facebook Lead Ads"
},
{
"profileid":10,
"listid":4,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1544429993,
"confirm_date":1544429993,
"unsubscribed":0,
"sms_unsubscribed":0
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
}
]
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get only unsubscribed profiles.
GET
/Profiles/GetUnsubscribedProfiles/
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetUnsubscribedProfiles?count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetUnsubscribedProfiles($countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetUnsubscribedProfiles(countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":41,
"listid":5,
"email_address":"support@marketingplatform.com",
"mobile":"7244444",
"mobile_prefix":"45",
"subscribe_date":0,
"confirm_date":1571319782,
"unsubscribed":1571658612,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Import"
},
{
"profileid":58,
"listid":9,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1559636468,
"confirm_date":1559636468,
"unsubscribed":1562330373,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Import"
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get only unconfirmed profiles.
GET
/Profiles/GetUnconfirmedProfiles/
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetUnconfirmedProfiles?count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetUnconfirmedProfiles($countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetUnconfirmedProfiles(countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":36,
"listid":6,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1615456426,
"confirm_date":0,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Import"
},
{
"profileid":37,
"listid":5,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":1615456426,
"confirm_date":0,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Not defined"
}
]
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get only disabled profiles.
GET
/Profiles/GetDisabledProfiles/
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetDisabledProfiles?count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetDisabledProfiles($countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetDisabledProfiles(countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":7,
"listid":3,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1542987158,
"confirm_date":1542987158,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":1576660161,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Import"
},
{
"profileid":46,
"listid":3,
"email_address":"contact@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":0,
"confirm_date":0,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":1576660173,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
}
]
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get only bounced profiles.
GET
/Profiles/GetBouncedProfiles/
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetBouncedProfiles?count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetBouncedProfiles($countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetBouncedProfiles(countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":37,
"listid":5,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":0,
"confirm_date":0,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":1552722654,
"rating":1,
"leadscore":0,
"sign_up_source" "Connector"
},
{
"profileid":56,
"listid":5,
"email_address":"contact@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1559118807,
"confirm_date":1576660202,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":1576660202,
"rating":1,
"leadscore":0,
"sign_up_source" "Connector"
}
]
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get a list of profiles based on their sms status.
GET
/Profiles/GetProfilesBySMSStatus/
Boolean
active
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesBySMSStatus?active=true&count_only=false&limit=2&offset=2' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$active = true;
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesBySMSStatus($active, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
bool active = true;
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesBySMSStatus(active, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":41,
"listid":5,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"44",
"subscribe_date":0,
"confirm_date":1571319782,
"unsubscribed":1571658612,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
},
{
"profileid":42,
"listid":3,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"subscribe_date":0,
"confirm_date":0,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
}
]
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get a list of profiles based on mail rating.
GET
/Profiles/GetProfilesByRating/
String
rating
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesByRating?rating=vip&count_only=false&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$rating = "vip"; // Available ratings: "poor", "average", "good", "vip"
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesByRating($rating, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string rating = "vip"; // Available ratings: "poor", "average", "good", "vip"
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesByRating(rating, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":2,
"listid":2,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1542796778,
"confirm_date":1542796778,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":14,
"leadscore":0,
"sign_up_source" "Import"
},
{
"profileid":5,
"listid":3,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1542987065,
"confirm_date":1542987065,
"unsubscribed":0,
"sms_unsubscribed":0,
"disabled":0,
"bounced":0,
"rating":14,
"leadscore":0,
"sign_up_source" "Import"
}
]
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get a list of profiles by date.
GET
/Profiles/GetProfilesByDate/
Timestamp
start_date
Timestamp
end_date
String
type
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesByDate?start_date=1592929276&end_date=false&type=after&count_only=false&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$startDate = 1592929276;
$endDate = false;
$type = "after"; /* Available options: "after","before","exactly",
"between","not" */
$countOnly = false;
$limit = 1;
$offset = 0;
$result = $parser->GetProfilesByDate($startDate, $endDate, $type, $countOnly, $limit, $offset);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$startDate = 1592929276;
$endDate = 1593015676;
$type = "between"; /* Available options: "after","before","exactly",
"between","not" */
$countOnly = true;
$result = $parser->GetProfilesByDate($startDate, $endDate, $type, $countOnly);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
long startDate = 1592929276;
bool endDate = false;
string type = "after"; /* Available options: "after","before","exactly","between","not" */
bool countOnly = false;
int limit = 1;
int offset = 0;
string result = parser.GetProfilesByDate(startDate, endDate, type, countOnly, limit, offset);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
long startDate = 1592929276;
long endDate = 1593015676;
string type = "after"; /* Available options: "after","before","exactly","between","not" */
bool countOnly = false;
int limit = 1;
int offset = 0;
string result = parser.GetProfilesByDate(startDate, endDate, type, countOnly, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":462,
"listid":209,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"subscribe_date":1592912033,
"confirm_date":0,
"unsubscribed":0,
"sms_unsubscribed":0,
"bounced":0,
"disabled":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Connector - FTP OTM data"
}
]
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get a List of Profiles information based on their data field.
GET
/Profiles/GetProfilesByDataField/
Integer
listid
Integer
fieldid
String
field_value
Boolean
active_only
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesByDataField?listid=55&fieldid=8&field_value=Vejen&active_only=true&count_only=false&limit=10&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 55;
$fieldid = 8; // Field ID for City.
$fieldValue = "Vejen"; // City name.
$activeOnly = true;
$countOnly = false;
$limit = 1;
$offset = 0;
$result = $parser->GetProfilesByDataField($listid, $fieldid, $fieldValue, $activeOnly, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 55;
int fieldid = 8; // Field ID for City.
string fieldValue = "Vejen"; // City name.
bool activeOnly = true;
bool countOnly = false;
int limit = 1;
int offset = 0;
string result = parser.GetProfilesByDataField(listid, fieldid, fieldValue);
{
"status": true,
"code": 200,
"data": [
{
"profileid":459,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"format":"h",
"subscribe_date":1574083171,
"confirmed":1,
"unsubscribed":0,
"bounced":0,
"disabled":0,
"rating":1,
"listid":216,
"sms_unsubscribed":0,
"leadscore":0,
"sign_up_source" "Connector - Flat data"
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get profile events for sent newsletters.
GET
/Profiles/GetProfileSentNewsletterEvents/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileSentNewsletterEvents?profileid=52&limit=2&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 52;
$limit = 2;
$offset = 0;
$result = $parser->GetProfileSentNewsletterEvents($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 52;
int limit = 2;
int offset = 0;
string result = parser.GetProfileSentNewsletterEvents(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"eventid":14,
"profileid":52,
"event_type":"Sent an Email Campaign",
"event_subject":"Sent the Email Campaign \"Campaign 1\"",
"event_date":1568283901,
"last_update":1552398901,
"event_notes":""
},
{
"eventid":13,
"profileid":52,
"event_type":"Sent an Email Campaign",
"event_subject":"Sent the Email Campaign \"Campaign 1\"",
"event_date":1552384761,
"last_update":1552384761,
"event_notes":""
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get profile events for opened newsletters.
GET
/Profiles/GetProfileOpenNewsletterEvents/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileOpenNewsletterEvents?profileid=50&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 50;
$limit = 2;
$offset = 0;
$result = $parser->GetProfileOpenNewsletterEvents($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 50;
int limit = 2;
int offset = 0;
string result = parser.GetProfileOpenNewsletterEvents(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":50,
"event_type":"Opened an Email Campaign",
"newsletterid":2,
"event_date":1552398901,
"statid":12
},
{
"profileid":50,
"event_type":"Opened an Email Campaign",
"newsletterid":5,
"event_date":1552399201,
"statid":16
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get profile events for clicked newsletters.
GET
/Profiles/GetProfileClickNewsletterEvents/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileClickNewsletterEvents?profileid=1097&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$limit = 2;
$offset = 0;
$result = $parser->GetProfileClickNewsletterEvents($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1097;
int limit = 2;
int offset = 0;
string result = parser.GetProfileClickNewsletterEvents(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":1097,
"event_type":"Clicked a Link in an Email",
"newsletterid":2,
"event_date":1575477276,
"statid":12
},
{
"profileid":1097,
"event_type":"Clicked a Link in an Email",
"newsletterid":5,
"event_date":1575477334,
"statid":16
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get profile events for sent triggers.
GET
/Profiles/GetProfileSentTriggerEvents/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileSentTriggerEvents?profileid=244&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 244;
$limit = 2;
$offset = 0;
$result = $parser->GetProfileSentTriggerEvents($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 244;
int limit = 2;
int offset = 0;
string result = parser.GetProfileSentTriggerEvents(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"eventid":4179987,
"profileid":244,
"event_type":"Sent an Email Campaign",
"event_subject":"Sent the Email Campaign \"Test OTM\"",
"event_date":1542883467,
"last_update":1542883467,
"event_notes":"Sent from the trigger \"Test OTM \""
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get profile events for opened triggers.
GET
/Profiles/GetProfileOpenTriggerEvents/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileOpenTriggerEvents?profileid=50&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 50;
$limit = 2;
$offset = 0;
$result = $parser->GetProfileOpenTriggerEvents($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 50;
int limit = 2;
int offset = 0;
string result = parser.GetProfileOpenTriggerEvents(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":50,
"event_type":"Opened an Email Campaign",
"newsletterid":2,
"event_date":1552398901,
"statid":9
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get profile events for clicked triggers.
GET
/Profiles/GetProfileClickTriggerEvents/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileClickTriggerEvents?profileid=1097&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$limit = 1;
$offset = 0;
$result = $parser->GetProfileClickTriggerEvents($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1097;
int limit = 1;
int offset = 0;
string result = parser.GetProfileClickTriggerEvents(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":1097,
"eventtype":"Clicked a Link in an Email",
"newsletterid":2,
"eventdate":1575477276,
"statid":9
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get profile events for sent autoresponders.
GET
/Profiles/GetProfilesentAutoresponderEvents/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileSentAutoresponderEvents?profileid=244&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 244;
$limit = 1;
$offset = 0;
$result = $parser->GetProfileSentAutoresponderEvents($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 244;
int limit = 1;
int offset = 0;
string result = parser.GetProfileSentAutoresponderEvents(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"eventid":4179903,
"profileid":244,
"event_type":"Sent an Autoresponder",
"event_subject":"Sent the Autoresponder \"birthday 15 nov\"",
"event_date":1542283444,
"last_update":1542283444,
"event_notes":""
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get profile events for opened autoresponders.
GET
/Profiles/GetProfileOpenAutoresponderEvents/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileOpenAutoresponderEvents?profileid=50&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 50;
$limit = 1;
$offset = 0;
$result = $parser->GetProfileOpenAutoresponderEvents($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 50;
int limit = 1;
int offset = 0;
string result = parser.GetProfileOpenAutoresponderEvents(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":50,
"event_type":"Opened an Email Campaign",
"event_date":1552398901,
"autoresponderid":1,
"statid":14
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get profile events for clicked autoresponders.
GET
/Profiles/GetProfileClickAutoresponderEvents/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileClickAutoresponderEvents?profileid=1097&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 1097;
$limit = 1;
$offset = 0;
$result = $parser->GetProfileClickAutoresponderEvents($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 1097;
int limit = 1;
int offset = 0;
string result = parser.GetProfileClickAutoresponderEvents(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":1097,
"event_type":"Clicked a Link in an Email",
"autoresponderid":1,
"event_date":1575477276,
"statid":14
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}>
Get profile tracking events.
GET
/Profiles/GetProfileTrackingEvents/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileTrackingEvents?profileid=46558244&limit=3&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 46558244;
$limit = 3;
$offset = 0;
$result = $parser->GetProfileTrackingEvents($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 46558244;
int limit = 3;
int offset = 0;
string result = parser.GetProfileTrackingEvents(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":46558244,
"action":"timespend",
"request_url":"http:\/\/domain.com\/wordpress\/product\/baby-dresses\/",
"product_url":"",
"time":1565178417
},
{
"profileid":46558244,
"action":"pageview",
"request_url":"http:\/\/domain.com\/wordpress\/product\/baby-dresses\/",
"product_url":"",
"time":1565178416
},
{
"profileid":46558244,
"action":"pageview",
"request_url":"http:\/\/domain.com\/wordpress\/product\/baby-dresses\/",
"product_url":"",
"time":1565178416
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}>
Get a List of Profiles updated data field.
GET
/Profiles/GetProfilesUpdatedDF/
Integer
listid
Timestamp
date
Integer
limit
Integer
offset
String
type
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesUpdatedDF?listid=10&date=1565281276&limit=2&offset=0&type=on' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 10;
$date = 1565281276;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesUpdatedDF($listid, $date, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 10;
long date = 1565281276;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesUpdatedDF(listid, date, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":70,
"listid":10,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"confirmed":1,
"unsubscribed":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Not defined"
},
{
"profileid":78,
"listid":10,
"email_address":"contact@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"confirmed":1,
"unsubscribed":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Manual"
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}>
Get a list of unsubscribed profiles.
GET
/Profiles/GetProfilesUnsubscribed/
Integer
listid
Timestamp
date
Integer
limit
Integer
offset
String
type
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesUnsubscribed?listid=11&date=1565281276&limit=2&offset=0&type=after' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 11;
$date = 1565281276;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesUnsubscribed($listid, $date, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 10;
long date = 1565281276;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesUnsubscribed(listid, date, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":1066,
"listid":11,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"confirmed":0,
"unsubscribed":1559636468,
"rating":1,
"leadscore":0,
"sign_up_source" "Import"
},
{
"profileid":1068,
"listid":11,
"email_address":"contact@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"confirmed":0,
"unsubscribed":1559636468,
"rating":1,
"leadscore":0,
"sign_up_source" "Import"
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get a list of confirmed profiles.
GET
/Profiles/GetProfilesConfirmed/
Integer
listid
Timestamp
date
Integer
limit
Integer
offset
String
type
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesConfirmed?listid=11&date=1565281276&limit=2&offset=0&type=before' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 11;
$date = 1565281276;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesConfirmed($listid, $date, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 11;
long date = 1565281276;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesConfirmed(listid, date, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":1065,
"listid":11,
"email_address":"support@marketingplatform.com",
"mobile":"72444444",
"mobile_prefix":"45",
"confirmed":1559636468,
"unsubscribed":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Connector"
},
{
"profileid":1071,
"listid":11,
"email_address":"contact@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"confirmed":1559636468,
"unsubscribed":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Connector"
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get a list of disabled profiles.
GET
/Profiles/GetProfilesDisabled/
Integer
listid
Timestamp
date
Integer
limit
Integer
offset
String
type
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesDisabled?listid=3&date=1565281276&limit=2&offset=0&type=on' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 3;
$date = 1565281276;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesDisabled($listid, $date, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string listid = 3;
long date = 1565281276;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesDisabled(listid, date, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":46,
"listid":3,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"confirmed":0,
"unsubscribed":0,
"rating":1,
"leadscore":0,
"sign_up_source" "API"
},
{
"profileid":7,
"listid":3,
"email_address":"contact@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"confirmed":1,
"unsubscribed":0,
"rating":1,
"leadscore":0,
"sign_up_source" "API"
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get a list of sms unsubscribed profiles.
GET
/Profiles/GetProfilesSMSUnsubscribed/
Integer
listid
Timestamp
date
Integer
limit
Integer
offset
String
type
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfilesSMSUnsubscribed?listid=11&date=1565281276&limit=2&offset=0&type=on' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 11;
$date = 1565281276;
$limit = 2;
$offset = 0;
$result = $parser->GetProfilesSMSUnsubscribed($listid, $date, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 11;
logn date = 1565281276;
int limit = 2;
int offset = 0;
string result = parser.GetProfilesSMSUnsubscribed(listid, date, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":1085,
"listid":11,
"email_address":"support@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"confirmed":0,
"unsubscribed":0,
"sms_unsubscribed": "1711958686",
"rating":1,
"leadscore":0,
"sign_up_source" "API"
},
{
"profileid":1099,
"listid":11,
"email_address":"contact@marketingplatform.com",
"mobile":"",
"mobile_prefix":"",
"sms_unsubscribed": "1711958686",
"confirmed":0,
"unsubscribed":0,
"rating":1,
"leadscore":0,
"sign_up_source" "Zapier"
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Gets all list IDs for a particular email address and returns an array of them.
GET
/Profiles/GetAllListsForEmailAddress/
String
email_address
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetAllListsForEmailAddress?email_address=contact@marketingplatform.com' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$emailaddress = "contact@marketingplatform.com";
$result = $parser->GetAllListsForEmailAddress($emailaddress);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string emailaddress = "contact@marketingplatform.com";
string result = parser.GetAllListsForEmailAddress(emailaddress);
{
"status": true,
"code": 200,
"data": [
{
"listid":2,
"profileid":2
},
{
"listid":4,
"profileid":10
},
{
"listid":7,
"profileid":52
},
{
"listid":11,
"profileid":1065
},
{
"listid":24,
"profileid":1096
},
{
"listid":27,
"profileid":1100
}
]
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list"
}
Gets all list IDs for a particular mobile number and returns an array of them.
GET
/Profiles/GetAllListsForMobileNumber/
String
mobile_number
String
mobile_prefix
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetAllListsForMobileNumber?mobile_number=72444444&mobile_prefix=45' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$mobileNumber = "72444444";
$mobilePrefix = "45";
$result = $parser->GetAllListsForMobileNumber($mobileNumber, $mobilePrefix);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string mobileNumber = "72444444";
string mobilePrefix = "45";
string result = parser.GetAllListsForMobileNumber(mobileNumber, mobilePrefix);
{
"status": true,
"code": 200,
"data": [
{
"listid":2,
"profileid":2
},
{
"listid":4,
"profileid":10
},
{
"listid":7,
"profileid":52
},
{
"listid":11,
"profileid":1065
},
{
"listid":24,
"profileid":1096
},
{
"listid":27,
"profileid":1100
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get lead score for profile.
GET
/LeadScore/
Integer
profileid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/LeadScore?profileid=62'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 62;
$result = $parser->GetLeadScore($profileid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 62;
string result = parser.GetLeadScore(profileid);
{
"status": true,
"code": 200,
"leadScore": 34
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list"
}
Set lead score for a profile.
PUT
/LeadScore/
Integer
profileid
Integer
lead_score
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/LeadScore'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'-d'{"profileid":62,"lead_score":34}'
{
"profileid": 62,
"lead_score": 34
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 62;
$leadScore = 34;
$result = $parser->SetLeadScore($profileid, $leadScore);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 62;
int leadScore = 34;
string result = parser.SetLeadScore(profileid, leadScore);
{
"status": true,
"code": 201,
"message":"Leadscore has been successfully updated."
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list"
}
Add or reduce lead score for a profile.
POST
/LeadScore/
Integer
profileid
Integer
lead_score
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/LeadScore'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'-d'{"profileid":62,"leadscore":10}'
{
"profileid": 62,
"lead_score": 10
}
{
"profileid": 62,
"lead_score": -5
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 62;
$leadScore = 10;
$result = $parser->UpdateLeadScore($profileid, $leadScore);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 62;
int leadScore = 10;
string result = parser.UpdateLeadScore(profileid, leadScore);
{
"status": true,
"code": 201,
"message":"Leadscore has been successfully updated."
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list"
}
Get bounces for a profile.
GET
/Profiles/GetProfileBounces/
Integer
profileid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Profiles/GetProfileBounces?profileid=62&limit=10&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 62;
$limit = 10;
$offset = 0;
$result = $parser->GetProfileBounces($profileid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 62;
int limit = 10;
int offset = 0;
string result = parser.GetProfileBounces(profileid, limit, offset);
{
"status": true,
"code": 200,
"data": [
{
"profileid":62,
"bounce_time":1552722654,
"bounce_type":"hard",
"bounce_rule":10,
"listid":5,
"statid":0
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Fetches the details of a newsletter statistics entry.
GET
/Stats/FetchStatsNewsletter/
Integer
statid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/FetchStatsNewsletter?statid=2'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$statid = 2;
$result = $parser->FetchStatsNewsletter($statid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int statid = 2;
string result = parser.FetchStatsNewsletter(statid);
{
"status":true,
"code":200,
"data":{
"newsletterid": 1,
"statid": 2,
"start_time": 1623051123,
"finish_time": 1623052145,
"send_size": 1636,
"unsubscribe_count": 1,
"bouncecount_soft": 24,
"bouncecount_hard": 9,
"bouncecount_unknown": 0,
"link_clicks": 36,
"email_opens": 703,
"email_forwards": 0,
"email_opens_unique": 685,
"send_type": "newsletter"
}
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Fetches the details of a an autoresponder statistics entry.
GET
/Stats/FetchStatsAutoresponder/
Integer
statid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/FetchStatsAutoresponder?statid=2'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$statid = 2;
$result = $parser->FetchStatsAutoresponder($statid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int statid = 2;
string result = parser.FetchStatsAutoresponder(statid);
{
"status":true,
"code":200,
"data":{
"autoresponderid": 0,
"statid": 627979,
"unsubscribe_count": 0,
"html_recipients": 20,
"bouncecount_soft": 1,
"bouncecount_hard": 3,
"bouncecount_unknown": 0,
"link_clicks": 12,
"email_opens": 8,
"email_forwards": 0,
"email_opens_unique": 6
}
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Fetches the details of a sms campaign statistics entry.
GET
/Stats/FetchStatsSMS/
Integer
statid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/FetchStatsSMS?statid=2'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$statid = 2;
$result = $parser->FetchStatsSMS($statid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int statid = 2;
string result = parser.FetchStatsSMS(statid);
{
"status":true,
"code":200,
"data":{
"statid": 89,
"start_time": 1552381483,
"finish_time": 1552381696,
"sms_campaignid": 2,
"text_recipients": 10,
"num_messages": 1,
"send_size": 11,
"unsubscribe_count": 0
}
}
{
"status": false,
"code": 403,
"message": "This user is not owner of the SMS campaign."
}
Get all stats IDs by list
GET
/Stats/GetStatidsByList/
Integer
listid
Timestamp
from_date
Timestamp
to_date
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetStatidsByList?listid=62&from_date=1578839990&to_date=1579531190&limit=4&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 62;
$fromDate = 1578839990;
$toDate = 1579531190;
$limit = 4;
$offset = 0;
$result = $parser->GetStatidsByList($listid, $fromDate, $toDate, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 62;
long fromDate = 1578839990;
long toDate = 1579531190;
int limit = 4;
int offset = 0;
string result = parser.GetStatidsByList(listid, fromDate, toDate, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"statid":6,
"campaignid":2,
"campaign_name":"Campaign 1",
"type":"newsletter"
},
{
"statid":7,
"campaignid":2,
"campaign_name":"Campaign 1",
"type":"newsletter"
},
{
"statid":8,
"campaignid":2,
"campaign_name":"Campaign 1",
"type":"newsletter"
},
{
"statid":9,
"campaignid":2,
"campaign_name":"Campaign 1",
"type":"newsletter"
}
]
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get all stat IDs for the specific segment.
GET
/Stats/GetStatidsBySegment/
Integer
segmentid
Timestamp
from_date
Timestamp
to_date
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetStatidsBySegment?segmentid=1&from_date=1578839990&to_date=1579531190&limit=10&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$segmentid = 1;
$fromDate = 1578839990;
$toDate = 1579531190;
$limit = 10;
$offset = 0;
$result = $parser->GetStatidsBySegment($segmentid, $fromDate, $toDate, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int segmentid = 1;
long fromDate = 1578839990;
long toDate = 1579531190;
int limit = 10;
int offset = 0;
string result = parser.GetStatidsBySegment(segmentid, fromDate, toDate, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"statid":13,
"newsletter_name":"Campaign 13"
},
{
"statid":14,
"newsletter_name":"Campaign 14"
}
]
}
{
"status": false,
"code": 401,
"message": "This user is not owner of the Segment."
}
Get all stat IDs for a newsletter.
GET
/Stats/GetStatidsByNewsletter/
Integer
newsletterid
Timestamp
from_date
Timestamp
to_date
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetStatidsByNewsletter?newsletterid=1&from_date=1578839990&to_date=1579531190&limit=4&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 1;
$fromDate = 1578839990;
$toDate = 1579531190;
$limit = 4;
$offset = 0;
$result = $parser->GetStatidsByNewsletter($newsletterid, $fromDate, $toDate, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 1;
long fromDate = 1578839990;
long toDate = 1579531190;
int limit = 4;
int offset = 0;
string result = parser.GetStatidsByNewsletter(newsletterid, fromDate, $toDate, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"statid":6,
"newsletter_name":"Campaign 1"
},
{
"statid":7,
"newsletter_name":"Campaign 1"
},
{
"statid":8,
"newsletter_name":"Campaign 1"
},
{
"statid":9,
"newsletter_name":"Campaign 1"
}
]
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Get all stat IDs for an autoresopnder.
GET
/Stats/GetStatidsByAutoresponder/
Integer
autoresponderid
Timestamp
from_date
Timestamp
to_date
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetStatidsByAutoresponder?autoresponderid=1&from_date=1578839990&to_date=1579531190&limit=4&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$autoresponderid = 1;
$fromDate = 1578839990;
$toDate = 1579531190;
$limit = 4;
$offset = 0;
$result = $parser->GetStatidsByAutoresponder($autoresponderid, $fromDate, $toDate, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 1;
long fromDate = 1578839990;
long toDate = 1579531190;
int limit = 4;
int offset = 0;
string result = parser.GetStatidsByAutoresponder(autoresponderid, fromDate, $toDate, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"statid": 5,
"autoresponder_name": "Test API v2"
}
]
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Fetches a List of Bounced Emails.
GET
/Stats/GetBouncesByList/
Integer
listid
Boolean
count_only
String
bounce_type
String
search_type
Timestamp
search_start_date
Timestamp
search_end_date
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetBouncesByList?listid=12&count_only=false&bounce_type=hard&search_type=after&search_start_date=1578839990&search_end_date=1579531190&limit=10&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 12;
$countOnly = false;
$bounceType = "any";
$searchType = "between";
$searchStartDate = 1578839990;
$searchEndDate = 1579531190;
$limit = 10;
$offset = 0;
$result = $parser->GetBouncesByList($listid, $countOnly, $bounceType, $searchType, $searchStartDate, $searchEndDate, $limit, $offset);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 12;
$countOnly = false;
$bounceType = "hard";
$searchType = "after";
$searchStartDate = 1578839990;
$searchEndDate = 0;
$limit = 10;
$offset = 0;
$result = $parser->GetBouncesByList($listid, $countOnly, $bounceType, $searchType, $searchStartDate, $searchEndDate, $limit, $offset);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 12;
$countOnly = true;
$bounceType = "soft";
$searchType = "exactly";
$searchStartDate = 1578839990;
$searchEndDate= 0;
$limit = 10;
$offset = 0;
$result = $parser->GetBouncesByList($listid, $countOnly, $bounceType, $searchType, $searchStartDate, $searchEndDate, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 12;
bool countOnly = false;
string bounceType = "any";
string searchType = "between";
string searchStartDate = 1578839990;
string searchEndDate = 1579531190;
int limit = 10;
int offset = 0;
string result = parser.GetBouncesByList(listid, countOnly, bounceType, searchType, searchStartDate, searchEndDate, limit, offset);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 12;
bool countOnly = false;
string bounceType = "hard";
string searchType = "after";
string searchStartDate = 1578839990;
string searchEndDate= 0;
int limit = 10;
int offset = 0;
string result = parser.GetBouncesByList(listid, countOnly, bounceType, searchType, searchStartDate, searchEndDate, limit, offset);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 12;
bool countOnly = true;
string bounceType = "soft";
string searchType = "exactly";
string searchStartDate = 1578839990;
string searchEndDate= 0;
int limit = 10;
int offset = 0;
string result = parser.GetBouncesByList(listid, countOnly, bounceType, searchType, searchStartDate, searchEndDate, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"profileid":37,
"email_address":"support@marketingplatform.com",
"mobile_number":"72444444",
"mobile_prefix":"45",
"bounce_time":1552722654,
"bounce_type":"hard",
"bounce_rule":10,
"statid":0
},
{
"profileid":56,
"email_address":"contact@marketingplatform.com",
"mobile_number":"",
"mobile_prefix":"",
"bounce_time":1576660202,
"bounce_type":"unknown",
"bounce_rule":"unknown",
"statid":0
}
]
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Fetches a list of unsubscribed emails.
GET
/Stats/GetUnsubscribesByList/
Integer
listid
Boolean
count_only
String
search_type
String
search_start_date
String
search_end_date
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetUnsubscribesByList?listid=12&count_only=false&search_type=after&search_start_date=1578618000&search_end_date=20.01.2020&limit=10&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 12;
$countOnly = false;
$searchType = "after";
$searchStartDate = 1578618000;
$searchEndDate = 1579482000;
$limit = 10;
$offset = 0;
$result = $parser->GetUnsubscribesByList($listid, $countOnly, $searchType, $searchStartDate, $searchEndDate, $limit, $offset);
print_r($result);
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 12;
$countOnly = false;
$searchType = "before";
$searchStartDate = 1578618000;
$searchEndDate = 0;
$limit = 10;
$offset = 0;
$result = $parser->GetUnsubscribesByList($listid, $countOnly, $searchType, $searchStartDate, $searchEndDate, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 12;
bool countOnly = false;
string searchType = "between";
string searchStartDate = 1578618000;
string searchEndDate = 1579482000;
int limit = 10;
int offset = 0;
string result = parser.GetUnsubscribesByList(listid, countOnly, searchType, searchStartDate, searchEndDate, limit, offset);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 12;
bool countOnly = false;
string searchType = "before";
string searchStartDate = 1578618000;
string searchEndDate = 0;
int limit = 10;
int offset = 0;
string result = parser.GetUnsubscribesByList(listid, countOnly, searchType, searchStartDate, searchEndDate, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"profileid":41,
"email_address":"support@marketingplatform.com",
"mobile_number":"72444444",
"mobile_prefix":"45",
"unsubscribe_time":1571658612,
"unsubscribe_ip":"127.0.0.1",
"device_type":null,
"device_os":null,
"device_os_version":null
},
{
"profileid":37,
"email_address":"contact@marketingplatform.com",
"mobile_number":"",
"mobile_prefix":"",
"unsubscribe_time":1552722637,
"unsubscribe_ip":"127.0.0.1",
"device_type":"desktop",
"device_os":"Linux",
"device_os_version":"0"
}
]
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Returns contacts who open an email campaign.
GET
/Stats/GetOpens/
Integer
statid
Boolean
count_only
Boolean
unique_only
Timestamp
from_date
Timestamp
to_date
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET
'https://api.mailmailmail.net/v2.0/Stats/GetOpens?statid=12&from_date=1631439780&to_date=1634439780&count_only=false&unique_only=true&limit=10&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$statid = 12;
$dateFrom = 1631439780;
$dateTo = 1634439780;
$countOnly = false;
$onlyUnique = true;
$limit = 10;
$offset = 0;
$result = $parser->GetOpens($statid, $dateFrom, $dateTo, $countOnly, $onlyUnique, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int statid = 12;
int dateFrom = 1631439780;
int dateTo = 1634439780;
bool countOnly = false;
bool onlyUnique = true;
int limit = 10;
int offset = 0;
string result = parser.GetOpens(statid, dateFrom, dateTo, countOnly, onlyUnique, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"profileid":50,
"email_address":"support@marketingplatform.com",
"open_time":1552398901,
"openip":"1.1.1.1",
"open_type":"u",
"device_type":"desktop",
"device_os":"Linux",
"device_version":"0"
},
{
"profileid":50,
"email_address":"support@marketingplatform.com",
"open_time":1552398952,
"openip":"1.1.1.1",
"open_type":"u",
"device_type":"desktop",
"device_os":"Windows",
"device_version":"10"
},
{
"profileid":50,
"email_address":"support@marketingplatform.com",
"open_time":1552399137,
"openip":"1.1.1.1",
"open_type":"u",
"device_type":"phone",
"device_os":"Android",
"device_version":"7"
}
]
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Returns profiles who clicked on a link in email campaign.
GET
/Stats/GetClicks/
Integer
statid
Boolean
count_only
Boolean
unique_only
Timestamp
from_date
Timestamp
to_date
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET
'https://api.mailmailmail.net/v2.0/Stats/GetClicks?statid=12&from_date=1631439780&to_date=1634439780&count_only=false&unique_only=true&limit=10&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$statid = 12;
$dateFrom = 1631439780;
$dateTo = 1634439780;
$countOnly = false;
$onlyUnique = true;
$limit = 10;
$offset = 0;
$result = $parser->GetClicks($statid, $countOnly, $onlyUnique, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int statid = 12;
int dateFrom = 1631439780;
int dateTo = 1634439780;
bool countOnly = false;
bool onlyUnique = true;
int limit = 10;
int offset = 0;
string result = parser.GetClicks(statid, dateFrom, dateTo, countOnly, onlyUnique, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"profileid":50,
"email_address":"test@localhost.dev",
"click_time":1552398901,
"click_ip":"1.1.1.1",
"device_type":"desktop",
"device_os":"Linux",
"device_version":"0"
},
{
"profileid":50,
"email_address":"test@localhost.dev",
"click_time":1552398901,
"click_ip":"1.1.1.1",
"device_type":"desktop",
"device_os":"Windows",
"device_version":"10"
},
{
"profileid":50,
"email_address":"test@localhost.dev",
"click_time":1552398901,
"click_ip":"1.1.1.1",
"device_type":"phone",
"device_os":"Android",
"device_version":"7"
}
]
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get the last statistics for a specific newsletter.
GET
/Stats/GetNewsletterLatestStats/
Integer
newsletterid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetNewsletterLatestStats?newsletterid=2'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 2;
$result = $parser->GetNewsletterLatestStats($newsletterid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 2;
string result = parser.GetNewsletterLatestStats(newsletterid);
{
"status":true,
"code":200,
"data":{
"newsletterid":2,
"send_type":"newsletter",
"start_time":1552384758,
"finish_time":1552398902,
"recipients":4,
"email_opens":3,
"link_clicks":3,
"email_forwards":0,
"bounces":0,
"open_rate":75,
"click_rate":50
}
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Get snapshot links for sent campaign, trigger and autoresponder
GET
/Stats/GetSnapshots/
Integer
profileid
Integer
triggerid
Integer
autoresponderid
Integer
newsletterid
String
group_by
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetSnapshots?profileid=178'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$profileid = 178;
$result = $parser->GetSnapshots($profileid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int profileid = 178;
string result = parser.GetSnapshots(profileid);
{
"status":true,
"code":200,
"data":[
{
"link":"https://app.marketingplatform.com/snapshot.php?M=XX418&U=XX2&N=XX34&S=XX180&token=XX326c656f6e6964&type=XXn&bd=XX1577919600",
"time":1577955739,
"type":"campaign"
}
]
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Calculates the total number of Emails sent, Bounces, Unsubscribes, Opens, Forwards and Link Clicks for a List.
GET
/Stats/GetListSummary/
Integer
listid
Timestamp
from_date
Timestamp
to_date
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetListSummary?listid=7&from_date=1578839990&to_date=1579531190'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$listid = 7;
$fromDate = 1578839990;
$toDate = 1579531190;
$result = $parser->GetListSummary($listid, $fromDate, $toDate);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int listid = 7;
long fromDate = 1578839990;
long toDate = 1579531190;
string result = parser.GetListSummary(listid, fromDate, toDate);
{
"status":true,
"code":200,
"data":{
"email_sent":20,
"email_opens":10,
"email_opens_unique":5,
"link_clicks":12,
"link_clicks_unique":10,
"unsubscribe_count":0,
"email_forwards":0,
"bounces":0,
"open_rate":50,
"click_rate":60
}
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Calculates the total number of Emails sent, Bounces, Unsubscribes, Opens, Forwards and Link Clicks for Newsletter
GET
/Stats/GetNewsletterSummary/
Integer
newsletterid
Timestamp
from_date
Timestamp
to_date
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetNewsletterSummary?newsletterid=12&from_date=1578667190&to_date=1579531190'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 12;
$fromDate = 1578667190;
$toDate = 1579531190;
$result = $parser->GetNewsletterSummary($newsletterid, $fromDate, $toDate);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 12;
long fromDate = 1578667190;
long toDate = 1578839990;
string result = parser.GetNewsletterSummary(newsletterid, fromDate, toDate);
{
"status":true,
"code":200,
"data":{
"email_sent":15,
"email_opens":2,
"email_opens_unique":1,
"link_clicks":1,
"link_clicks_unique":1,
"unsubscribes":1,
"email_forwards":1,
"bounces":1,
"open_rate":6.67,
"click_rate":6.67
}
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Calculates the total number of Emails sent, Bounces, Unsubscribes, Opens, Forwards and Link Clicks for Trigger
GET
/Stats/GetTriggerSummary/
Integer
triggerid
Timestamp
from_date
Timestamp
to_date
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetTriggerSummary?triggerid=12&from_date=1578667190&to_date=1579531190'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$triggerid = 12;
$fromDate = 1578667190;
$toDate = 1579531190;
$result = $parser->GetTriggerSummary($triggerid, $fromDate, $toDate);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int triggerid = 12;
long fromDate = 1578667190;
long toDate = 1578839990;
string result = parser.GetTriggerSummary(triggerid, fromDate, toDate);
{
"status":true,
"code":200,
"data":{
"email_sent":570,
"email_opens":617,
"email_opens_unique":318,
"link_clicks":444,
"link_clicks_unique":320,
"unsubscribes":1,
"email_forwards":0,
"bounces":0,
"open_rate":55.79,
"click_rate":56.14
}
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Calculates the total number of Emails sent, Bounces, Unsubscribes, Opens, Forwards and Link Clicks for Autoresponder
GET
/Stats/GetAutoresponderSummary/
Integer
autoresponderid
Timestamp
from_date
Timestamp
to_date
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetAutoresponderSummary?autoresponderid=12&from_date=1578667190&to_date=1579531190'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$autoresponderid = 12;
$fromDate = 1578667190;
$toDate = 1579531190;
$result = $parser->GetAutoresponderSummary($autoresponderid, $fromDate, $toDate);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int autoresponderid = 12;
long fromDate = 1578667190;
long toDate = 1578839990;
string result = parser.GetAutoresponderSummary(autoresponderid, fromDate, toDate);
{
"status":true,
"code":200,
"data":{
"email_sent":2,
"email_opens":2,
"email_opens_unique":1,
"link_clicks":2,
"link_clicks_unique":1,
"unsubscribes":1,
"email_forwards":0,
"bounces":0,
"open_rate":50,
"click_rate":50
}
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Calculates the total number of Emails sent, Bounces, Unsubscribes, Opens, Forwards and Link Clicks for Segment
GET
/Stats/GetSegmentSummary/
Integer
segmentid
Timestamp
from_date
Timestamp
to_date
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Stats/GetSegmentSummary?segmentid=12&from_date=1578667190&to_date=1579531190'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$segmentid = 12;
$fromDate = 1578667190;
$toDate = 1579531190;
$result = $parser->GetSegmentSummary($segmentid, $fromDate, $toDate);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int segmentid = 12;
long fromDate = 1578667190;
long toDate = 1578839990;
string result = parser.GetSegmentSummary(segmentid, fromDate, toDate);
{
"status":true,
"code":200,
"data":{
"email_sent":20,
"email_opens":10,
"email_opens_unique":5,
"link_clicks":12,
"link_clicks_unique":10,
"unsubscribes":0,
"email_forwards":0,
"bounces":0,
"open_rate":50,
"click_rate":60
}
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Schedule email campaign for sending.
POST
/Sends/ScheduleSendNewsletter/
Integer
newsletterid
Float
time_to_send
Boolean
save_snapshots
Boolean
reload_feed
Boolean
notify_owner
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Sends/ScheduleSendNewsletter' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"newsletterid":50,"time_to_send":2,"save_snapshots":false,"reload_feed":true}'
{
"newsletterid": 50,
"time_to_send": 2,
"save_snapshots": false,
"reload_feed": true
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 50;
$timeToSend = 2; //Send 2 hours form now.
$saveSnapshots = false;
$reloadFeed = true;
$result = $parser->ScheduleSendNewsletter($newsletterid, $timeToSend, $saveSnapshots, $reloadFeed);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 50;
float timeToSend = 2; //Send 2 hours form now.
bool saveSnapshots = false;
bool reloadFeed = true;
string result = parser.ScheduleSendNewsletter(newsletterid, timeToSend, saveSnapshots, reloadFeed);
{
"status":true,
"code":200,
"message":"Campaign has been scheduled"
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Schedule email campaign for sending to specific lists.
POST
/Sends/ScheduleSendNewsletterToList/
Integer
newsletterid
Array
listid
Float
time_to_send
Boolean
save_snapshots
Boolean
reload_feed
Boolean
notify_owner
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Sends/ScheduleSendNewsletterToList' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"newsletterid":50,"listid":[250],"time_to_send":2,"save_snapshots":true,"reload_feed":true}'
{
"newsletterid": 50,
"listid": [250],
"time_to_send": 2,
"save_snapshots": true,
"reload_feed": true
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 50;
$listid[] = 250;
$timeToSend = 2; //Send 2 hours form now.
$saveSnapshots = true;
$reloadFeed = true;
$result = $parser->ScheduleSendNewsletterToList($newsletterid, $listid, $timeToSend, $saveSnapshots, $reloadFeed);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 50;
int[] listids = new int[] { 250,251 };
float timeToSend = 2; //Send 2 hours form now.
bool saveSnapshots = true;
bool reloadFeed = true;
string result = parser.ScheduleSendNewsletterToList(newsletterid, listids, timeToSend, saveSnapshots, reloadFeed);
{
"status":true,
"code":200,
"message":"Campaign has been scheduled"
}
{
"status": false,
"code": 400,
"message": "Missing required parameter"
}
Schedule email campaign for sending to specific segments.
POST
/Sends/ScheduleSendNewsletterToSegment/
Integer
newsletterid
Array
segmentid
Float
time_to_send
Boolean
save_snapshots
Boolean
reload_feed
Boolean
notify_owner
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Sends/ScheduleSendNewsletterToSegment' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"newsletterid":50,"segmentid":[20],"time_to_send":2,"save_snapshots":true,"reload_feed":true}'
{
"newsletterid": 50,
"segmentid": [20],
"time_to_send": 2,
"save_snapshots": true,
"reload_feed": true
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 50;
$segmentid[] = 20;
$timeToSend = 2; //Send 2 hours form now.
$saveSnapshots = true;
$reloadFeed = true;
$result = $parser->ScheduleSendNewsletterToSegment($newsletterid, $segmentid, $timeToSend, $saveSnapshots, $reloadFeed);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 50;
int[] segmentids = new int[] { 20, 21 };
float timeToSend = 2; //Send 2 hours form now.
bool saveSnapshots = true;
bool reloadFeed = true;
string result = parser.ScheduleSendNewsletterToSegment(newsletterid, segmentids, timeToSend, saveSnapshots, reloadFeed);
{
"status":true,
"code":200,
"message":"Campaign has been scheduled"
}
{
"status": false,
"code": 403,
"message": "This user is not owner of the newsletter."
}
Schedule SMS campaign for sending.
POST
/SMSSends/ScheduleSendSMS/
Integer
campaignid
Float
time_to_send
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/SMSSends/ScheduleSendSMS' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"campaignid": 50,"time_to_send": 1}'
{
"campaignid": 50,
"time_to_send": 1
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$campaignid = 50;
$timeToSend = 1; // Send 1 hour form now.
$result = $parser->ScheduleSendSMS($campaignid, $timeToSend);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int campaignid = 50;
float timeToSend = 1; // Send 1 hour form now.
string result = parser.ScheduleSendSMS(newsletterid, timeToSend);
{
"status":true,
"code":200,
"message":"Campaign has been scheduled"
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Attempts to send a newsletter to a specific profile. Profile has to be on the list/segment specified for given newsletter.
POST
/Messaging/SendNewsletter/
Integer
newsletterid
Integer
profileid
String
email_address
String
call_back_url
Boolean
notify_owner
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Messaging/SendNewsletter' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"newsletterid":50,"profileid":150,"email_address":"contact@marketingplatform.com","call_back_url":"http:\/\/api.mailmailmail.net\/callback"}'
{
"newsletterid": 50,
"profileid": 150,
"email_address": "contact@marketingplatform.com",
"call_back_url": "http://api.mailmailmail.net/callback"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 50;
$profileid = 150;
$emailaddress = "contact@marketingplatform.com";
$callbackUrl = "http://api.mailmailmail.net/callback";
$result = $parser->SendNewsletter($newsletterid, $profileid, $emailaddress, $callbackUrl);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 50;
int profileid = 150;
string emailaddress = "contact@marketingplatform.com";
string callbackUrl = "http://api.mailmailmail.net/callback";
string result = parser.SendNewsletter(newsletterid, profileid, emailaddress, callbackUrl);
{
"status":true,
"code":200,
"message":"Profile was added to send newsletter queue."
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get a List of Newsletters.
GET
/Newsletters/
Integer
newsletterid
Boolean
count_only
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET
'https://api.mailmailmail.net/v2.0/Newsletters?newsletterid=0&countOnly=false&limit=2&offset=0'
-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 0; // if newsletterid is set up, then response will be only with selected newsletter data
$countOnly = false;
$limit = 2;
$offset = 0;
$result = $parser->GetNewsletters(newsletterid, $countOnly, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 0; // if newsletterid is set up, then response will be only with selected newsletter data
bool countOnly = false;
int limit = 2;
int offset = 0;
string result = parser.GetNewsletters(newsletterid, countOnly, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"newsletterid":1,
"name":"Newsletter name",
"subject":"Newsletter subject",
"active":1,
"create_date":1613119186,
"update_date":1616410086,
"selected_lists":[
6
],
"selected_segments":[
],
"url":"https://app.marketingplatform.com/display.php?N=1&T=933c3640325"
},
{
"newsletterid":2,
"name":"Newsletter name 2",
"subject":"Newsletter subjects 2",
"active":1,
"create_date":1613119194,
"update_date":1613120415,
"selected_lists":[
6
],
"selected_segments":[
],
"url":"https://app.marketingplatform.com/display.php?N=2&T=933c3640325"
}
]
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Change the name and the subject of a newsletter.
PUT
/Newsletters/
Integer
newsletterid
String
name
String
subject
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Newsletters/' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"newsletterid":7,"name":"Test Name 2","subject":"Test Subject 2"}'
{
"newsletterid": 7,
"name": "Test Name 2",
"subject": "Test Subject 2"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 7;
$newsletterName = "Test Name 2";
$newsletterSubject = "Test Subject 2";
$result = $parser->EditNewsletter($newsletterid, $newsletterName, $newsletterSubject);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 7;
string newsletterName = "Test Name 2";
string newsletterSubject = "Test Subject 2";
string result = parser.EditNewsletter(newsletterid, newsletterName, newsletterSubject);
{
"status":true,
"code":200,
"message":"Your email campaign has been updated."
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Delete a Newsletter from the database.
DELETE
/Newsletters/
Integer
newsletterid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE 'https://api.mailmailmail.net/v2.0/Newsletters?newsletterid=12 -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 12;
$result = $parser->DeleteNewsletter($newsletterid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 12;
string result = parser.DeleteNewsletter(newsletterid);
{
"status":true,
"code":200,
"message":"Newsletter has been deleted"
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Copy a newsletter along with attachments, images etc.
POST
/Newsletters/CopyNewsletter/
Integer
newsletterid
String
name
String
subject
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Newsletters/CopyNewsletter' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"newsletterid":7,"name":"Test Name 2","subject":"Test Subject 2"}'
{
"newsletterid": 8,
"name": "Newsletter Name",
"subject": "Newsletter Subject"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$newsletterid = 7;
$newsletterName = "Test Name 2";
$newsletterSubject = "Test Subject 2";
$result = $parser->CopyNewsletter($newsletterid, $newsletterName, $newsletterSubject);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int newsletterid = 7;
string newsletterName = "Test Name 2";
string newsletterSubject = "Test Subject 2";
string result = parser.CopyNewsletter(newsletterid, newsletterName, newsletterSubject);
{
"status":true,
"code":200,
"newsletterid":47
}
{
"status":false,
"code":400,
"message":"The requested newsletter belongs to other user!"
}
Makes a request call on all the Feeds that this user either owns or has access to.
GET
/Feeds/
Integer
feedid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Feeds?feedid=12&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings = array();
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$feedid = 0; // if feedid is set up, then response will be only with selected feed data
$limit = 1;
$offset = 0;
$result = $parser->GetFeeds(feedid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int limit = 1;
int offset = 0;
string result = parser.GetFeeds(limit, offset);
{
"status":true,
"code":200,
"data":[
{
"feedid": 10,
"name": "GShop - MarketingPlatform",
"url": "https://marketingplatform.com/example_feed.json",
"type": "json"
}
]
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Reload feed
POST
/Feeds/ReloadFeed/
String
feed_url
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Feeds/ReloadFeed' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"feed_url":"http://feedurl.com"}'
{
"feed_url": "http://feedurl.com""
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$feedURL = "http://feedurl.com";
$result = $parser->ReloadFeed($feedURL);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string feedURL = "http://feedurl.com";
string result = parser.ReloadFeed(feedURL);
{
"status":true,
"code":200,
"message":"Feed has been successfuly reloaded"
}
{
"status": false,
"code": 400,
"message": "Missing required parameter."
}
Makes a request call on all the Autoresponders that this user either owns or has access to.
GET
/Autoresponders/
Integer
autoresponderid
Integer
listid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET
'https://api.mailmailmail.net/v2.0/Autoresponders?autoresponderid=0&limit=1&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings = array();
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$autoresponderid = 0; // if autoresponderid is set up, then response will be only with selected autoresponder data
$limit = 1;
$offset = 0;
$result = $parser->GetAutoresponders(autoresponderid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int autoresponderid = 0; // if autoresponderid is set up, then response will be only with selected autoresponder data
int limit = 1;
int offset = 0;
string result = parser.GetAutoresponders(autoresponderid, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"autoresponderid": 10,
"name": "Autoresponder - MarketingPlatform",
"subject": "Autoresponder - MarketingPlatform",
"create_date": 1617311640,
"status": 1,
"send_after_subscription_hours": 2,
"listid": 1,
"send_from_name": "Support MarketingPlatform",
"send_from_email": "support@marketingplatform.com",
"reply_to_email": "support@marketingplatform.com",
"bounce_email": "support@marketingplatform.com",
"newsletterid": 23
},
{
"autoresponderid": 11,
"name": "Welcome Autoresponder",
"subject": "Welcome Autoresponder",
"create_date": 1617341640,
"status": 1,
"send_after_subscription_hours": 1,
"listid": 2,
"send_from_name": "Support MarketingPlatform",
"send_from_email": "support@marketingplatform.com",
"reply_to_email": "support@marketingplatform.com",
"bounce_email": "support@marketingplatform.com",
"newsletterid": 24
}
]
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Activate/Deactivate Autoresponder.
PUT
/Autoresponders/
Integer
autoresponderid
Boolean
status
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Autoresponders/' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"autoresponderid":12,"status":true}'
{
"autoresponderid": 12,
"status": true
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$autoresponderid = 12;
$status = true; // Active = true; Disabled = false
$result = $parser->SetAutoresponderStatus($autoresponderid, $status);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int autoresponderid = 12;
bool status = true;
string result = parser.SetAutoresponderStatus(autoresponderid, status);
{
"status":true,
"code":200,
"message":"Autoresponder updated successfully."
}
{
"status":false,
"code":403,
"message":"This user is not owner of the autoresponder"
}
Delete a Autoresponder from the database.
DELETE
/Autoresponders/
Integer
autoresponderid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE 'https://api.mailmailmail.net/v2.0/Autoresponders?autoresponderid=20 -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$autoresponderid = 26;
$result = $parser->DeleteAutoresponder($autoresponderid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int autoresponderid = 26;
string result = parser.DeleteAutoresponder(autoresponderid);
{
"status":true,
"code":200,
"message":"Autoresponder has been deleted."
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get a list of triggers.
GET
/Triggers/
Integer
triggerid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET
'https://api.mailmailmail.net/v2.0/Triggers?triggerid=0&limit=2&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$triggerid = 0; // if triggerid is set up, then response will be only with selected trigger data
$limit = 2;
$offset = 0;
$result = $parser->GetTriggers(triggerid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int triggerid = 0; // if triggerid is set up, then response will be only with selected trigger data
int limit = 2;
int offset = 0;
string result = parser.GetTriggers(triggerid, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"triggerid":1,
"status":1,
"create_date":1616583076,
"name":"test",
"trigger_type":"Based on a contact's date field",
"trigger_hours":0,
"trigger_interval":"The next anniversary of the date"
}
]
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Activate/Deactivate Trigger.
PUT
/Triggers/
Integer
triggerid
Boolean
status
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Triggers/' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"triggerid":11,"status":true}'
{
"triggerid": 11,
"status": true
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$triggerid = 11;
$status = true; // Active = true; Disabled = false
$result = $parser->SetTriggerStatus($triggerid, $status);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int triggerid = 11;
bool status = true; // Active = true; Disabled = false
string result = parser.SetTriggerStatus(triggerid, status);
{
"status":true,
"code":200,
"message":"Trigger has been updated"
}
{
"status":false,
"code":403,
"message":"This user is not owner of the trigger"
}
Delete a Trigger from the database.
DELETE
/Triggers/
Integer
triggerid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE 'https://api.mailmailmail.net/v2.0/Triggers?triggerid=26 -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$triggerid = 26;
$result = $parser->DeleteTrigger($triggerid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int triggerid = 26;
string result = parser.DeleteTrigger(triggerid);
{
"status":true,
"code":200,
"message":"Trigger has been deleted."
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Get a list of triggers for the segment.
GET
/Triggers/GetTriggersForSegment/
Integer
segmentid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Triggers/GetTriggersForSegment?segmentid=9&limit=10&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$segmentid = 9;
$limit = 2;
$offset = 0;
$result = $parser->GetTriggersForSegment($segmentid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int segmentid = 9;
int limit = 2;
int offset = 0;
string result = parser.GetTriggersForSegment(segmentid, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"triggeremailsid":3,
"status":1,
"create_date":1581071887,
"name":"Link Clicked",
"trigger_type":"Based on a link being clicked",
"trigger_hours":0,
"trigger_interval":"The next anniversary of the date"
},
{
"triggeremailsid":4,
"active":1,
"create_date":1581514267,
"ownerid":2,
"name":"Trigger for Segment",
"trigger_type":"Based on a specific date",
"trigger_hours":0,
"trigger_interval":"The next anniversary of the date"
}
]
}
{
"status":false,
"code":403,
"message":"This user is not owner of the segment."
}
Makes a request call on all the Flows that this user either owns or has access to.
GET
/Flows/
Integer
flowid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET
'https://api.mailmailmail.net/v2.0/FLows?flowid=0&limit=1&offset=0'
-H 'Apiusername: API_USERNAME'
-H 'Apitoken: API_TOKEN'
-H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings = array();
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$flowid = 0; // if flowid is set up, then response will be only with selected flow data
$limit = 1;
$offset = 0;
$result = $parser->GetFlows($flowid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int flowid = 0;
int limit = 1;
int offset = 0;
string result = parser.GetFlows(flowid, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"flowid": 10,
"name": "Flow - MarketingPlatform",
"create_date": 1568733174,
"update_date": 1568733174,
"active": true
}
]
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Activate/Deactivate Flow.
PUT
/Flows/
Integer
flowid
Boolean
status
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT
'https://api.mailmailmail.net/v2.0/Flows/'
-H 'Apiusername: API_USERNAME'
-H 'Apitoken: API_TOKEN'
-H 'Content-Type: application/json'
-d '{"flowid":12,"status":true}'
{
"flowid": 12,
"status": true
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$flowid = 12;
$status = true; // Active = true; Disabled = false
$result = $parser->SetFlowStatus($flowid, $status);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int flowid = 12;
bool status = true;
string result = parser.SetFlowStatus(flowid, status);
{
"status":true,
"code":200,
"message":"Flow updated successfully."
}
{
"status":false,
"code":403,
"message":"This user is not owner of the flow"
}
Get segments.
GET
/Segments/
Integer
segmentid
Integer
listid
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET
'https://api.mailmailmail.net/v2.0/Segments?segmentid=0&listid=9&limit=10&offset=0'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$segmentid = 0; // if segmentid is set up, then response will be only with selected segment data
$listid = 9;
$limit = 1;
$offset = 0;
$result = $parser->GetSegments($segmentid, $listid, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int segmentid = 0; // if segmentid is set up, then response will be only with selected segment data
int listid = 9;
int limit = 1;
int offset = 0;
string result = parser.GetSegments(segmentid, listid, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"segmentid":1,
"segment_name":"Test GetStatidsBySegment",
"create_date":1580307521,
"update_date":1580307521,
"used_lists":[
9
],
"search_info":{
"Lists":[
[
9
]
],
"Rules":[
[
{
"type":"group",
"rules":[
{
"type":"rule",
"connector":"and",
"rules":{
"ruleName":"emailaddress",
"ruleOperator":"like",
"ruleValues":[
"toni"
]
}
}
],
"connector":"and"
}
]
],
"Operators":null
}
}
]
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Create a segment with specific rules.
POST
/Segments/
String
name
Array
rules
String
connector
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Segments'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'-d'{"name":"Segment Name","rules":{"Segments":[{"listids":[205],"rules":[{"ruleName":"emailaddress","ruleOperator":"=","ruleValues":["contact@marketingplatform.com"]}]}]},"connector":"and"}'
{
"name": "Segment Name",
"rules": {
"Segments": [{
"listids": [205],
"rules": [{
"ruleName": "emailaddress",
"ruleOperator": "=",
"ruleValues": ["contact@marketingplatform.com"]
}]
}]
},
"connector": "and"
}
{
"name": "Segment Name",
"rules": {
"Segments": [{
"listids": [205],
"rules": [{
"ruleName": "emailaddress",
"ruleOperator": "like",
"ruleValues": ["marketingplatform.com"]
},
{
"ruleName": "confirmationStatus",
"ruleOperator": "=",
"ruleValues": ["confirmed"]
}]
}]
},
"connector": "and"
}
{
"name": "Combine segments",
"rules": {
"Segments": [{
"operator":"plus",
"listids": [1256],
"rules": [{
"ruleName": "emailaddress",
"ruleOperator": "contains",
"ruleValue": "John"
}]
}, {
"listids": [1256],
"operator":"plus",
"rules": [{
"ruleName": "emailaddress",
"ruleOperator": "contains",
"ruleValue": "@marketingplatform.com"
}]
}]
},
"connector": "and"
}
{
"name": "Segment name with path rule for lvl 1 OTM",
"rules": {
"Segments": [
{
"listids": [205],
"rules": [
{
"ruleName": "162",
"ruleOperator": "equalto",
"ruleValues": ["John"],
"path": "Item",
"type": "text",
"ruleNameField": "MyOneToMany",
"connector": "and"
}
]
}
]
},
"connector": "and"
}
{
"name": "Segment name with path rule for lvl 2 OTM",
"rules": {
"Segments": [
{
"listids": [205],
"rules": [
{
"ruleName": "162",
"ruleOperator": "equalto",
"ruleValues": ["John"],
"path": "OrderItems.Item",
"type": "text",
"ruleNameField": "MyOneToMany",
"connector": "and"
}
]
}
]
},
"connector": "and"
}
{
"name": "Segment name with path rule for lvl 3 OTM",
"rules": {
"Segments": [
{
"listids": [205],
"rules": [
{
"ruleName": "162",
"ruleOperator": "equalto",
"ruleValues": ["John"],
"path": "Orders.OrderItems.Item",
"type": "text",
"ruleNameField": "MyOneToMany",
"connector": "and"
}
]
}
]
},
"connector": "and"
}
{
"name": "Segment with OTM and simple rule",
"connector": "and",
"rules": {
"Segments": [
{
"listids": [205],
"rules": [
{
"ruleName": "162",
"ruleOperator": "equalto",
"ruleValues": ["John"],
"path": "OrderItems.Item",
"type": "text",
"ruleNameField": "MyOneToMany",
"connector": "and"
},
{
"ruleName": "emailaddress",
"ruleOperator": "equalto",
"ruleValues": ["email@marketingplatform.com"],
"connector": "and"
},
{
"ruleName": "164",
"ruleOperator": "equalto",
"ruleValues": ["dog"],
"path": "UserInfo.DogDetails.DogName",
"type": "text",
"ruleNameField": "MyOneToManyOther",
"connector": "and"
}
]
}
]
}
}
Basic fields Custom fields emailaddress Rule name is id of custom field mobilePhone format confirmationStatus activityStatus smsStatus mailRating dateAdded clickedOnLink emailCampaign subscriberSource
Rules '='=>is/ equal 'empty'=>is empty '='=>is on 'notEmpty'=>isnot empty '='=> has clicked 'after'=>is after '!='=>isnot/not equal 'before'=>is before '!='=> has not clicked 'between'=>is between '!='=>isnot on 'opened'=> has opened 'contains'=> contains 'notOpened'=> has not opened 'notContain'=> does not contain 'sent'=> sent 'notSent'=>not sent 'greaterthan'=> greaterthan 'lessthan'=> lessthan
Values'html'=> HTML 'any'=>AnyLink'text'=>Text'any'=>AnyEmailCampaign'confirmed'=>Confirmed'lastMonth'=>AnyCampaignLastMonth'unconfirmed'=>Unconfirmed'last3Months'=>AnyCampaignLast3Months'active'=>Active'last6Months'=>AnyCampaignLast6Months'bounced'=>Bounced'last9Months'=>AnyCampaignLast9Months'unsubscribed'=>Unsubscribed'last12Months'=>AnyCampaignLast12Months'disabled'=>Disabled'facebook'=>Facebook'webForm'=>WebForm'connector'=>Connector'import'=>Import'unknown'=>Unknown'manual'=>Manual
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$name = "Segment Name";
$rules = array (
"Segments" => array (
array (
"listids" => array(205),
"rules" => array (
array (
"ruleName" => "emailaddress",
"ruleOperator" => "=",
"ruleValues" => array("contact@marketingplatform.com")
)
)
)
)
);
$connector = "and";
$result = $parser->CreateSegment($name, $rules, $connector);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string name = "Segment Name";
string connector = "and";
Dictionary<string, object> allSegments = new Dictionary<string, object>();
Dictionary<string, object>[] segments = new Dictionary<string, object>[1];
Dictionary<string, object> segment = new Dictionary<string, object>();
Dictionary<string, object>[] rules = new Dictionary<string, object>[1];
Dictionary<string, object> rule = new Dictionary<string, object>();
rule.Add("ruleName", "emailaddress");
rule.Add("ruleOperator", "=");
rule.Add("ruleValues", new string[] {"contact@marketingplatform.com"});
rules[0] = rule;
segment.Add("listids", new int[] { 205 });
segment.Add("rules", rules);
segments[0] = segment;
allSegments.Add("Segments", segments);
string result = parser.CreateSegment(name, allSegments, connector);
{
"status":true,
"code":201,
"segmentid":342
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Create a segment with specific rules.
Put
/Segments/
Integer
segmentid
String
name
Array
rules
String
connector
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Segments'-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'-d'{"segmentid":112,"name":"Segment Name","rules":{"Segments":[{"listids":[205],"rules":[{"ruleName":"emailaddress","ruleOperator":"=","ruleValues":["contact@marketingplatform.com"]}]}]},"connector":"and"}'
{
"segmentid": 112,
"name": "Segment Name",
"rules": {
"Segments": [{
"listids": [205],
"rules": [{
"ruleName": "emailaddress",
"ruleOperator": "=",
"ruleValues": ["contact@marketingplatform.com"]
}]
}]
},
"connector": "and"
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$segmentid = 112;
$name = "Segment Name";
$rules = array (
"Segments" => array (
array (
"listids" => array(205),
"rules" => array (
array (
"ruleName" => "emailaddress",
"ruleOperator" => "=",
"ruleValues" => array("contact@marketingplatform.com")
)
)
)
)
);
$connector = "and";
$result = $parser->EditSegment($segmentid, $name, $rules, $connector);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int segmentid = 112;
string name = "Segment Name";
string connector = "and";
Dictionary<string, object> allSegments = new Dictionary<string, object>();
Dictionary<string, object>[] segments = new Dictionary<string, object>[1];
Dictionary<string, object> segment = new Dictionary<string, object>();
Dictionary<string, object>[] rules = new Dictionary<string, object>[1];
Dictionary<string, object> rule = new Dictionary<string, object>();
rule.Add("ruleName", "emailaddress");
rule.Add("ruleOperator", "=");
rule.Add("ruleValues", new string[] {"contact@marketingplatform.com"});
rules[0] = rule;
segment.Add("listids", new int[] { 205 });
segment.Add("rules", rules);
segments[0] = segment;
allSegments.Add("Segments", segments);
string result = parser.EditSegment(segmentid, name, allSegments, connector);
{
"status":true,
"code":200,
"message":"Segment has been successfully updated"
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}
Delete a Segment from the database.
DELETE
/Segments/
Integer
segmentid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE ''https://api.mailmailmail.net/v2.0/Segments?segmentid=26-H'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$segmentid = 26;
$result = $parser->DeleteSegment($segmentid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int segmentid = 26;
string result = parser.DeleteSegment(segmentid);
{
"status":true,
"code":200,
"message":"Segment has been deleted."
}
{
"status":false,
"code":401,
"message":"You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Get a list of SubAccounts.
GET
/Users/SubAccounts/
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Users/SubAccounts?limit=10&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$limit = 10;
$offset = 0;
$result = $parser->GetSubAccounts($limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
int limit = 10;
int offset = 0;
string result = parser.GetSubAccounts(limit, offset);
{
"status": true,
"code": 200,
"data": {
"Main_Account": [
{
"account_name": "MyMainAccount",
"owner_email": "MyMainAccount@marketingplatform.com",
"status": 1,
"full_name": "MyMainAccount",
"phone": 4578xxxxx,
"user_timezone": "Europe/Talin",
"create_date": 1595849768
}
],
"Sub_Accounts": [
{
"account_name": "MySubAccount",
"owner_email": "MySubAccount@marketingplatform.com",
"status": 1,
"full_name": "User",
"phone": "",
"user_timezone": "Europe/Paris",
"create_date": 1590144074
},
{
"account_name": "MySubAccount_2",
"owner_email": "MySubAccount_2@marketingplatform.com",
"status": 1,
"full_name": "MySubAccount_2",
"phone": "",
"user_timezone": "Europe/Ulm",
"create_date": 1587020975
}
]
}
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Create sub account from your admin account.
POST
/Users/SubAccount/
String
account_name
String
account_password
String
email_address
Array
allowed_domains
On success:
HTTP code 201
On failure:
HTTP code 4xx, 5xx
curl POST 'https://api.mailmailmail.net/v2.0/Users/SubAccount' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"account_name":"test-account_4","account_password":"password","email_address":"test@localhost.com","allowed_domains":["@localhost.com","@some_dk.com"]}'
{
"account_name": "test-account_4",
"account_password": "password",
"email_address": "test@localhost.com",
"allowed_domains": ["@localhost.com", "@some_dk.com"]
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "test-account_4";
$accountPassword = "password";
$ownerEmail = "test@localhost.com";
$allowedDomains = array("@localhost.com, some_dk.com");
$result = $parser->CreateSubAccount($accountName, $accountPassword, $ownerEmail, $allowedDomains);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = "test-account_4";
string accountPassword = "password";
string ownerEmail = "test@example.com";
string[] allowedDomains = {"@example.com"};
string result = parser.CreateSubAccount(accountName, accountPassword, ownerEmail, allowedDomains);
{
"status":true,
"code":201
"message":"New sub account created successfully."
}
{
"status":false,
"code":400,
"message":"Parameter ownerEmail is empty."
}
Update SubAccount.
PUT
/Users/SubAccount/
String
account_name
Boolean
status
String
email_address
String
account_password
Array
allowed_domains
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Users/SubAccounts' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"account_name":"master_unsername_sub_account3265","status":false}'
{
"account_name": "master_unsername_sub_account3265",
"status": false
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "master_unsername_sub_account3265";
$status = false; // Active = true; Disabled = false
$result = $parser->SetSubAccountStatus($accountName, $status);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = "master_unsername_sub_account3265";
bool status = false; // Active = true; Disabled = false
string result = parser.SetSubAccountStatus(triggerid, status);
{
"status":true,
"code":200,
"data":{
"message":"Sub account has been updated"
}
}
{
"status":false,
"code":400,
"message":"Parameter accountName is empty"
}
Get a list of inherit lists.
GET
/Users/InheritLists/
String
account_name
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Users/InheritLists?account_name=sub_account_name&limit=10&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "sub_account_name";
$limit = 10;
$offset = 0;
$result = $parser->GetInheritedLists($accountName, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = 'sub_account_name';
int limit = 10;
int offset = 0;
string result = parser.GetInheritedLists(accountName, limit, offset);
{
"status": true,
"code": 200,
"data": [{
"listid": 7608,
"name": "Test_Case_List_Denmark_11815114",
"description": "Description 1",
"mobile_prefix": "",
"sender_name": "Denis Green",
"sender_email": "some@ownerDK.com",
"reply_email": "some@ownerDK.com",
"company_name": "", "mobile_prefix":null
"company_email": "",
"company_address": "",
"company_phone": ""
}, {
"listid": 7609,
"name": "Test_Case_List_Denmark_81059802",
"description": "Description 2",
"mobile_prefix": "",
"sender_name": "Denis Bank",
"sender_email": "some2@ownerDK.com",
"reply_email": "some2@ownerDK.com,
"company_name": "",
"company_email": "",
"company_address": "",
"company_phone": ""
}]
}
{
"status": false,
"code": 401,
"message": "Specified account is not your sub account."
}
Inherit lists from your admin account to sub account.
PUT
/Users/InheritLists/
String
account_name
Array
inherit_lists
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Users/InheritLists' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"account_name":"InheritLists_Test","inherit_lists":[234,23452,3123,32]}'
{
"account_name": "InheritLists_Test",
"inherit_lists": [234, 23452, 3123, 32]
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "InheritLists_Test";
$inheritLists = array(1,2);
$result = $parser->InheritListsToSubAccount($accountName, $inheritLists);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = "InheritLists_Test";
int[] inheritLists = new int[] {1, 2};
string result = parser.InheritListsToSubAccount(accountName, inheritLists);
{
"status":true,
"code":200,
"message":"Inherit successful."
}
{
"status":false,
"code":401,
"message":"Specified account is not your sub account"
}
Delete Inherit Lists for specific sub account
DELETE
/Users/InheritLists/
String
account_name
Integer
listid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE 'https://api.mailmailmail.net/v2.0/Users/InheritLists?account_name=InheritLists_Test&listid=12' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "InheritLists_Test";
$listid = 12;
$result = $parser->RemoveInheritedList($accountName, $listid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = 'InheritLists_Test';
int listid = 12;
string result = parser.RemoveInheritedList(accountName, listid);
{
"status":true,
"code":200,
"message":"Inherited list has been deleted."
}
{
"status":false,
"code":403,
"message":"This user is not owner of the list"
}
Get a list of Inherit Segments.
GET
/Users/InheritSegments/
String
account_name
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Users/InheritSegments?account_name=sub_account_name&limit=10&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "sub_account_name";
$limit = 10;
$offset = 0;
$result = $parser->GetInheritedSegments($accountName, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = 'sub_account_name';
int limit = 1;
int offset = 0;
string result = parser.GetInheritedSegments(accountName, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"segmentid":1,
"segment_name":"Test GetStatidsBySegment",
"create_date":1580307521,
"update_date":1580307521,
"used_lists":[
9
],
"search_info":{
"Lists":[
[
9
]
],
"Rules":[
[
{
"type":"group",
"rules":[
{
"type":"rule",
"connector":"and",
"rules":{
"ruleName":"email",
"ruleOperator":"like",
"ruleValues":[
"toni"
]
}
}
],
"connector":"and"
}
]
],
"Operators":null
}
}
]
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Inherit segments to sub account.
PUT
/Users/InheritSegments/
String
account_name
Array
inherit_segments
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Users/InheritSegments' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"account_name":"InheritSegments_Test","inherit_segments":[23,442,1234]}'
{
"account_name": "InheritSegments_Test",
"inherit_segments": [23, 442, 1234]
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "InheritSegments_Test";
$inheritSegments = array(1, 2);
$result = $parser->InheritSegmentsToSubAccount($accountName, $inheritSegments);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = "InheritSegments_Test";
int[] inheritSegments = new int[] {1, 2};
string result = parser.inheritSegments(accountName, inheritSegments);
{
"status":true,
"code":201,
"message":"Inherit successful."
}
{
"status":false,
"code":400,
"message":"Parameter accountName is empty."
}
Delete Inherited Segment from Specific account
DELETE
/Users/InheritSegments/
String
account_name
Integer
segmentid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE 'https://api.mailmailmail.net/v2.0/Users/InheritSegments?account_name=InheritSegments_Test&segmentid=12' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "InheritSegments_Test";
$segmentid = 12;
$result = $parser->RemoveInheritedSegment($accountName, $segmentid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = 'InheritSegments_Test';
int segmentid = 12;
string result = parser.RemoveInheritedSegment(accountName, segmentid);
{
"status":true,
"code":200,
"message":"Inherited segment has been deleted."
}
{
"status":false,
"code":403,
"message":"Only inherit segments can be deleted."
}
Get a list of Inherited Newsletters.
GET
/Users/InheritNewsletters/
String
account_name
Integer
limit
Integer
offset
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl GET 'https://api.mailmailmail.net/v2.0/Users/InheritNewsletters?account_name=sub_account_name&limit=10&offset=0' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "sub_account_name";
$limit = 10;
$offset = 0;
$result = $parser->GetInheritedNewsletters($accountName, $limit, $offset);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = 'sub_account_name';
int limit = 10;
int offset = 0;
string result = parser.GetInheritedNewsletters(accountName, limit, offset);
{
"status":true,
"code":200,
"data":[
{
"newsletterid":1,
"name":"Newsletter name",
"subject":"Newsletter subject",
"active":1,
"create_date":1613119186,
"update_date":1616410086,
"selected_lists":[
6
],
"selected_segments":[
],
"url":"https://app.marketingplatform.com/display.php?N=1&T=933c3640325"
},
{
"newsletterid":2,
"name":"Newsletter name 2",
"subject":"Newsletter subjects 2",
"active":1,
"create_date":1613119194,
"update_date":1613120415,
"selected_lists":[
6
],
"selected_segments":[
],
"url":"https://app.marketingplatform.com/display.php?N=2&T=933c3640325"
}
]
}
{
"status": false,
"code": 401,
"message": "You have attempted to execute a API call with incorrect credentials! Access denied!"
}
Inherit newsletter to sub account.
PUT
/Users/InheritNewsletters/
String
account_name
Integer
newsletterid
String
recipients_type
Array
recipeintsid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl PUT 'https://api.mailmailmail.net/v2.0/Users/InheritNewsletters' -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json' -d '{"account_name":"InheritNewsletter_Test","newsletterid":123,"recipients_type":"segment","recipeintsid":[23,55,23,5232]}'
{
"account_name": "InheritNewsletter_Test",
"newsletterid": 123,
"recipients_type": "segment",
"recipeintsid": [23, 55, 23, 5232]
}
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "InheritNewsletter_Test";
$newsletterid = 123;
$recipientsType = "segment";
$recipeintsid = array(1, 2);
$result = $parser->InheritNewsletterToSubAccount($accountName, $newsletterid, $recipientsType, $recipeintsid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = "InheritNewsletter_Test";
int newsletterid = 123;
string recipientsType = "segment";
int[] recipeintsid = new int[] {1, 2};
string result = parser.InheritNewsletterToSubAccount(accountName, newsletterid, recipientsType, recipeintsid);
{
"status":true,
"code":201,
"message":"Inherit successful."
}
{
"status":false,
"code":401,
"message":"Specified account is not your sub account"
}
Delete Inherited Newsletter from Specific Sub Account
DELETE
/Users/InheritNewsletters/
String
account_name
Integer
newsletterid
On success:
HTTP code 200
On failure:
HTTP code 4xx, 5xx
curl DELETE 'https://api.mailmailmail.net/v2.0/Users/InheritNewsletters?account_name=InheritNewsletter_Test&newsletterid=15 -H 'Apiusername: API_USERNAME' -H 'Apitoken: API_TOKEN' -H 'Content-Type: application/json'<
require_once dirname(__FILE__) . "/ApiParser.class.php";
$settings['username'] = "API_USERNAME";
$settings['token'] = "API_TOKEN";
$parser = new ApiParser($settings);
$accountName = "InheritNewsletter_Test";
$newsletterid = 15;
$result = $parser->RemoveInheritedNewsletter($accountName, $newsletterid);
print_r($result);
using MarketingPlatform;
string username = 'API_USERNAME';
string token = 'API_TOKEN';
ApiParser parser = new ApiParser(username, token);
string accountName = "InheritNewsletter_Test";
int newsletterid = 15;
string result = parser.RemoveInheritedNewsletter(accountName, newsletterid);
{
"status":true,
"code":200,
"message":"Inherited campaign has been deleted."
}
{
"status":false,
"code":400,
"message":"Missing required parameter."
}