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

Automatic Retry Policy

Failed emails are automatically retried with exponential backoff:

  • Soft bounces: Retried up to 3 times over 24 hours
  • Temporary failures: Retried up to 5 times over 48 hours
  • Hard bounces: Not retried (permanent failure)

Retry Schedule:

  1. Immediate retry (0 minutes)
  2. Second attempt (15 minutes)
  3. Third attempt (1 hour)
  4. Fourth attempt (4 hours)
  5. Final attempt (24 hours)

After all retries are exhausted, the email status becomes failed.

Request

Send a single transactional or marketing email via REST API.

Simple API for sending emails with:

  • Automatic queuing and delivery
  • Built-in tracking (opens & clicks)
  • File attachments (PDF, ZIP, images, documents)
  • Calendar invites (iCal/RFC 5545)
  • Template variable support
  • Custom headers
  • Full bounce and complaint handling

Requirements:

  • Verified sending domain
  • Active customer account
  • Valid API key

Auto-domain selection: If you don't specify a domain, we'll automatically use your first verified domain.

Security
ApiKeyAuth
Bodyapplication/jsonrequired
domainstring

Sending domain (optional - auto-selects first verified domain if omitted)

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

From email address (defaults to noreply@domain)

Example: "hello@mail.yourdomain.com"
tostring(email)required

Recipient email address

Example: "user@example.com"
reply_tostring(email)

Reply-to email address

Example: "support@yourdomain.com"
ccArray of strings(email)

CC recipients

Example: ["manager@example.com"]
bccArray of strings(email)

BCC recipients (hidden from other recipients)

Example: ["archive@yourdomain.com"]
subjectstringrequired

Email subject line

Example: "Welcome to our platform!"
htmlstring

HTML email body

Example: "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
textstring

Plain text email body (fallback for non-HTML clients)

Example: "Welcome! Thanks for signing up."
track_opensboolean

Enable open tracking (default: account setting)

Example: true
track_clicksboolean

Enable click tracking (default: account setting)

Example: true
headersobject

Custom email headers for the message.

Use cases:

  • Add custom headers like X-Order-ID, X-User-ID
  • Set Reply-To address
  • Add tracking or reference headers
  • Store structured data as JSON string

Webhook support: Headers are included in webhook payloads alongside metadata.

Note: Headers are sent with the email and included in webhooks. Use metadata for data that should NOT be sent in the email.

Example: {"X-Campaign-ID":"campaign-123","X-User-ID":"user-456","Reply-To":"support@example.com"}
tagstring

Tag for organizing emails (for analytics, not routing)

Example: "welcome-series"
stream_typestring

IP stream type for routing (default: shared)

  • transactional: High-priority emails (passwords, confirmations)
  • broadcast: Marketing campaigns and newsletters
  • shared: General purpose emails
Enum"transactional""broadcast""shared"
Example: "transactional"
metadataobject

Custom metadata (stored in database, NOT sent in email).

Use cases:

  • Link emails to orders, users, or resources in your system
  • Track campaign performance and ROI
  • Store application-specific context
  • Filter and analyze emails by custom attributes
  • Pass through data to your webhook handlers

Webhook support: Metadata is included in all webhook events (delivered, bounced, opened, clicked, complained, unsubscribed).

Difference from headers: Metadata is never sent in the email, while headers are included in the email message.

Example: {"user_id":"12345","order_id":"ord_789","campaign":"summer_sale","tier":"premium"}
attachmentsArray of objects

File attachments (PDF, ZIP, images, documents).

Important: Attachments are sent directly through SMTP without storing on server. Base64 encode your files and include them in the request.

  • Max per file: 10 MB (configurable)
  • Max total size: 25 MB (including HTML)
  • Supported: All file types
Example: [{"filename":"invoice.pdf","content":"JVBERi0xLjQK...","contentType":"application/pdf"},{"filename":"report.csv","content":"TmFtZSxFbWFpbC...","contentType":"text/csv"}]
icalEventstring

iCal calendar event in RFC 5545 format for meeting invites.

Native calendar support - works with Gmail, Outlook, Apple Mail:

  • Gmail: Shows "Add to Calendar" button
  • Outlook: Shows Accept/Decline/Tentative buttons
  • Apple Mail: Shows "Add to Calendar" button

Implementation: Sends as both text/calendar MIME alternative AND invite.ics attachment for maximum compatibility.

Important: Event is sent directly, not stored on server.

Example: "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//YourApp//Calendar//EN\nMETHOD:REQUEST\nCALSCALE:GREGORIAN\nBEGIN:VEVENT\nUID:meeting-123@yourdomain.com\nDTSTAMP:20250127T120000Z\nDTSTART:20250128T140000Z\nDTEND:20250128T150000Z\nSUMMARY:Team Meeting\nDESCRIPTION:Discuss Q1 goals\nLOCATION:Conference Room A\nORGANIZER;CN=Manager:mailto:manager@yourdomain.com\nATTENDEE;CN=Employee;RSVP=TRUE:mailto:employee@example.com\nSTATUS:CONFIRMED\nSEQUENCE:0\nBEGIN:VALARM\nTRIGGER:-PT15M\nACTION:DISPLAY\nDESCRIPTION:Reminder\nEND:VALARM\nEND:VEVENT\nEND:VCALENDAR\n"
curl -i -X POST \
  https://api.mailerlogic.net/api/v1/send \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "to": "user@example.com",
    "subject": "Welcome to our platform!",
    "html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
    "text": "Welcome! Thanks for signing up."
  }'

