Skip to content

MailerLogic API (1.0.0)

Complete REST API for managing email delivery, tracking, and analytics.

Get started in minutes:

  1. Get your API key from your customer dashboard
  2. Send authenticated requests using the X-API-Key header
  3. Start sending emails via SMTP or API

For detailed guides, see the Getting Started section in the navigation.

Languages
Servers
US Data Center
https://api.mailerlogic.net
EU Data Center (coming soon)
https://eu-api.mailerlogic.net

Quickstart Guide

Get started with MailerLogic in minutes. This guide walks you through sending your first email.

Features Overview

MailerLogic provides enterprise-grade email delivery infrastructure with powerful APIs, deliverability optimization, and comprehensive analytics. Built by developers, for developers.


Email Sending

Send transactional and marketing emails via REST API. Simple API for sending individual emails with full tracking support.

Operations

Profile

Manage your customer profile, view usage limits, and rotate API keys. Start here to understand your account settings and available resources.

Operations

SMTP

Get SMTP credentials for sending emails directly through our mail servers. Use these endpoints to retrieve and rotate your SMTP passwords.

Operations

Sending Domains

Add and verify domains for sending authenticated emails. Configure SPF, DKIM, and DMARC records to improve deliverability.

Operations

Tracking Domains

Manage custom tracking domains for branded click and open tracking. Tracking domains allow you to use your own domain (e.g., track.yourdomain.com) instead of the default mailerlogic.net domain for tracking links and pixels.

Setup workflow:

  1. Create tracking domain
  2. Add CNAME record to DNS
  3. Verify DNS configuration
  4. SSL automatically provisions (1-2 minutes)
  5. Assign to sending domains
Operations

Statistics

Access detailed email delivery and engagement metrics. Query sends, bounces, opens, clicks, and spam complaints with flexible date filters.

Operations

Content Scoring

Analyze email content for spam patterns before sending. Get actionable feedback to improve deliverability scores.

Operations

Email Validation

Enterprise email validation API to reduce bounce rates and protect sender reputation. Real-time validation with syntax checking, domain verification, comprehensive disposable email detection, and MX record validation. Built-in intelligence to identify role accounts and suggest corrections for common typos.

Operations

Risk Assessment

Pre-send risk assessment API for Professional and Enterprise plans. Preview risk scores before sending emails to reduce bounce rates, improve deliverability, and maintain sender reputation. Get detailed risk analysis with actionable recommendations and enforcement policy insights.

Operations

Preview risk score before sending (advisory)

Request

Pre-send guidance to help you decide whether to send an email.

Returns a risk assessment with a would_block boolean that indicates whether the platform will block this email if you attempt to send it.

Important Contract:

  • This is advisory - you make the decision
  • If would_block = true, calling /api/v1/send will also block for the same reason
  • If would_block = false but risk is medium/high, you can still choose to send
  • Platform may throttle/warn on high risk sends depending on your plan

Risk Score Ranges:

  • 0-29: Safe (send)
  • 30-49: Low risk (warn)
  • 50-69: Medium risk (soft block - customer can override)
  • 70-100: High/Critical risk (hard block)

Hard Blocks (would_block = true):

  • Known spamtraps (spamtrap_detected)
  • Previous spam complaints (previous_complaint)
  • High-confidence disposable domains > 0.85 (disposable_high_confidence)
  • Sender verification failure if enabled (sender_not_verified)
  • Risk score >= 70 (risk_score_critical)

Stable Reason Codes (for programmatic handling):

  • disposable_high_confidence - Disposable domain with 90%+ confidence
  • disposable_medium_confidence - Disposable domain with 50-89% confidence
  • sender_not_verified - DKIM/SPF not verified
  • spamtrap_detected - Known spamtrap address
  • previous_complaint - Recipient marked previous email as spam
  • previous_hard_bounce - Hard bounce on previous send
  • content_risk_high - High spam content score
  • velocity_first_send_bulk - First send attempt is bulk email
  • volume_spike - Unusual sending volume increase

Quota:

  • Available on Professional and Enterprise plans
  • Check /api/v1/risk/stats for usage and remaining quota
Security
ApiKeyAuth
Bodyapplication/jsonrequired
tostring(email)required

Recipient email address

Example: "user@example.com"
subjectstringrequired

Email subject line

Example: "Welcome to our platform"
htmlstring

HTML content (optional)

