Email Deliverability API

Overview

The Email Deliverability API helps businesses and developers evaluate the readiness of email domains to ensure successful email communication. It analyzes DNS records such as SPF, DKIM, DMARC, and PTR, providing insights into a domain's email configuration to enhance security and deliverability.

Key Features

  • SPF Record Validation: Checks the Sender Policy Framework records to verify authorized email senders
  • DKIM Record Retrieval: Validates DomainKeys Identified Mail records for email authenticity
  • DMARC Record Check: Ensures proper domain-based message authentication configuration
  • PTR Record Lookup: Validates reverse DNS records for email server legitimacy
  • Scoring and Recommendations: Provides actionable insights for email security improvement

Use Cases

  • Email Deliverability Testing
  • Fraud Prevention
  • Security Compliance

Pricing Plans

Choose the right plan for your email deliverability needs with flexible pricing options

Basic

Free

1,000 Requests / Month

  • Email validation
  • Basic DNS checks
  • Structured JSON responses
RECOMMENDED

Pro

$4.99 /month

10,000 Requests / Month

  • Complete DNS validation
  • 10× more requests
  • Detailed improvement tips

Ultra

$9.99 /month

100,000 Requests / Month

  • Complete DNS validation
  • High-volume usage
  • Priority support

Mega

$19.99 /month

250,000 Requests / Month

  • Complete DNS validation
  • High-volume usage
  • Priority support

API Documentation

The Email Deliverability API provides comprehensive analysis of email domain configurations to improve deliverability and security. This documentation outlines how to integrate and use the API effectively.

Try It Now

Click the button below to run and test this API with Postman:

GET /deliverability

Analyzes DNS records of a domain (SPF, DKIM, DMARC, PTR) and provides a deliverability score along with actionable improvements.

Parameters

Parameter Type Description
domain string The domain name to evaluate (required)
ip string The IP address for PTR record validation (optional)

Example Request

GET /v1/check?domain=example.com HTTP/1.1
Host: email-deliverability-api.p.rapidapi.com
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: email-deliverability-api.p.rapidapi.com

Example Response

{
  "domain": "example.com",
  "score": 85,
  "improvements": [
    "Add a valid DKIM record to help verify the sender's identity.",
    "Configure a valid reverse DNS (PTR) record for better server reputation."
  ],
  "dns": {
    "spf": "v=spf1 include:_spf.example.com ~all",
    "dkim": {
      "default": "v=DKIM1; k=rsa; p=..."
    },
    "dmarc": "v=DMARC1; p=none; rua=mailto:[email protected]"
  },
  "dns_results": {
    "spf": true,
    "dkim": true,
    "dmarc": true
  },
  "reverse_dns": "mail.example.com",
  "ip_in_spf": true
}

Response Object Properties

Property Type Description
domain string The domain that was checked
score integer Overall deliverability score from 0-100
spf object SPF record information and validation results
dkim object DKIM record information and validation results
dmarc object DMARC record information and validation results
ptr object PTR record information and validation results
improvements array List of suggested improvements for email deliverability

Error Codes

  • 400 Bad Request: Missing required parameters or invalid domain
  • 500 Internal Server Error: An error occurred while processing the request

Use Cases

  • Email Deliverability Testing:

    Assess domain readiness to improve the likelihood of successful email delivery.

  • Fraud Prevention:

    Ensure SPF, DKIM, and DMARC records are configured correctly to prevent email spoofing and phishing.

  • Security Compliance:

    Confirm that email domains follow best practices in email security and server configuration.

Integration Examples

JavaScript (Node.js)

const axios = require('axios');

const options = {
  method: 'GET',
  url: 'https://email-deliverability-api.p.rapidapi.com/deliverability',
  params: {domain: 'example.com'},
  headers: {
    'X-RapidAPI-Key': 'YOUR_API_KEY',
    'X-RapidAPI-Host': 'email-deliverability-api.p.rapidapi.com'
  }
};

try {
  const response = await axios.request(options);
  console.log(response.data);
} catch (error) {
  console.error(error);
}
Python
import requests

url = "https://email-deliverability-api.p.rapidapi.com/deliverability"

querystring = {"domain":"example.com"}

headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "email-deliverability-api.p.rapidapi.com"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())

Best Practices

  • Implement caching: Cache API responses to reduce unnecessary API calls. Domain configurations rarely change more than once per day.
  • Handle timeouts gracefully: Some DNS lookups may take longer than expected. Consider increasing timeout parameters for critical operations.
  • Act on improvement suggestions: The API provides actionable recommendations. Implement these changes to improve email deliverability.
  • Verify multiple domains: If your organization sends emails from multiple domains, check all of them to ensure consistent deliverability.
  • Regular monitoring: Set up automated checks to monitor your domain's email deliverability score over time.

API Versioning

The current version of the Email Deliverability API is v1. We maintain backward compatibility for all minor updates within the same major version. Major version changes may include breaking changes.

Version Status Changes
v1 Current Initial release with core functionality

We will notify users at least 90 days before any deprecation of API versions.

Frequently Asked Questions

What do SPF, DKIM, and DMARC records do?

SPF (Sender Policy Framework) records specify which servers are authorized to send emails from your domain, helping prevent email spoofing. DKIM (DomainKeys Identified Mail) adds a digital signature to emails, verifying they haven't been tampered with in transit. DMARC (Domain-based Message Authentication, Reporting & Conformance) specifies how receiving servers should handle emails that fail SPF or DKIM checks, providing an extra layer of protection against phishing and spoofing.

How is the deliverability score calculated?

The deliverability score is calculated based on the presence and proper configuration of essential DNS records (SPF, DKIM, DMARC), the validity of PTR records, and the overall health of the domain's email infrastructure. The score ranges from 0-100, with higher scores indicating better deliverability prospects. Each component contributes to the overall score, with properly configured security records significantly boosting the rating.

What's the importance of the PTR record?

A PTR (Pointer) record, also known as reverse DNS, maps an IP address back to a domain name. Many email servers check PTR records to verify that incoming messages are coming from legitimate servers. Without a valid PTR record, your emails may be flagged as spam or rejected entirely by receiving servers. The PTR record should match the domain used in your email's HELO/EHLO commands for best deliverability results.

How can I implement the suggested improvements?

The API provides specific improvement suggestions based on your domain's current configuration. To implement these improvements, you'll typically need to add or modify DNS records through your domain registrar or DNS hosting provider. For SPF, DKIM, and DMARC records, you'll need to add TXT records with specific formats. For PTR records, you may need to contact your email hosting provider or ISP, as these records are typically managed at the IP level rather than the domain level.

How often should I check my domain's deliverability?

It's recommended to check your domain's deliverability at least monthly, especially for businesses that rely heavily on email communication. Additionally, you should check after making any changes to your email infrastructure, DNS records, or when switching email service providers. Regular monitoring helps ensure that your email configuration remains optimal and allows you to quickly address any issues that might affect deliverability.

Integrations Coming Soon

Connect our powerful APIs with your favorite platforms for seamless workflow automation

Zapier

Connect with 3,000+ apps

Make.com

Create complex automation workflows

Power Automate

Microsoft's enterprise automation

n8n

Open-source workflow automation

Want to see us integrate with your favorite platform? Let us know!