API Documentation

Integrate Email Warmer into your applications with our comprehensive REST API. Manage mailboxes, monitor warming progress, and test deliverability programmatically.

Getting Started

The Email Warmer API is a RESTful API that allows you to programmatically manage your email warmup campaigns, test deliverability, and monitor performance. All API requests are made over HTTPS and responses are returned in JSON format.

Base URL

https://api.emailwarmer.io/v1

Rate Limits

API requests are rate limited to 1000 requests per hour per API key. Rate limit headers are included in all responses:

  • X-RateLimit-Limit - Maximum requests per hour
  • X-RateLimit-Remaining - Remaining requests in current window
  • X-RateLimit-Reset - Time when the rate limit resets

Authentication

All API requests require authentication using your API key. Include your API key in the Authorization header of every request.

Getting Your API Key

  1. Log in to your Email Warmer dashboard
  2. Navigate to Settings → API Keys
  3. Click "Generate New API Key"
  4. Copy and securely store your API key

Making Requests

Include your API key in the Authorization header:

curl -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     https://api.emailwarmer.io/v1/mailboxes

Mailboxes API

List Mailboxes

Retrieve a list of all mailboxes in your account.

GET /mailboxes

Response

{
  "data": [
    {
      "id": "mb_1234567890",
      "email": "[email protected]",
      "provider": "gmail",
      "status": "active",
      "reputation_score": 94.2,
      "daily_volume": 50,
      "created_at": "2025-09-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "total": 1
  }
}

Create Mailbox

Add a new mailbox to your account for warming.

POST /mailboxes

Request Body

{
  "email": "[email protected]",
  "provider": "gmail",
  "daily_volume": 50,
  "credentials": {
    "access_token": "ya29.a0AfH6SMC...",
    "refresh_token": "1//04..."
  }
}

Response

{
  "data": {
    "id": "mb_1234567890",
    "email": "[email protected]",
    "provider": "gmail",
    "status": "pending_verification",
    "reputation_score": null,
    "daily_volume": 50,
    "created_at": "2025-09-15T10:30:00Z"
  }
}

Get Mailbox Details

Retrieve detailed information about a specific mailbox.

GET /mailboxes/{id}

Response

{
  "data": {
    "id": "mb_1234567890",
    "email": "[email protected]",
    "provider": "gmail",
    "status": "active",
    "reputation_score": 94.2,
    "daily_volume": 50,
    "emails_sent_today": 23,
    "inbox_placement_rate": 89.3,
    "spam_rate": 2.1,
    "created_at": "2025-09-15T10:30:00Z",
    "last_activity": "2025-09-15T14:22:00Z"
  }
}

Spam Tests API

Create Spam Test

Initiate a new spam test and get the tracking code and seed list.

POST /spam-tests

Response

{
  "data": {
    "id": "st_1234567890",
    "tracking_code": "EW12345678",
    "seed_list": [
      "[email protected]",
      "[email protected]",
      "[email protected]"
    ],
    "status": "pending",
    "created_at": "2025-09-15T10:30:00Z"
  }
}

Get Spam Test Results

Retrieve the detailed results of a completed spam test.

GET /spam-tests/{id}

Response

{
  "data": {
    "id": "st_1234567890",
    "tracking_code": "EW12345678",
    "status": "completed",
    "spam_score": 2.5,
    "placement_results": {
      "inbox": 85,
      "spam": 10,
      "promotions": 5
    },
    "analysis": {
      "spf_status": "pass",
      "dkim_status": "pass",
      "dmarc_status": "pass",
      "blacklist_status": "clean",
      "spam_words": ["urgent", "limited time"],
      "broken_links": 0
    },
    "created_at": "2025-09-15T10:30:00Z",
    "completed_at": "2025-09-15T10:35:00Z"
  }
}

Analytics API

Get Analytics

Retrieve analytics data for your mailboxes.

GET /analytics?mailbox_id={id}&period=7d

Query Parameters

  • mailbox_id - Filter by specific mailbox (optional)
  • period - Time period: 1d, 7d, 30d, 90d (default: 7d)
  • provider - Filter by email provider (optional)

Response

{
  "data": {
    "overview": {
      "total_mailboxes": 3,
      "active_mailboxes": 2,
      "avg_reputation_score": 94.2,
      "avg_inbox_placement": 89.3,
      "total_emails_sent": 1247
    },
    "daily_stats": [
      {
        "date": "2025-09-15",
        "emails_sent": 156,
        "reputation_score": 94.2,
        "inbox_placement_rate": 89.3,
        "spam_rate": 2.1
      }
    ],
    "mailbox_performance": [
      {
        "mailbox_id": "mb_1234567890",
        "email": "[email protected]",
        "reputation_score": 96.5,
        "inbox_placement_rate": 94.2,
        "emails_sent": 487
      }
    ]
  }
}

Webhooks

Webhooks allow you to receive real-time notifications about events in your Email Warmer account. Configure webhook endpoints to stay updated on mailbox status changes, reputation updates, and more.

Supported Events

  • mailbox.connected - Mailbox successfully connected
  • mailbox.paused - Mailbox warming paused
  • mailbox.resumed - Mailbox warming resumed
  • reputation.updated - Reputation score updated
  • spam_test.completed - Spam test completed

Webhook Payload

{
  "id": "evt_1234567890",
  "type": "reputation.updated",
  "created": "2025-09-15T10:30:00Z",
  "data": {
    "mailbox_id": "mb_1234567890",
    "email": "[email protected]",
    "reputation_score": 94.2,
    "previous_score": 92.1
  }
}

Error Handling

The API uses conventional HTTP response codes to indicate success or failure. All errors return a JSON response with details about what went wrong.

Error Response Format

{
  "error": {
    "code": "invalid_request",
    "message": "The request was invalid",
    "details": {
      "field": "email",
      "reason": "Invalid email format"
    }
  }
}

Common Error Codes

Code Status Description
invalid_request 400 The request was invalid or malformed
unauthorized 401 Invalid or missing API key
forbidden 403 Insufficient permissions
not_found 404 Resource not found
rate_limited 429 Rate limit exceeded

SDKs and Libraries

Get started quickly with our official SDKs and community libraries

Python SDK

Official Python library for Email Warmer API

View on GitHub →

JavaScript SDK

Official JavaScript/Node.js library

View on GitHub →

PHP SDK

Official PHP library for Email Warmer API

View on GitHub →

Ready to Integrate?

Start building with our API and improve your email deliverability programmatically.