curl -X POST https://api2.ecomailapp.cz/account/settings/webhook \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-webhook-url.com"
}'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/account/settings/webhook');
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([
'url' => 'https://your-webhook-url.com',
]));
$response = curl_exec($ch);
curl_close($ch);
{
"success": true
}
Webhooks
Set webhook URL
Set the target webhook URL for campaign statistics.
POST
/
account
/
settings
/
webhook
curl -X POST https://api2.ecomailapp.cz/account/settings/webhook \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-webhook-url.com"
}'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/account/settings/webhook');
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([
'url' => 'https://your-webhook-url.com',
]));
$response = curl_exec($ch);
curl_close($ch);
{
"success": true
}
The webhook sends POST requests as JSON with a 10-second timeout.
string
required
Target webhook URL.
curl -X POST https://api2.ecomailapp.cz/account/settings/webhook \
-H "key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-webhook-url.com"
}'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api2.ecomailapp.cz/account/settings/webhook');
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([
'url' => 'https://your-webhook-url.com',
]));
$response = curl_exec($ch);
curl_close($ch);
{
"success": true
}
⌘I