Example: "<p>Welcome to our platform!</p>"
textstring

Plain text content (optional)

Example: "Welcome to our platform!"
is_bulkboolean

Whether this is bulk/marketing email

Default false
curl -i -X POST \
  https://api.mailerlogic.net/api/v1/risk/preview \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "to": "user@example.com",
    "subject": "Welcome to our platform",
    "html": "<p>Welcome to our platform!</p>",
    "text": "Welcome to our platform!",
    "is_bulk": false
  }'

Responses

Risk score calculated successfully

Bodyapplication/json
risk_scoreinteger[ 0 .. 100 ]required

Overall risk score (0-100)

Example: 15
risk_levelstringrequired

Risk level category

Enum"safe""low""medium""high"
Example: "safe"
would_blockbooleanrequired

Critical field: Indicates if /api/v1/send will block this email. If true, calling /send will result in the same block with the same reason_code.

Example: false
actionstringrequired

Platform decision on this send:

  • allow: Will send without warnings
  • warn: Will send but risk warning shown in logs/dashboard
  • soft_block: Platform will block /send unless customer takes explicit corrective action (verify domain, remove recipient, fix content). Not the same as "warn" - this requires action.
  • block: Hard block - cannot send under any circumstances
Enum"allow""warn""soft_block""block"
Example: "allow"
reason_codestring or null

Stable machine-readable reason code (null if allowed). Use this for programmatic decision-making.

Enumnull"disposable_high_confidence""disposable_medium_confidence""sender_not_verified""spamtrap_detected""previous_complaint""previous_hard_bounce""content_risk_high""velocity_first_send_bulk""volume_spike"
Example: null
block_reasonstring or null

Human-readable explanation (null if allowed)

Example: null
risk_factorsArray of objects

Detailed breakdown of risk factors that contributed to score

breakdownobject

Risk score breakdown by category

recommendationsArray of strings

Actionable recommendations to reduce risk

Example: ["Consider verifying sender domain with DKIM/SPF","Review content for spam triggers"]
policy_snapshotobject

Enforcement policy settings at time of preview. Use this to correlate why an old preview doesn't match a later /send if settings changed.

engine_versionstring

Risk scoring engine version for tracking/debugging

Example: "risk-v3.2"
quotaobject

Current Risk API quota status

Response
application/json
{ "risk_score": 15, "risk_level": "safe", "would_block": false, "action": "allow", "reason_code": null, "block_reason": null, "risk_factors": [ {} ], "breakdown": { "recipient": 5, "content": 5, "sender": 0, "behavior": 0 }, "recommendations": [], "policy_snapshot": { "block_disposable_emails": true, "enforce_sender_verification": true, "disposable_confidence_threshold": 0.85, "customer_plan": "professional" }, "engine_version": "risk-v3.2", "quota": { "used": 43, "limit": 1000, "remaining": 957, "reset_at": "2025-02-01T00:00:00Z" } }

Request

Retrieve usage statistics, trends, and risk analytics for the Risk Score API.

Information provided:

  • Current quota (used/limit/remaining/reset_at)
  • Top risk factors detected in your previews
  • Average risk score across all previews
  • Breakdown of risk categories (recipient/content/sender/behavior)
  • Block rate statistics

Use this to:

  • Monitor API quota consumption
  • Understand common risk patterns in your sends
  • Identify areas for improvement (e.g., "30% of risk from unverified senders")
  • Plan list cleaning or content optimization strategies
Security
ApiKeyAuth
curl -i -X GET \
  https://api.mailerlogic.net/api/v1/risk/stats \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Statistics retrieved successfully

Bodyapplication/json
enabledbooleanrequired

Whether risk API is enabled for this customer

Example: true
quotaobjectrequired
quota.​limitintegerrequired

Monthly API call limit

Example: 1000
quota.​usedintegerrequired

API calls used this month

Example: 247
quota.​remainingintegerrequired

API calls remaining this month

Example: 753
quota.​reset_atstring(date-time)required

When quota resets (typically start of next month)

Example: "2025-02-01T00:00:00Z"
analyticsobject

Risk analytics across all previews this month

top_factorsArray of objects

Most common risk factors detected (top 5)

