curl -X PUT https://api2.ecomailapp.cz/lists/1/update-subscriber \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "foo@bar.cz",
"subscriber_data": {
"name": "Jan",
"surname": "Novak",
"gender": "male",
"company": "Company name",
"city": "Praha",
"custom_fields": { "shop": "myshop.cz" },
"tags": ["tags"],
"groups": { "grp_5a145ee75780f": ["Category 1", "Category 2"] }
}
}'
$listId = 1;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}/update-subscriber");
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([
'email' => 'foo@bar.cz',
'subscriber_data' => [
'name' => 'Jan',
'surname' => 'Novak',
'gender' => 'male',
'company' => 'Company name',
'city' => 'Praha',
'custom_fields' => ['shop' => 'myshop.cz'],
'tags' => ['tags'],
'groups' => ['grp_5a145ee75780f' => ['Category 1', 'Category 2']],
],
]));
$response = curl_exec($ch);
curl_close($ch);
{
"id": 12345,
"name": "Jan",
"surname": "Novak",
"email": "foo@bar.cz",
"gender": "male",
"bounce_soft": 0,
"bounce_hard": null,
"bounce_message": null,
"inserted_at": "2022-11-15 13:59:21"
}
{
"errors": {
"subscriber_data.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 subscriber
Update an existing subscriber in a specific list.
PUT
/
lists
/
{list_id}
/
update-subscriber
curl -X PUT https://api2.ecomailapp.cz/lists/1/update-subscriber \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "foo@bar.cz",
"subscriber_data": {
"name": "Jan",
"surname": "Novak",
"gender": "male",
"company": "Company name",
"city": "Praha",
"custom_fields": { "shop": "myshop.cz" },
"tags": ["tags"],
"groups": { "grp_5a145ee75780f": ["Category 1", "Category 2"] }
}
}'
$listId = 1;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}/update-subscriber");
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([
'email' => 'foo@bar.cz',
'subscriber_data' => [
'name' => 'Jan',
'surname' => 'Novak',
'gender' => 'male',
'company' => 'Company name',
'city' => 'Praha',
'custom_fields' => ['shop' => 'myshop.cz'],
'tags' => ['tags'],
'groups' => ['grp_5a145ee75780f' => ['Category 1', 'Category 2']],
],
]));
$response = curl_exec($ch);
curl_close($ch);
{
"id": 12345,
"name": "Jan",
"surname": "Novak",
"email": "foo@bar.cz",
"gender": "male",
"bounce_soft": 0,
"bounce_hard": null,
"bounce_message": null,
"inserted_at": "2022-11-15 13:59:21"
}
{
"errors": {
"subscriber_data.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.
string
required
Email address of the subscriber to update.
object
Updated subscriber information.
Show subscriber_data properties
Show subscriber_data properties
string
First name.
string
Last name.
string
Gender. Must be
male or female.string
Company name.
string
City.
string
Street address.
string
ZIP or postal code.
string
Country code.
string
Phone number.
string
Pre-title (e.g. Mr., Mrs.).
string
Post-nominal title (e.g. PhD).
string
Birthday in
YYYY-MM-DD format.string
Name day in
MM-DD format.string
Source of the subscriber.
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 in the same request are rejected as duplicates.array
Subscriber tags. Limited to 2000 characters total and 50 characters per tag. Content overwrites current tags.
object
Group assignments. Overwrites current values.
curl -X PUT https://api2.ecomailapp.cz/lists/1/update-subscriber \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "foo@bar.cz",
"subscriber_data": {
"name": "Jan",
"surname": "Novak",
"gender": "male",
"company": "Company name",
"city": "Praha",
"custom_fields": { "shop": "myshop.cz" },
"tags": ["tags"],
"groups": { "grp_5a145ee75780f": ["Category 1", "Category 2"] }
}
}'
$listId = 1;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}/update-subscriber");
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([
'email' => 'foo@bar.cz',
'subscriber_data' => [
'name' => 'Jan',
'surname' => 'Novak',
'gender' => 'male',
'company' => 'Company name',
'city' => 'Praha',
'custom_fields' => ['shop' => 'myshop.cz'],
'tags' => ['tags'],
'groups' => ['grp_5a145ee75780f' => ['Category 1', 'Category 2']],
],
]));
$response = curl_exec($ch);
curl_close($ch);
{
"id": 12345,
"name": "Jan",
"surname": "Novak",
"email": "foo@bar.cz",
"gender": "male",
"bounce_soft": 0,
"bounce_hard": null,
"bounce_message": null,
"inserted_at": "2022-11-15 13:59:21"
}
{
"errors": {
"subscriber_data.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