Responses

Email queued successfully

Bodyapplication/json
tostring(email)

Recipient email address

Example: "user@example.com"
submitted_atstring(date-time)

ISO 8601 timestamp when email was queued

Example: "2024-01-15T10:30:00Z"
message_idstring

RFC 5322 Message-ID header value

Example: "<650e8400-e29b-41d4-a716-446655440000@mail.yourdomain.com>"
email_idstring(uuid)

Unique email ID for tracking

Example: "650e8400-e29b-41d4-a716-446655440000"
statusstring

Current email status

Value"queued"
messagestring

Success message

Response
application/json
{ "to": "user@example.com", "submitted_at": "2024-03-15T14:30:00Z", "message_id": "<550e8400-e29b-41d4-a716-446655440000@mail.yourdomain.com>", "email_id": "550e8400-e29b-41d4-a716-446655440000", "status": "queued", "message": "Email queued for delivery" }

Request

Send up to 500 completely different emails in a single API call.

Batch sending where each email can have:

  • Different recipient
  • Different subject
  • Different content
  • Different settings
  • File attachments
  • Calendar invites

Perfect for sending multiple transactional emails at once (order confirmations, password resets, etc.).

Limits:

  • Maximum 500 emails per batch
  • Each email validated independently
  • Failed emails don't affect successful ones

Use cases:

  • Sending different transactional emails simultaneously
  • Mixed email types in one API call
  • High-volume transactional sending

Not for: Newsletter-style emails with same content → Use /api/bulk-send instead

Security
ApiKeyAuth
Bodyapplication/jsonrequired
emailsArray of objects<= 500 itemsrequired

Array of emails to send (max 500)

emails[].​tostring(email)required

Recipient email address

Example: "user@example.com"
emails[].​fromstring(email)

From email (must use verified domain, optional)

Example: "hello@mail.yourdomain.com"
emails[].​domainstring

Sending domain (optional - auto-selects if omitted)

Example: "mail.yourdomain.com"
emails[].​reply_tostring(email)

Reply-to address

Example: "support@yourdomain.com"
emails[].​ccArray of strings(email)

CC recipients

emails[].​bccArray of strings(email)

BCC recipients

emails[].​subjectstringrequired

Email subject

Example: "Your order has shipped"
emails[].​htmlstring

HTML email body

Example: "<h1>Order shipped!</h1>"
emails[].​textstring

Plain text body

Example: "Your order has shipped"
emails[].​track_opensboolean

Enable open tracking

emails[].​track_clicksboolean

Enable click tracking

emails[].​headersobject

Custom headers

emails[].​tagstring

Tag for organizing

emails[].​metadataobject
emails[].​attachmentsArray of objects

File attachments (sent directly, not stored)

emails[].​icalEventstring

iCal calendar event in RFC 5545 format (sent directly, not stored)

emails[].​stream_typestring

Stream type for delivery optimization:

  • transactional: Order confirmations, password resets, account notifications
  • broadcast: Marketing emails, newsletters, promotional campaigns
  • shared: General purpose (default)
Default "shared"
Enum"transactional""broadcast""shared"
curl -i -X POST \
  https://api.mailerlogic.net/api/v1/batch \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "emails": [
      {
        "to": "user1@example.com",
        "subject": "Order #12345 Confirmed",
        "html": "<h1>Thanks for your order!</h1><p>Order #12345</p>",
        "text": "Thanks for your order! Order #12345",
        "tag": "order-confirmation",
        "stream_type": "transactional",
        "metadata": {
          "order_id": "12345"
        }
      },
      {
        "to": "user2@example.com",
        "subject": "Password Reset Request",
        "html": "<h1>Reset Password</h1><p><a href='\''https://...'\''>Click here</a></p>",
        "text": "Reset your password: https://...",
        "tag": "password-reset",
        "stream_type": "transactional"
      },
      {
        "to": "user3@example.com",
        "from": "welcome@mail.yourdomain.com",
        "subject": "Welcome to our platform!",
        "html": "<h1>Welcome!</h1>",
        "text": "Welcome!",
        "tag": "welcome",
        "stream_type": "transactional"
      }
    ]
  }'

Responses

Batch processed (may include partial failures)

Bodyapplication/json
totalinteger

Total emails in batch

queuedinteger

Successfully queued emails

failedinteger

Failed emails

resultsArray of objects

Successfully queued emails

errorsArray of objects

Failed emails (only if any failed)

Response
application/json
{ "total": 2, "queued": 2, "failed": 0, "results": [ {}, {} ] }

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