Getting Started

API Documentation

Build powerful email workflows with the MailMimo API. All 49 endpoints documented.

1. Get your API key

Sign up at mailmimo.xyz and go to Settings > API Keys. Create a key with the permissions you need.

2. Make your first request

cURL
curl https://mailmimo.xyz/api/dashboard/stats \
 -H "Authorization: Bearer cr_your_api_key_here"

3. Base URL

https://mailmimo.xyz/api

Authentication

All API requests require a Bearer token. Use an API Key (recommended) or a JWT token from login.

API Key (recommended)
Authorization: Bearer cr_your_api_key_here
JWT Token
Authorization: Bearer eyJhbG...

Errors & Rate Limits

CodeMeaning
200Success
400Bad Request - missing or invalid fields
401Unauthorized - invalid or missing token
402Insufficient Credits
404Not Found
409Conflict - duplicate resource
429Rate Limited
500Server Error

Rate limits: 60 req/min general, 10 req/min for auth endpoints.

Register

POST/auth/register

Create a new account. Requires verification code from /auth/send-code.

Request Body
{ "name": "John Doe", "email": "john@example.com", "password": "securepass123", "code": "123456" }
Response
{ "token": "eyJhbG...", "user": { "id": "...", "name": "John", "email": "john@example.com", "role": "user" } }

Login

POST/auth/login
Request Body
{ "email": "john@example.com", "password": "securepass123" }
Response
{ "token": "eyJhbG...", "user": { "id": "...", "email": "john@example.com", "name": "John", "role": "user", "creditsRemaining": 100 } }

Get Profile

GET/auth/me
Response
{ "id": "usr_abc", "name": "John", "email": "john@example.com", "plan": "pro", "role": "user", "creditsRemaining": 950 }

Dashboard Stats

GET/dashboard/stats

Get overview statistics for the current user.

Response
{ "stats": { "totalContacts": 150, "activeCampaigns": 3, "emailsSent": 1200, "openRate": 45.5, "replyRate": 8.2 } }

List Campaigns

GET/campaigns
Response
{ "campaigns": [{
 "id": "cmp_abc", "name": "Q1 Outreach", "status": "active",
 "list": { "id": "...", "name": "Prospects" },
 "sequences": [...],
 "emailStats": { "total": 100, "sent": 95, "failed": 2, "bounced": 3, "queued": 0 }
}] }

Create Campaign

POST/campaigns
Request Body
{
 "name": "Q1 Outreach",
 "listId": "list_abc",
 "sequences": [
 { "templateId": "tpl_1", "delayDays": 0 },
 { "templateId": "tpl_2", "delayDays": 3, "conditionType": "not_opened" }
 ],
 "schedule": { "timezone": "UTC", "sendHour": 9 }
}
Response
{ "campaign": { "id": "cmp_abc", "name": "Q1 Outreach", "status": "draft", "sequences": [...] } }

Start Campaign

POST/campaigns/{id}/start

Start a draft campaign. Validates email accounts exist and enforces rate limits (free: 10/hr, pro: 100/hr).

Response
{ "success": true, "message": "Campaign started successfully" }

Quick Send

POST/campaigns/quick-send

Create and start a campaign in one step. Max 500 recipients.

Request Body
{
 "campaign_name": "Quick Test",
 "subject": "Hello {{firstName}}",
 "body": "<p>Hi {{firstName}}, welcome!</p>",
 "recipients": ["a@test.com", "b@test.com"]
}
Response
{ "success": true, "campaign_id": "cmp_xyz", "stats": { "total": 50, "queued": 50 }, "credits_remaining": 900 }

Contact Lists

GET/contacts

Get all contact lists for the current user.

Response
{ "lists": [{
 "id": "list_abc", "name": "Prospects", "contactCount": 150,
 "createdAt": "2026-01-01T00:00:00Z", "_count": { "contacts": 150 }
}] }

Create List + Contacts

POST/contacts

Create a new contact list with optional bulk contacts (max 10,000).

Request Body
{
 "name": "Anthropic Leads",
 "contacts": [
 { "email": "john@anthropic.com", "firstName": "John", "lastName": "Doe", "company": "Anthropic", "title": "Engineer" },
 { "email": "jane@anthropic.com", "firstName": "Jane", "lastName": "Smith", "company": "Anthropic", "title": "PM" }
 ]
}
Response
{ "list": { "id": "list_abc", "name": "Anthropic Leads", "contacts": [...] } }

Get / Update / Delete Contact

GET/contacts/{id}
Response
{ "contact": {
 "id": "...", "email": "john@example.com", "firstName": "John", "lastName": "Doe",
 "company": "Anthropic", "title": "Engineer", "industry": "AI",
 "customFields": {}, "verificationStatus": "valid",
 "createdAt": "...", "listId": "...", "listName": "Prospects"
} }
PATCH/contacts/{id}
Request Body (all fields optional)
{ "email": "new@example.com", "firstName": "John", "lastName": "Doe", "company": "NewCo", "title": "CTO", "industry": "Tech" }
DELETE/contacts/{id}

