curl -X PUT https://api2.ecomailapp.cz/lists/2 \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated name",
"from_name": "Ecomailapp.cz",
"from_email": "test@ecomailapp.cz",
"reply_to": "support@ecomail.cz"
}'
$listId = 2;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'name' => 'Updated name',
'from_name' => 'Ecomailapp.cz',
'from_email' => 'test@ecomailapp.cz',
'reply_to' => 'support@ecomail.cz',
]));
$response = curl_exec($ch);
curl_close($ch);
{
"id": 2,
"name": "Updated name",
"from_name": "Ecomailapp.cz",
"from_email": "test@ecomailapp.cz",
"reply_to": "support@ecomail.cz",
"sub_success_page": null,
"sub_confirmed_page": null,
"unsub_page": null,
"double_optin": null,
"conf_subject": null,
"conf_message": null
}
Lists
Update list
Update an existing subscriber list.
PUT
/
lists
/
{list_id}
curl -X PUT https://api2.ecomailapp.cz/lists/2 \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated name",
"from_name": "Ecomailapp.cz",
"from_email": "test@ecomailapp.cz",
"reply_to": "support@ecomail.cz"
}'
$listId = 2;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'name' => 'Updated name',
'from_name' => 'Ecomailapp.cz',
'from_email' => 'test@ecomailapp.cz',
'reply_to' => 'support@ecomail.cz',
]));
$response = curl_exec($ch);
curl_close($ch);
{
"id": 2,
"name": "Updated name",
"from_name": "Ecomailapp.cz",
"from_email": "test@ecomailapp.cz",
"reply_to": "support@ecomail.cz",
"sub_success_page": null,
"sub_confirmed_page": null,
"unsub_page": null,
"double_optin": null,
"conf_subject": null,
"conf_message": null
}
curl -X PUT https://api2.ecomailapp.cz/lists/2 \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated name",
"from_name": "Ecomailapp.cz",
"from_email": "test@ecomailapp.cz",
"reply_to": "support@ecomail.cz"
}'
$listId = 2;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'name' => 'Updated name',
'from_name' => 'Ecomailapp.cz',
'from_email' => 'test@ecomailapp.cz',
'reply_to' => 'support@ecomail.cz',
]));
$response = curl_exec($ch);
curl_close($ch);
{
"id": 2,
"name": "Updated name",
"from_name": "Ecomailapp.cz",
"from_email": "test@ecomailapp.cz",
"reply_to": "support@ecomail.cz",
"sub_success_page": null,
"sub_confirmed_page": null,
"unsub_page": null,
"double_optin": null,
"conf_subject": null,
"conf_message": null
}