curl https://api2.ecomailapp.cz/lists/789/subscriber-by-phone/+420777888999 \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json"
$listId = 789;
$phone = urlencode('+420777888999');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}/subscriber-by-phone/{$phone}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
$response = curl_exec($ch);
curl_close($ch);
{
"subscriber": {
"id": 123456,
"list_id": 789,
"email": "foo@bar.cz",
"status": 1,
"subscribed_at": "2023-01-01T00:00:00.000000Z",
"custom_fields": { "id": "123" },
"source": "API"
}
}
{
"errors": { "phone": ["Invalid phone number"] }
}
Lists
Get subscriber by phone
Retrieve a specific subscriber from a list by their phone number.
GET
/
lists
/
{list_id}
/
subscriber-by-phone
/
{phone}
curl https://api2.ecomailapp.cz/lists/789/subscriber-by-phone/+420777888999 \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json"
$listId = 789;
$phone = urlencode('+420777888999');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}/subscriber-by-phone/{$phone}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
$response = curl_exec($ch);
curl_close($ch);
{
"subscriber": {
"id": 123456,
"list_id": 789,
"email": "foo@bar.cz",
"status": 1,
"subscribed_at": "2023-01-01T00:00:00.000000Z",
"custom_fields": { "id": "123" },
"source": "API"
}
}
{
"errors": { "phone": ["Invalid phone number"] }
}
integer
required
ID of the list.
string
required
Phone number of the subscriber. Must be a valid international phone number.
curl https://api2.ecomailapp.cz/lists/789/subscriber-by-phone/+420777888999 \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json"
$listId = 789;
$phone = urlencode('+420777888999');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api2.ecomailapp.cz/lists/{$listId}/subscriber-by-phone/{$phone}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'key: YOUR_API_KEY',
'Content-Type: application/json',
]);
$response = curl_exec($ch);
curl_close($ch);
{
"subscriber": {
"id": 123456,
"list_id": 789,
"email": "foo@bar.cz",
"status": 1,
"subscribed_at": "2023-01-01T00:00:00.000000Z",
"custom_fields": { "id": "123" },
"source": "API"
}
}
{
"errors": { "phone": ["Invalid phone number"] }
}
⌘I