curl -X POST https://api2.ecomailapp.cz/lists \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "New list name",
"from_name": "Ecomailapp.cz",
"from_email": "test@ecomailapp.cz",
"reply_to": "support@ecomail.cz"
}'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/lists');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'name' => 'New list name',
'from_name' => 'Ecomailapp.cz',
'from_email' => 'test@ecomailapp.cz',
'reply_to' => 'support@ecomail.cz',
]));
$response = curl_exec($ch);
curl_close($ch);
{
"name": "New list name",
"id": 2
}
Lists
Add new list
Create a new subscriber list in your account.
POST
/
lists
curl -X POST https://api2.ecomailapp.cz/lists \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "New list name",
"from_name": "Ecomailapp.cz",
"from_email": "test@ecomailapp.cz",
"reply_to": "support@ecomail.cz"
}'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/lists');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'name' => 'New list name',
'from_name' => 'Ecomailapp.cz',
'from_email' => 'test@ecomailapp.cz',
'reply_to' => 'support@ecomail.cz',
]));
$response = curl_exec($ch);
curl_close($ch);
{
"name": "New list name",
"id": 2
}
curl -X POST https://api2.ecomailapp.cz/lists \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "New list name",
"from_name": "Ecomailapp.cz",
"from_email": "test@ecomailapp.cz",
"reply_to": "support@ecomail.cz"
}'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/lists');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'name' => 'New list name',
'from_name' => 'Ecomailapp.cz',
'from_email' => 'test@ecomailapp.cz',
'reply_to' => 'support@ecomail.cz',
]));
$response = curl_exec($ch);
curl_close($ch);
{
"name": "New list name",
"id": 2
}