curl -X PUT https://api2.ecomailapp.cz/lists/1/update-subscribers-bulk \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subscriber_data": [
{
"email": "foo@bar.cz",
"name": "Jan",
"surname": "Novak",
"custom_fields": { "shop": "myshop.cz" },
"tags": ["vip"]
},
{
"email": "foo2@bar.cz",
"name": "Jana"
}
],
"allow_resubscribe": false
}'
$listId = 1;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}/update-subscribers-bulk");
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([
'subscriber_data' => [
[
'email' => 'foo@bar.cz',
'name' => 'Jan',
'surname' => 'Novak',
'custom_fields' => ['shop' => 'myshop.cz'],
'tags' => ['vip'],
],
[
'email' => 'foo2@bar.cz',
'name' => 'Jana',
],
],
'allow_resubscribe' => false,
]));
$response = curl_exec($ch);
curl_close($ch);
{
"updates": 2
}
{
"errors": {
"subscriber_data.0.email": ["Invalid email address"],
"subscriber_data.0.custom_fields": [
"Custom fields must be an array with unique keys (case-insensitive)",
"Subscriber custom fields must be an array with max 5000 bytes"
]
}
}
Lists
Update bulk subscribers
Update multiple existing subscribers in a specific list in a single request.
PUT
/
lists
/
{list_id}
/
update-subscribers-bulk
curl -X PUT https://api2.ecomailapp.cz/lists/1/update-subscribers-bulk \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subscriber_data": [
{
"email": "foo@bar.cz",
"name": "Jan",
"surname": "Novak",
"custom_fields": { "shop": "myshop.cz" },
"tags": ["vip"]
},
{
"email": "foo2@bar.cz",
"name": "Jana"
}
],
"allow_resubscribe": false
}'
$listId = 1;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}/update-subscribers-bulk");
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([
'subscriber_data' => [
[
'email' => 'foo@bar.cz',
'name' => 'Jan',
'surname' => 'Novak',
'custom_fields' => ['shop' => 'myshop.cz'],
'tags' => ['vip'],
],
[
'email' => 'foo2@bar.cz',
'name' => 'Jana',
],
],
'allow_resubscribe' => false,
]));
$response = curl_exec($ch);
curl_close($ch);
{
"updates": 2
}
{
"errors": {
"subscriber_data.0.email": ["Invalid email address"],
"subscriber_data.0.custom_fields": [
"Custom fields must be an array with unique keys (case-insensitive)",
"Subscriber custom fields must be an array with max 5000 bytes"
]
}
}
integer
required
ID of the list.
array
required
Array of subscriber objects to update. Limited to 3000 subscribers per call.
Show subscriber object properties
Show subscriber object properties
string
required
Email address of the subscriber to update.
string
First name.
string
Last name.
integer
Subscriber status.
1 = subscribed, 2 = unsubscribed, 4 = hard bounce.object
Custom field values. Limited to 5000 characters total.Keys are case-insensitive — they are trimmed and lowercased on input, so
SHOP, shop and Shop are treated as the same field. Two keys that differ only in case or whitespace within the same subscriber are rejected as duplicates.array
Subscriber tags. Limited to 2000 characters total and 50 characters per tag. Content overwrites current tags.
boolean
default:"false"
Allow resubscribing previously unsubscribed contacts when
status is set to 1.Maximum of 3000 subscribers per call. Subscribers above the limit are silently ignored.
curl -X PUT https://api2.ecomailapp.cz/lists/1/update-subscribers-bulk \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subscriber_data": [
{
"email": "foo@bar.cz",
"name": "Jan",
"surname": "Novak",
"custom_fields": { "shop": "myshop.cz" },
"tags": ["vip"]
},
{
"email": "foo2@bar.cz",
"name": "Jana"
}
],
"allow_resubscribe": false
}'
$listId = 1;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}/update-subscribers-bulk");
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([
'subscriber_data' => [
[
'email' => 'foo@bar.cz',
'name' => 'Jan',
'surname' => 'Novak',
'custom_fields' => ['shop' => 'myshop.cz'],
'tags' => ['vip'],
],
[
'email' => 'foo2@bar.cz',
'name' => 'Jana',
],
],
'allow_resubscribe' => false,
]));
$response = curl_exec($ch);
curl_close($ch);
{
"updates": 2
}
{
"errors": {
"subscriber_data.0.email": ["Invalid email address"],
"subscriber_data.0.custom_fields": [
"Custom fields must be an array with unique keys (case-insensitive)",
"Subscriber custom fields must be an array with max 5000 bytes"
]
}
}
⌘I