MailRadar API Documentation

Base URL: https://mailradar.co/api/v1

Authentication

All API requests require authentication via an API key or Bearer token.

HEADERX-API-Key: mr_your_api_key

Or use a Bearer token from login:

HEADERAuthorization: Bearer your_jwt_token

Run Deliverability Test

POST/api/v1/test

Request Body

FieldTypeRequiredDescription
from_emailstringYesSender email address to test
to_emailstringNoRecipient email (optional)
subjectstringNoEmail subject for spam analysis
bodystringNoEmail body/HTML for content analysis

cURL

curl -X POST https://mailradar.co/api/v1/test   -H "X-API-Key: mr_your_api_key"   -H "Content-Type: application/json"   -d '{
    "from_email": "hello@yourdomain.com",
    "subject": "Welcome aboard!",
    "body": "Thanks for signing up."
  }'

Python

import requests

response = requests.post(
    "https://mailradar.co/api/v1/test",
    headers={"X-API-Key": "mr_your_api_key"},
    json={
        "from_email": "hello@yourdomain.com",
        "subject": "Welcome aboard!",
        "body": "Thanks for signing up."
    }
)
print(response.json())

Node.js

const response = await fetch('https://mailradar.co/api/v1/test', {
  method: 'POST',
  headers: {
    'X-API-Key': 'mr_your_api_key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    from_email: 'hello@yourdomain.com',
    subject: 'Welcome aboard!',
    body: 'Thanks for signing up.'
  })
});
const data = await response.json();
console.log(data);

PHP

$ch = curl_init('https://mailradar.co/api/v1/test');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'X-API-Key: mr_your_api_key',
        'Content-Type: application/json'
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'from_email' => 'hello@yourdomain.com',
        'subject' => 'Welcome aboard!',
        'body' => 'Thanks for signing up.'
    ]),
    CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
echo $response;

API Key Management

GET/api/v1/keys - List all keys
POST/api/v1/keys - Create new key
DELETE/api/v1/keys/{key_id} - Revoke key

Dashboard Stats

GET/api/v1/dashboard/stats - Usage statistics
GET/api/v1/dashboard/recent - Recent test results

Error Codes

CodeMeaning
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Plan limit reached
429Too Many Requests - Rate limit exceeded
500Server Error