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

Request

Send the same email template to multiple recipients with personalization.

Mail merge functionality for:

  • Newsletters with personalized greetings
  • Marketing campaigns with custom variables
  • Bulk transactional emails with recipient-specific data

Features:

  • Template variables: Use {{variable}} syntax in subject, HTML, and text
  • Per-recipient personalization via vars object
  • Automatic variable substitution for each recipient
  • Single template, many recipients
  • File attachments (same for all recipients)
  • Calendar invites (same for all recipients)

Limits:

  • Recommended: Up to 10,000 recipients per call
  • Each recipient gets their own personalized copy

Use cases:

  • Newsletter campaigns: "Hi {{name}}, check out our new {{product}}..."
  • Promotional emails with unique discount codes
  • Event invitations with personalized details

Not for: Different emails to each recipient → Use /api/batch instead

Security
ApiKeyAuth
Bodyapplication/jsonrequired
subjectstringrequired

Email subject with optional variables {{name}}

Example: "Hello {{name}}! Special offer inside"
htmlstring

HTML email body with variables

Example: "<h1>Hi {{name}}</h1><p>Use code <strong>{{code}}</strong> for 20% off!</p>"
textstring

Plain text email body with variables

Example: "Hi {{name}}, Use code {{code}} for 20% off!"
fromstring(email)

From email (must use verified domain, optional)

Example: "hello@mail.yourdomain.com"
domainstring

Sending domain (optional - auto-extracted from from email if not provided). If provided, must match the domain in from email address.

Example: "mail.yourdomain.com"
reply_tostring(email)

Reply-to address

Example: "support@yourdomain.com"
track_opensboolean

Enable open tracking (default: true)

Default true
Example: true
track_clicksboolean

Enable click tracking (default: true)

Default true
Example: true
tagstring

Tag for organizing/filtering emails

Example: "holiday-sale-2025"
stream_typestring

Stream type is locked to broadcast for bulk sending. Bulk/mail merge emails are marketing/newsletter content and must use the broadcast stream to protect transactional IP reputation.

Default "broadcast"
Value"broadcast"
Example: "broadcast"
attachmentsArray of objects

File attachments sent with every email (sent directly, not stored). Same attachments sent to all recipients.

icalEventstring

iCal calendar event in RFC 5545 format (sent directly, not stored). Same calendar invite sent to all recipients.

recipientsArray of objectsrequired

Array of recipients with personalization variables

Example: [{"email":"john@example.com","vars":{"name":"John","code":"JOHN20"}},{"email":"jane@example.com","vars":{"name":"Jane","code":"JANE20"}}]
recipients[].​emailstring(email)required

Recipient email address

Example: "user@example.com"
recipients[].​varsobject

Variables for this recipient

Example: {"name":"John Doe","code":"SAVE20","product":"Premium Plan"}
curl -i -X POST \
  https://api.mailerlogic.net/api/v1/bulk-send \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "subject": "Hello {{name}}! Special offer inside",
    "html": "<h1>Hi {{name}}</h1><p>Use code <strong>{{code}}</strong> for 20% off!</p>",
    "text": "Hi {{name}}, Use code {{code}} for 20% off!",
    "from": "hello@mail.yourdomain.com",
    "track_opens": true,
    "track_clicks": true,
    "tag": "holiday-sale-2025",
    "stream_type": "broadcast",
    "recipients": [
      {
        "email": "john@example.com",
        "vars": {
          "name": "John",
          "code": "JOHN20"
        }
      },
      {
        "email": "jane@example.com",
        "vars": {
          "name": "Jane",
          "code": "JANE20"
        }
      }
    ]
  }'

Responses

Bulk send request accepted

Bodyapplication/json
successboolean
Example: true
queuedinteger

Number of emails queued

Example: 2
resultsArray of objects

Array of queued email IDs

Response
application/json
{ "success": true, "queued": 2, "results": [ {}, {} ] }

Request

Send a test email with intelligent defaults based on domain health.

Features:

  • Supports 3 test modes: basic, standard, full
  • Auto-disables tracking based on test mode
  • Basic spam word detection (not comprehensive scoring)
  • Returns warnings and recommendations
  • Provides next steps for new domains

Test Modes:

  • basic: Disables all tracking regardless of request. Best for new domains.
  • standard: Disables open tracking, enables click tracking. For warming domains.
  • full: Honors your tracking preferences. For established domains.

Best Practice:

  1. Call /api/v1/customer/domains/test-readiness/:domain_id first
  2. Use the recommended test mode
  3. Review warnings before sending
  4. Follow next steps provided in response

Content Analysis: Set analyze_content: true to receive basic spam word warnings.

Note: This endpoint performs only basic spam detection. For comprehensive content scoring with detailed analysis, use POST /api/content-score (subject to tier limits).

Security
ApiKeyAuth
Bodyapplication/jsonrequired
domain_idstring(uuid)required

Domain ID

fromstring(email)required

From email address

tostring(email)required

To email address

subjectstring

Email subject (default "Test Email")

htmlstring

HTML content

textstring

Plain text content

track_opensboolean

Enable open tracking (overridden by test_mode)

track_clicksboolean

Enable click tracking (overridden by test_mode)

test_modestring

Test mode to use (recommended from test-readiness API)

Enum"basic""standard""full"
analyze_contentboolean

Run basic spam word detection (not full content scoring)

Default true
curl -i -X POST \
  https://api.mailerlogic.net/api/v1/customer/test-email \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "domain_id": "d1234567-e89b-12d3-a456-426614174000",
    "from": "test@mail.example.com",
    "to": "you@gmail.com",
    "subject": "Test Email",
    "text": "This is a test email.",
    "test_mode": "basic",
    "analyze_content": true
  }'

Responses

Test email queued successfully

Bodyapplication/json
messagestring
emailobject
domain_infoobject
warningsArray of objects
content_analysisobject or null

Basic spam detection results (not comprehensive scoring)

next_stepsArray of strings
Response
application/json
{ "message": "Test email queued successfully", "email": { "id": "e1234567-e89b-12d3-a456-426614174000", "from": "test@mail.example.com", "to": "you@gmail.com", "subject": "Test Email", "domain": "mail.example.com", "message_id": "<uuid@mail.example.com>", "status": "queued", "tracking": {} }, "domain_info": { "age_in_days": 3, "has_custom_tracking": false }, "warnings": [ {}, {} ], "content_analysis": { "basic_check_performed": true, "spam_words_found": 0, "note": "For detailed content scoring and analysis, use POST /api/content-score (subject to tier limits)" }, "next_steps": [ "Check your inbox and mark the email as 'Not Spam' if it lands in spam", "Send 2-3 more test emails to trusted addresses today", "Gradually increase sending volume over the next 2 weeks", "Monitor your domain health score regularly", "Consider setting up a custom tracking domain to improve deliverability" ] }

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

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