Example: [{"reason_code":"disposable_medium_confidence","count":45,"percentage":18.2},{"reason_code":"sender_not_verified","count":38,"percentage":15.4},{"reason_code":"content_risk_medium","count":23,"percentage":9.3}]
Response
application/json
{ "enabled": true, "quota": { "limit": 1000, "used": 247, "remaining": 753, "reset_at": "2025-02-01T00:00:00Z" }, "analytics": { "total_previews": 247, "average_risk_score": 28.5, "would_block_count": 12, "would_block_percentage": 4.9, "breakdown": {} }, "top_factors": [ {}, {}, {}, {}, {} ] }

Events

🔒 Enterprise Feature - Query email lifecycle events with human engagement detection and device analytics.

Operations

Suppressions

Manage system-level suppressions for bounces and spam complaints.

Suppression Types:

  • Hard Bounces: Permanent delivery failures (automatically added by the system)
  • Soft Bounces: Temporary delivery failures (automatically added after threshold)
  • Complaints: Spam complaints and feedback loop reports

Suppression Scope:

  • Global: Applies to ALL your domains (when no domain_id specified)
  • Domain-specific: Applies to a specific domain only

Key Features:

  • Automatic bounce and complaint handling
  • Whitelist management to override suppressions
  • List all suppressions with filtering
  • Manual suppression management

Automated list hygiene to protect your sender reputation and ensure compliance.

Operations

Unsubscribes

Manage user consent and opt-out preferences.

User-Initiated Opt-Outs:

  • Unsubscribe link clicks in emails
  • API-based unsubscribe requests
  • Domain-specific or global unsubscribe preferences

Unsubscribe Scope:

  • Global: User opts out from ALL your domains
  • Domain-specific: User opts out from a specific domain only

Key Features:

  • Add emails to unsubscribe list
  • Remove (re-subscribe) emails
  • List all unsubscribed emails with filtering
  • Automatic enforcement during email sending

Ensures compliance with CAN-SPAM, GDPR, and other anti-spam regulations.

Operations

Health Score

Monitor your account's email health and engagement quality metrics. Get a 0-100 score with reputation grade (A+ to F) and actionable insights.

Operations

Tracking

Public endpoints for open and click tracking. These are called automatically by email clients - no authentication required.

Operations

Outbound Webhooks

MailerLogic sends real-time webhook notifications to your configured endpoint for all email events.

Webhook Scopes:

Customer-Level Webhooks (domain_ids = null or [])

  • Receives events from ALL domains
  • Simplest setup for single-backend applications

Single Domain Webhooks (domain_ids = [uuid])

  • Receives events from ONE specific domain
  • Useful for isolated domains

Domain Group Webhooks (domain_ids = [uuid1, uuid2, ...])

  • Receives events from MULTIPLE specific domains
  • Perfect for grouping related domains when webhook endpoint limits apply
  • Example: Plan has 20 domains, 5 webhook limit → group marketing domains, support domains, etc.

Mixed Approach

  • You can combine all three types
  • Domain-specific/group webhooks fire first, then customer-level
  • Maximize efficiency with limited webhook endpoints

Create customer-level webhook (all domains):

curl -X POST https://api.mailerlogic.net/api/v1/customer/webhooks \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/mailerlogic",
    "events": ["email.delivered", "email.opened", "email.clicked", "email.bounced", "email.complained"],
    "name": "Production Webhook",
    "domain_ids": null,
    "is_active": true
  }'

Create domain group webhook (multiple domains):

curl -X POST https://api.mailerlogic.net/api/v1/customer/webhooks \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://marketing.example.com/webhook",
    "events": ["email.opened", "email.clicked"],
    "name": "Marketing Domains Group",
    "domain_ids": [
      "550e8400-e29b-41d4-a716-446655440001",
      "550e8400-e29b-41d4-a716-446655440002",
      "550e8400-e29b-41d4-a716-446655440003"
    ],
    "is_active": true
  }'

Create single domain webhook:

curl -X POST https://api.mailerlogic.net/api/v1/customer/webhooks \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://support.example.com/webhook",
    "events": ["email.delivered", "email.bounced"],
    "name": "Support Domain Only",
    "domain_ids": ["550e8400-e29b-41d4-a716-446655440000"],
    "is_active": true
  }'

All webhook events include:

  • event - Event type (e.g., "email.delivered", "email.opened")
  • timestamp - ISO 8601 timestamp
  • email_id - UUID of the email (except unsubscribe events)
  • tag - Optional tag for filtering/grouping (if provided when sending)
  • metadata - Optional custom metadata object (if provided when sending)

Events sent to your endpoint:

Operations