// email marketing and newsletters
Via APIActiveCampaign email verification with pingutil
ActiveCampaign automations start the moment a contact subscribes, so a mistyped or disposable address goes straight into nurture emails and lead scoring. A Webhook action at the start of the automation posts the contact to your endpoint, pingutil verifies the mailbox, and the v3 API adds a tag that later If/Else steps can branch on.
Where it connects: ActiveCampaign automation Webhook action (after a "Subscribes to a list" start trigger) plus the API v3 contactTags endpoint
What goes wrong without it
- Our lead score goes up for contacts who signed up with fake addresses, and sales calls them before anyone notices.
- Nurture sequences bounce on new contacts, and we have no step that checks the email before the first send.
- We pay per contact, and the list is full of test@test.com style entries from our forms.
What you can do with ActiveCampaign and pingutil
Gate nurture sequences
Start the automation with the Webhook action, wait a few minutes, then use If/Else on the pingutil-invalid tag to end the automation for contacts with dead mailboxes.
Keep lead scores honest
Subtract points or skip scoring for contacts tagged pingutil-invalid or pingutil-risky so sales focuses on reachable people.
Flag typos for a quick fix
When pingutil returns did_you_mean, tag the contact so a team member or a follow-up form can confirm the corrected address.
Set it up
- 1
Create three tags in ActiveCampaign (pingutil-invalid, pingutil-risky, pingutil-typo), note their IDs, and copy your API URL and key from Settings, Developer.
- 2
Deploy the endpoint below on HTTPS and add a secret query value to the URL.
- 3
In the automation that starts on Subscribes to a list, add a Webhook action as the first step and paste your endpoint URL.
- 4
Send a test delivery to a request inspector first if you want to see the exact contact fields your account posts, then point it at your endpoint.
- 5
Add a Wait step and an If/Else on the pingutil tags after the webhook.
<?php
// ActiveCampaign posts form-encoded fields such as contact[id] and contact[email].
if (($_GET['secret'] ?? '') !== getenv('HOOK_SECRET')) { http_response_code(401); exit; }
$contactId = $_POST['contact']['id'] ?? null;
$email = $_POST['contact']['email'] ?? null;
http_response_code(200);
if (function_exists('fastcgi_finish_request')) fastcgi_finish_request(); // answer now, verify after
if (!$contactId || !$email) exit;
function pingutil_verify(string $email): ?array {
$ch = curl_init('https://pingutil.com/v1/verify');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('PINGUTIL_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['email' => $email]),
]);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return ($body !== false && $code === 200) ? json_decode($body, true) : null; // fail open
}
function ac_tag(string $contactId, string $tagId): void {
$ch = curl_init(getenv('AC_API_URL') . '/api/3/contactTags');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 15,
CURLOPT_HTTPHEADER => ['Api-Token: ' . getenv('AC_API_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['contactTag' => ['contact' => $contactId, 'tag' => $tagId]]),
]);
curl_exec($ch);
curl_close($ch);
}
$v = pingutil_verify($email);
if ($v === null) exit;
if ($v['status'] === 'invalid') ac_tag($contactId, getenv('AC_TAG_INVALID'));
elseif ($v['status'] !== 'valid') ac_tag($contactId, getenv('AC_TAG_RISKY'));
if (!empty($v['did_you_mean'])) ac_tag($contactId, getenv('AC_TAG_TYPO'));What to do with each result
| pingutil result | Action in ActiveCampaign |
|---|---|
| status: "invalid" | Add pingutil-invalid; an If/Else ends the automation and you can exclude the tag from every campaign. |
| status: "risky" or "unknown" | Add pingutil-risky; keep nurturing but skip lead scoring or sales handoff until the contact engages. |
| did_you_mean is set | Add pingutil-typo and route to a task or a confirm-your-email message. |
| status: "valid" | No tag; the automation continues as built. |
Limits to plan for
- The automation keeps moving while your endpoint works, so add a Wait step before any If/Else that reads the pingutil tags.
- ActiveCampaign's help article says the automation Webhook action always sends basic contact data and the automation ID, with other field groups optional; confirm the contact[id] and contact[email] fields with a test delivery before going live.
- pingutil checks up to 300 addresses per account per day (3,000 a month), and 60 requests a minute. Large imports should go through /v1/verify/batch instead of the automation. Those are Free plan limits; Enterprise has custom limits.
ActiveCampaign documentation
- help.activecampaign.com/hc/en-us/articles/115000161204-How-can-I-send-a-webhook-in-an-automation
- developers.activecampaign.com/page/webhooks
- developers.activecampaign.com/reference/create-contact-tag
ActiveCampaign is a trademark of its owner. This integration uses ActiveCampaign's documented extension points; it is not an official ActiveCampaign app.
Common questions
- Can the webhook response itself update the contact?
- No. The automation Webhook action sends data out and moves on. Your endpoint has to write the result back through the API, which is what the tag call does.
- Is it safe to delete contacts tagged invalid?
- Usually, after a review. Mailbox-not-found and no-MX results are reliable, but keep risky and unknown contacts, since catch-all and unresponsive servers can still hide real people.
Stop bad addresses in ActiveCampaign today
Sign in with your email, create an API key and paste it into the step above. Test on a few real addresses first: the live demo shows exactly what your ActiveCampaign setup will receive.