MailOdds

Klaviyo + MailOdds

Validate subscriber emails to reduce Klaviyo bounces and protect sender reputation. Auto-suppress invalid addresses and clean lists before campaigns.

Setup time: 5-10 min
Difficulty: Beginner
1,000 free validations included

Prerequisites

  • MailOdds account with API key
  • Klaviyo account with private API key

Klaviyo Use Cases

Subscriber Validation

Validate emails when new profiles are added. Auto-suppress invalid addresses before they receive campaigns.

Pre-Campaign List Clean

Bulk validate a list before a major send. Remove bounces and protect your sender reputation.

Segment by Email Quality

Create Klaviyo segments based on validation status. Send to verified-only lists for critical campaigns.

Bounce Rate Reduction

Keep Klaviyo bounce rates under 0.5% by removing invalid emails proactively instead of after they bounce.

Step-by-Step Setup

1

Get Your API Keys

MailOdds API key from dashboard. Klaviyo private API key from Settings > API Keys.

2

Validate New Subscribers

When a profile is added in Klaviyo, call POST /v1/validate with their email address.

3

Check Validation Result

Inspect the response action field: accept, accept_with_caution, or reject.

4

Filter Invalid Emails

If action is reject, route the email to suppression. Optionally tag risky emails.

5

Suppress Invalid Profiles

Call the Klaviyo Suppress Profile API endpoint. Invalid emails will not receive future campaigns.

Validate a Klaviyo Subscriber Email

JAVASCRIPT
// Validate a Klaviyo profile email via MailOdds API
const profileEmail = 'subscriber@example.com'; // From Klaviyo profile

const response = await fetch('https://api.mailodds.com/v1/validate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ email: profileEmail })
});

const result = await response.json();

const isValid = result.action === 'accept';
const isRisky = result.action === 'accept_with_caution';

// Use result.status, result.action, result.sub_status
// to decide whether to suppress the profile in Klaviyo

Batch Validate a Klaviyo Segment

JAVASCRIPT
// Validate a segment of Klaviyo emails via batch API
const segmentEmails = [
  'user1@example.com',
  'user2@example.com',
  'user3@example.com'
]; // Fetched from Klaviyo Profiles API

const response = await fetch('https://api.mailodds.com/v1/validate/batch', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ emails: segmentEmails })
});
const batch = await response.json();

// Branch by action per result:
//   "reject"              -> Suppress profile in Klaviyo
//   "accept_with_caution" -> Tag as risky in Klaviyo
//   "accept"              -> No action needed
// Update Klaviyo profile custom property $email_validation

Auto-Suppress Invalid Emails

JAVASCRIPT
// Suppress invalid emails in Klaviyo after validation
// After calling POST /v1/validate, check the action field:

if (result.action === 'reject') {
  // Add to MailOdds suppression list
  await fetch('https://api.mailodds.com/v1/suppression', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      entries: [{ type: 'email', value: profileEmail, reason: 'invalid' }]
    })
  });

  // Then suppress the profile in Klaviyo via their API
  // This prevents invalid emails from receiving future campaigns,
  // protecting your sender reputation and reducing bounce rates.
}

Webhook Event Handling

Receive real-time MailOdds events and update Klaviyo profiles automatically. Handle bounces, opens, and clicks to keep engagement data accurate.

Understanding is_bot and is_mpp in Webhook Events

is_bot = true when the event came from a security scanner, link prefetcher, or corporate email gateway (not a human). Common with Barracuda, Proofpoint, and Mimecast.

is_mpp = true when the event came from Apple Mail Privacy Protection, which pre-fetches all images and inflates open counts. Affects roughly 50% of iOS/macOS mail users.

Both fields are Booleans on engagement events (opened, clicked). Always guard with == true since they may be absent on non-engagement events.

Handle MailOdds Webhook Events for Klaviyo

JAVASCRIPT
// Handle MailOdds webhook events and update Klaviyo profiles
// Configure your webhook endpoint to receive MailOdds events

function handleWebhook(payload) {
  const { event, to: email, is_bot, is_mpp } = payload;

  if (event === 'message.bounced') {
    // Add to MailOdds suppression list
    fetch('https://api.mailodds.com/v1/suppression', {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        entries: [{ type: 'email', value: email, reason: 'hard_bounce' }]
      })
    });

    // Then suppress the profile in Klaviyo via their Profiles API
  }

  if (event === 'message.opened' && !is_bot && !is_mpp) {
    // Real human open: update Klaviyo profile engagement
    // Set custom property "$last_validated_open" via Klaviyo API
  }

  return { event, email, is_bot, is_mpp };
}

Suppression Sync

Keep your MailOdds suppression list in sync with Klaviyo. Add bounced emails to your blocklist and check suppression status before sending campaigns.

Sync Suppression List with Klaviyo

