MailRush.io API

Integrate your application with our API v2 and webhooks: send emails, manage contacts and pick up replies and other events as they happen.

MailRush.io

Illustration with example data. Reply and bounce events are abridged; see the API documentation for every field.

Send in-app emails and manage contacts

Use our REST API with JSON over HTTPS. Authenticate every request with your API key in the x-api-key header.

  • POST /api/v2/email — Send email (no attachments)
  • POST /api/v2/email/validate — Queue validation of an email address
  • POST /api/v2/contacts — Create contact & tag
  • POST /api/v2/contacts/unsubscribe — Unsubscribe contact
<?php
$baseUrl = 'https://app2.mailrush.io';
$apiKey  = 'YOUR_API_KEY';

// Send Email - POST /api/v2/email
$payload = [
  'fromEmail' => 'notifications@yourcompany.com',
  'recipientEmail' => 'customer@domain.com',
  'subject' => 'Your receipt',
  'html' => '<h1>Thank you for your purchase</h1><p>Your receipt is available.</p>'
];

$ch = curl_init($baseUrl . '/api/v2/email');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'Content-Type: application/json',
  'x-api-key: ' . $apiKey
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

Transactional emails for in-app messaging

Send one email per request from any active email account in your organization: one of your own connected mailboxes or a MailRush email account. API emails are sent exactly as you provide them, without tracking, footer or unsubscribe header, and count toward your plan's sending limits. Use an Idempotency-Key header to retry safely without sending the same email twice.

MailRush email accounts can run on a dedicated-IP server used only by your organization, so other customers' sending does not affect the IP and you build your own sending reputation. Poor sending can still get it blocked.

Build on the MailRush.io API

Send emails, validate addresses and manage contacts from your own app. Start free for 14 days and get your API key from Settings. No credit card required.