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
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
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
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" })
Core features
- Campaign managementCreate, schedule, and manage cold email campaigns with advanced sequencing
- Prospect managementImport, organize, and enrich prospect data with AI-powered insights
- Email sequencesBuild automated follow-up sequences with conditional logic and triggers
- AI toolsGenerate personalized emails, predict performance, and auto-assign sequences
- Analytics and trackingTrack opens, clicks, replies, and measure campaign performance in real-time
- DeliverabilityEmail warmup, domain health monitoring, and spam prevention tools
- WebhooksReal-time notifications for email events, replies, and bounces
- CRM integrationSync contacts with popular CRMs and manage your sales pipeline
API reference
Complete reference for all Mailfra API endpoints.
Campaigns
- GET
/api/campaignsList all campaigns
- POST
/api/campaignsCreate a campaign
- POST
/api/campaigns/:id/launchLaunch campaign
- POST
/api/campaigns/:id/pausePause campaign
- GET
/api/campaigns/:id/statsGet statistics
Prospects
- POST
/api/prospects/uploadBulk upload prospects
- POST
/api/research/prospectResearch a prospect
- POST
/api/research/batchBatch research
Sequences
- POST
/api/sequences/createCreate sequence
- POST
/api/campaigns/:id/sequence-triggersAdd triggers
- POST
/api/campaigns/:id/automation-rulesAdd automation
AI tools
- POST
/api/generate/emailGenerate email content
- POST
/api/predict/email-performancePredict performance
- POST
/api/ai/sequence-recommendationsGet sequence recommendations
Email accounts
- GET
/api/settings/sending-accountsList email accounts
- POST
/api/oauth/gmailConnect Gmail
- POST
/api/oauth/outlookConnect Outlook
Domains
- GET
/api/domainsList domains
- POST
/api/domainsAdd domain
- GET
/api/domains/:idCheck domain health
Warmup
- GET
/api/warmup/statsGet warmup statistics
- GET
/api/warmup/emailsList warmup emails
- POST
/api/warmup/emailsSend warmup email
Analytics
- GET
/api/campaigns/:id/emailsGet campaign emails
- GET
/api/crm/statsGet CRM statistics
Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header.
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:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 995
X-RateLimit-Reset: 1640995200Webhooks
Receive real-time notifications when events happen in your account.
email.sentEmail successfully sent to prospect
email.openedProspect opened your email
email.clickedProspect clicked a link
email.repliedProspect replied to your email
email.bouncedEmail bounced or failed
campaign.completedCampaign finished sending
{
"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() / axiosNode.js and browser
Python
requests / httpxAny Python version
cURL
Command lineShell scripts
Any language
HTTP POST / GETUniversal REST
Ready to get started?
Sign up for free and get your API key in seconds. No credit card required.