JAVASCRIPT
// Sync MailOdds suppression list with Klaviyo
// Check if an email is suppressed before sending
const profileEmail = 'subscriber@example.com';

const checkRes = await fetch('https://api.mailodds.com/v1/suppression/check', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ email: profileEmail })
});
const check = await checkRes.json();

if (check.suppressed) {
  // Email is on blocklist: suppress in Klaviyo too via their API
  console.log('Suppressed:', profileEmail, 'Reason:', check.reason);
} else {
  console.log('Not suppressed:', profileEmail);
}

Engagement Enrichment

Push validation health metrics into Klaviyo profile properties. Track deliverable rates and validation counts as custom profile data for reporting.

Push Telemetry Data to Klaviyo Profiles

JAVASCRIPT
// Fetch validation health and push to Klaviyo profile properties
const response = await fetch('https://api.mailodds.com/v1/telemetry/summary', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const telemetry = await response.json();

// Use these values to update Klaviyo profile custom properties
// via the Klaviyo Profiles API:
//   "$validation_total"  = telemetry.totals.validations
//   "$deliverable_rate"  = telemetry.rates.deliverable
//   "$bounce_rate"       = telemetry.rates.undeliverable

const metrics = {
  total_validations: telemetry.totals.validations,
  deliverable_rate: telemetry.rates.deliverable,
  undeliverable_rate: telemetry.rates.undeliverable
};

Bulk List Validation

Validate your entire Klaviyo list before a campaign. Submit emails in batch, poll for results, and suppress or tag profiles based on outcomes.

Bulk Validate Klaviyo List

JAVASCRIPT
// Bulk validate a Klaviyo list before sending a campaign
// Step 1: Fetch list emails from Klaviyo via their Profiles API
// Step 2: POST batch to MailOdds
const listEmails = ['a@example.com', 'b@example.com']; // From Klaviyo

const response = await fetch('https://api.mailodds.com/v1/validate/batch', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    emails: listEmails,
    depth: 'enhanced'
  })
});
const batch = await response.json();

// Poll for results:
// GET /v1/validate/batch/{job_id} for status and results
console.log('Job ID:', batch.job_id, 'Count:', listEmails.length);

Full Platform: Deliverability Monitoring

Beyond list cleaning, MailOdds monitors sender health, DMARC compliance, and bounce patterns for the domains you send from in Klaviyo.

DMARC Monitoring

Track DMARC authentication pass/fail rates for the domains you send from in Klaviyo. Get early warning when SPF or DKIM alignment issues threaten your inbox placement.

Monitor DMARC for Your Klaviyo Sending Domain

JAVASCRIPT
// Monitor DMARC for your Klaviyo sending domain
const response = await fetch(
  'https://api.mailodds.com/v1/dmarc/domains/yourdomain.com/trend',
  { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const trend = await response.json();
// trend.policy, trend.data_points[].fail_percentage
// Alert if fail rate exceeds threshold

Related: DMARC Monitoring

Sender Health

Monitor your overall sender reputation across the domains you use in Klaviyo. Track bounce rates, complaint rates, and authentication health in one place.

Check Sender Health for Klaviyo Domains

JAVASCRIPT
// Check sender health for domains used in Klaviyo
const response = await fetch('https://api.mailodds.com/v1/sender-health', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const health = await response.json();
// health.reputation_score (0-100)
// health.bounce_rate, health.complaint_rate
// health.authentication_health

Related: Sender Reputation

Bounce Cross-Reference

Cross-reference bounced emails from Klaviyo campaigns with MailOdds bounce analysis. Classify bounces by type and auto-suppress confirmed hard bounces to protect your reputation.

Cross-Reference Klaviyo Bounces

JAVASCRIPT
// Cross-reference Klaviyo bounces with MailOdds data
const response = await fetch('https://api.mailodds.com/v1/bounce-analyses', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    emails: klaviyoBouncedEmails // Array of bounced emails from Klaviyo
  })
});
const analysis = await response.json();
// Classify: hard_bounce, soft_bounce, complaint
// Auto-suppress confirmed hard bounces

Related: Email Deliverability Platform

Inactive Contact Report

Identify contacts with no engagement over a configurable window. Use the report to trigger Klaviyo sunset flows or remove stale contacts from active lists.

Identify Inactive Klaviyo Contacts

JAVASCRIPT
// Identify inactive contacts for Klaviyo list hygiene
const response = await fetch(
  'https://api.mailodds.com/v1/contacts/inactive-report?days=90',
  { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const report = await response.json();
// report.inactive_count, report.inactive_percentage
// Use to trigger Klaviyo sunset flow or list cleanup

Related: Email Deliverability Platform

Frequently Asked Questions

Troubleshooting

Need more help?

Can't find what you're looking for? We're here to help you get Klaviyo working.

Improve Your Klaviyo Deliverability

Get 1,000 free validations. Clean your subscriber list and reduce bounces.