Pricing
Documentation

Build with Mailfra

Everything you need to integrate cold email infrastructure into your product. A complete REST API reference, copy-ready code samples and guides.

Quick start

Three steps from a key to a running campaign.

  1. 1

    Get your API key

    Shell
    # No SDK required! Use the REST API directly
    # Get your API key from Settings > API Keys
    
    # Your API key format: sk_live_xxxxxxxxxxxxxxxx
  2. 2

    Set up the client

    JavaScript
    // Set your API key as an environment variable
    // MAILFRA_API_KEY=sk_live_xxxxxxxxxxxxxxxx
    
    const API_KEY = process.env.MAILFRA_API_KEY
    const BASE_URL = "https://mailfra.com/api/v1"
    
    // Helper function for API calls
    async function mailfraAPI(endpoint, options = {}) {
      const response = await fetch(`${BASE_URL}${endpoint}`, {
        ...options,
        headers: {
          "Authorization": `Bearer ${API_KEY}`,
          "Content-Type": "application/json",
          ...options.headers,
        },
      })
      return response.json()
    }
  3. 3

    Create your first campaign

    JavaScript
    // Create a campaign
    const campaign = await mailfraAPI("/campaigns", {
      method: "POST",
      body: JSON.stringify({
        name: "Q1 2024 Outreach",
        description: "Follow up with new leads",
      })
    })
    
    // Add prospects to campaign
    await mailfraAPI("/prospects/bulk", {
      method: "POST",
      body: JSON.stringify({
        campaignId: campaign.id,
        prospects: [
          { email: "john@company.com", firstName: "John", company: "Acme Inc" },
          { email: "jane@tech.com", firstName: "Jane", company: "TechCorp" }
        ]
      })
    })
    
    // Launch campaign
    await mailfraAPI(`/campaigns/${campaign.id}/launch`, { method: "POST" })
Get your API key from settings

Core features

API reference

Complete reference for all Mailfra API endpoints.

Campaigns

  • GET
    /api/campaigns

    List all campaigns

  • POST
    /api/campaigns

    Create a campaign

  • POST
    /api/campaigns/:id/launch

    Launch campaign

  • POST
    /api/campaigns/:id/pause

    Pause campaign

  • GET
    /api/campaigns/:id/stats

    Get statistics

Prospects

  • POST
    /api/prospects/upload

    Bulk upload prospects

  • POST
    /api/research/prospect

    Research a prospect

  • POST
    /api/research/batch

    Batch research

Sequences

  • POST
    /api/sequences/create

    Create sequence

  • POST
    /api/campaigns/:id/sequence-triggers

    Add triggers

  • POST
    /api/campaigns/:id/automation-rules

    Add automation

AI tools

  • POST
    /api/generate/email

    Generate email content

  • POST
    /api/predict/email-performance

    Predict performance

  • POST
    /api/ai/sequence-recommendations

    Get sequence recommendations

Email accounts

  • GET
    /api/settings/sending-accounts

    List email accounts

  • POST
    /api/oauth/gmail

    Connect Gmail

  • POST
    /api/oauth/outlook

    Connect Outlook

Domains

  • GET
    /api/domains

    List domains

  • POST
    /api/domains

    Add domain

  • GET
    /api/domains/:id

    Check domain health

Warmup

  • GET
    /api/warmup/stats

    Get warmup statistics

  • GET
    /api/warmup/emails

    List warmup emails

  • POST
    /api/warmup/emails

    Send warmup email

Analytics

  • GET
    /api/campaigns/:id/emails

    Get campaign emails

  • GET
    /api/crm/stats

    Get CRM statistics

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header.

Example request
curl https://mailfra.com/api/v1/campaigns \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json"

API key format

API keys start with sk_live_ followed by a unique identifier. Keys are hashed with SHA-256 for security.

Security best practices

  • Never expose API keys in client-side code
  • Rotate keys regularly
  • Use environment variables

Rate limits

Limits follow your plan and are applied per API key, to keep usage fair and the platform stable.

Free

100

requests/hour

Starter

1,000

requests/hour

Pro

10,000

requests/hour

Agency

100,000

requests/hour

Every API response includes headers to help you track your rate limit status:

Response headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 995
X-RateLimit-Reset: 1640995200

Webhooks

Receive real-time notifications when events happen in your account.

  • email.sent

    Email successfully sent to prospect

  • email.opened

    Prospect opened your email

  • email.clicked

    Prospect clicked a link

  • email.replied

    Prospect replied to your email

  • email.bounced

    Email bounced or failed

  • campaign.completed

    Campaign finished sending

Webhook payload example
{
  "event": "email.opened",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "emailId": "eml_abc123",
    "campaignId": "cmp_xyz789",
    "prospectId": "prs_def456",
    "prospectEmail": "john@company.com",
    "openedAt": "2024-01-15T10:30:00Z",
    "userAgent": "Mozilla/5.0...",
    "ipAddress": "203.0.113.0"
  }
}

REST API integration

Use any HTTP client in any language. No SDK required.

  • JavaScript

    fetch() / axios

    Node.js and browser

  • Python

    requests / httpx

    Any Python version

  • cURL

    Command line

    Shell scripts

  • Any language

    HTTP POST / GET

    Universal REST

Ready to get started?

Sign up for free and get your API key in seconds. No credit card required.