Returns { "success": true }. Decrements list contactCount.

Bulk Actions

POST/contacts/bulk

Delete or move multiple contacts at once (max 1000).

Request Body - Delete
{ "action": "delete", "contactIds": ["id1", "id2", "id3"] }
Request Body - Move
{ "action": "move", "contactIds": ["id1", "id2"], "targetListId": "list_xyz" }

Move Contact

POST/contacts/{id}/move
Request Body
{ "targetListId": "list_xyz" }

List Detail / Delete

GET/contacts/list/{id}

Get list info and all contacts in it.

Response
{ "list": { "id": "...", "name": "Prospects", "contactCount": 150, "createdAt": "..." },
 "contacts": [{ "id": "...", "email": "...", "firstName": "...", "lastName": "...", "company": "...", "title": "...", "verificationStatus": "..." }]
}
DELETE/contacts/list/{id}

Delete list and all contacts in it (cascade). Returns { "success": true, "message": "List deleted" }.

Leads to Contacts

POST/leads/to-contacts

Convert discovered leads into contacts. Provide one of: listId, listName (creates new list), or campaignId (uses campaign's list).

Request Body
{
 "leads": [
 { "email": "john@anthropic.com", "firstName": "John", "lastName": "Doe", "company": "Anthropic", "title": "Engineer" }
 ],
 "listName": "Anthropic Leads"
}
Response
{ "created": 10, "errors": 2, "errorDetails": [{ "email": "dup@example.com", "error": "Already exists in list" }], "listId": "list_abc" }

Verify Email

POST/verify

Verify email deliverability: syntax, MX records, disposable check, role-based, catch-all. Costs 1 credit per email.

Request Body
{ "email": "user@example.com" }
Response
{
 "email": "user@example.com", "is_valid": true, "syntax_valid": true,
 "mx_found": true, "is_disposable": false, "is_role_based": false,
 "is_catch_all": false, "confidence": 95, "credits_remaining": 99
}

Email Finder

POST/email-finder

Find email addresses associated with a domain. Costs 2 credits.

Request Body
{ "domain": "anthropic.com" }

AI Generate Email

POST/ai/generate-email

Use AI to generate personalized cold emails. Costs 1 credit.

Request Body
{
 "contactName": "John Doe",
 "company": "Anthropic",
 "productService": "Email outreach platform",
 "title": "CTO",
 "industry": "AI",
 "valueProposition": "10x reply rates",
 "language": "en"
}
Response
{ "emails": [{ "subject": "...", "body": "..." }] }

Domain Management

GET/domains|POST/domains

Manage sending domains for email authentication.

GET Response
{ "domains": [{
 "id": "...", "domain": "mailmimo.xyz", "spfVerified": true, "dkimVerified": true,
 "dmarcVerified": true, "verified": true, "dnsRecords": [...]
}] }
POST - Add Domain
{ "domain": "mail.example.com" }

Verify Domain

POST/domains/{id}/verify

Check SPF, DKIM, and DMARC DNS records for a domain.

Response
{ "domain": { "id": "...", "domain": "example.com", "spfVerified": true, "dkimVerified": false, "dmarcVerified": true }, "dnsRecords": [...] }

Email Accounts

GET/email-accounts|POST/email-accounts|PUT/email-accounts|DELETE/email-accounts

Connect and manage SMTP email accounts for sending.

POST - Create Account
{
 "email": "sender@example.com",
 "provider": "smtp",
 "credentials": { "host": "smtp.example.com", "port": 465, "user": "sender@example.com", "pass": "password" },
 "dailyLimit": 50,
 "warmupEnabled": true
}
Response
{ "account": { "id": "...", "email": "sender@example.com", "provider": "smtp", "dailyLimit": 50, "warmupEnabled": true, "healthScore": 100 } }

Test Connection

POST/email-accounts/test-connection

Test SMTP connection for an existing account or new credentials.

By Account ID
{ "id": "account_id" }
By Credentials
{ "provider": "smtp", "credentials": { "host": "smtp.example.com", "port": 465, "user": "user@example.com", "pass": "pass" } }

Warmup

GET/warmup|POST/warmup

GET returns warmup status for all accounts. POST triggers warmup cycle.

GET Response
{ "accounts": [{
 "id": "...", "email": "sender@example.com", "provider": "smtp",
 "warmupEnabled": true, "warmupStartDate": "...", "healthScore": 85,
 "dailyLimit": 50, "warmupDay": 15, "warmupProgress": 50
}] }

Reply Detection

POST/reply-detection

Start reply detection for all user email accounts. Checks IMAP for new replies.

Response
{ "success": true, "message": "Reply detection started" }

Templates

GET/templates|POST/templates

Manage email templates. Supports {{variable}} placeholders. Content safety check blocks phishing/scam content.

POST - Create Template
{
 "name": "Welcome Email",
 "subject": "Welcome {{firstName}}!",
 "body": "<h1>Hi {{firstName}}</h1><p>Thanks for joining {{company}}.</p>",
 "language": "en"
}
Response
{ "template": { "id": "tpl_abc", "name": "Welcome Email", "subject": "...", "body": "...", "variables": ["firstName", "company"] } }

Campaign Analytics

GET/analytics/{campaignId}

Get detailed analytics for a campaign including daily breakdown.

Response
{
 "summary": { "total": 100, "sent": 95, "delivered": 90, "opened": 45, "replied": 8, "bounced": 5, "failed": 0 },
 "daily": [
 { "date": "2026-01-01", "sent": 50, "delivered": 48, "opened": 20, "replied": 3, "bounced": 2 }
 ]
}

A/B Tests

GET/ab-tests?campaignId=xxx|POST/ab-tests
POST - Create A/B Test
{
 "campaignId": "cmp_abc",
 "testName": "Subject Line Test",
 "variants": [
 { "name": "Variant A", "subject": "Quick question", "body": "...", "isControl": true, "weight": 50 },
 { "name": "Variant B", "subject": "Hey {{firstName}}", "body": "...", "weight": 50 }
 ],
 "sampleSize": 100,
 "winningMetric": "open_rate"
}

A/B Test Detail

GET/ab-tests/{id}|DELETE/ab-tests/{id}

GET returns full test results with variant performance. DELETE cancels the test.

GET Response
{ "test": {
 "id": "...", "name": "Subject Line Test", "status": "running", "winningMetric": "open_rate",
 "variants": [
 { "id": "...", "name": "Variant A", "subject": "Quick question", "sentCount": 50, "openCount": 20, "replyCount": 3 },
 { "id": "...", "name": "Variant B", "subject": "Hey {{firstName}}", "sentCount": 50, "openCount": 25, "replyCount": 5 }
 ]
} }

Webhooks

GET/webhooks|POST/webhooks|DELETE/webhooks

Receive real-time event notifications. Supported events:

email.sentemail.deliveredemail.openedemail.clicked email.repliedemail.bouncedemail.failedemail.unsubscribed campaign.startedcampaign.completedcontact.createdcontact.verified
POST - Create Webhook
{ "url": "https://your-app.com/webhook", "events": ["email.opened", "email.replied"] }
Webhook Payload
{ "event": "email.opened", "timestamp": "2026-01-01T12:00:00Z", "data": { "emailId": "...", "recipient": "john@example.com" } }

Webhook Logs

GET/webhooks/{id}/logs?limit=50

View delivery logs for a specific webhook.

Response
{ "logs": [{
 "id": "...", "event": "email.opened", "payload": {...}, "status": "delivered",
 "statusCode": 200, "success": true, "createdAt": "..."
}] }

Teams

GET/teams|POST/teams
POST - Create Team
{ "name": "Sales Team" }

Team Detail

GET/teams/{id}|PUT/teams/{id}|DELETE/teams/{id}
PUT - Update Member Role
{ "memberId": "member_abc", "role": "admin" }
DELETE - Remove Member
{ "memberId": "member_abc" }

Invite / Accept

POST/teams/{id}/invite
Request Body
{ "email": "colleague@example.com", "role": "member" }
POST/teams/accept
Request Body
{ "token": "invite_token_from_email" }

API Keys

GET/api-keys|POST/api-keys|DELETE/api-keys

Manage API keys for programmatic access. Keys start with cr_ and are shown only on creation.

POST - Create API Key
{
 "name": "My Integration",
 "permissions": ["read", "write"],
 "rateLimit": 1000,
 "expiresInDays": 90
}
Response (key shown only once)
{ "apiKey": { "id": "...", "name": "My Integration", "key": "cr_a1b2c3d4...", "permissions": ["read", "write"], "rateLimit": 1000 } }

White Label

GET/white-label|POST/white-label|DELETE/white-label

Customize branding for your MailMimo instance.

POST - Update Config
{
 "brandName": "MyEmailTool",
 "logoUrl": "https://example.com/logo.png",
 "primaryColor": "#4f46e5",
 "secondaryColor": "#10b981",
 "customDomain": "mail.example.com",
 "emailFooter": "Powered by MyEmailTool",
 "unsubscribeText": "Click here to unsubscribe"
}

Unsubscribers

GET/unsubscribe/list|POST/unsubscribe/list

GET returns all unsubscribed contacts (max 500). POST resubscribes a contact.

POST - Resubscribe
{ "contactId": "contact_abc" }
Response
{ "success": true, "message": "Contact resubscribed" }