Use our simple REST API to send in-app emails and manage contacts with MailRush.io.
POST /api/v2/email — Send email (no attachments)POST /api/v2/contacts — Create contact & tagPOST /api/v2/contacts/unsubscribe — Unsubscribe contact<?php // Base URL $baseUrl = 'https://api.your-domain.com'; $apiKey = 'YOUR_API_KEY'; // 1) Send Email - POST /api/v2/email $emailUrl = $baseUrl . '/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>', 'cc' => ['accounting@yourcompany.com'] ]; $ch = curl_init($emailUrl); 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); $res = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo "Email status: " . $status . " " . $res . " "; // 2) Create Contact - POST /api/v2/contacts $contactsUrl = $baseUrl . '/api/v2/contacts'; $contact = [ 'email' => 'maria.perez@example.com', 'first_name' => 'Maria', 'last_name' => 'Perez', 'company' => 'Example Inc.', 'tag' => 'customers' ]; $ch = curl_init($contactsUrl); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($contact)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'x-api-key: ' . $apiKey ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $res = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); // 3) Unsubscribe Contact - POST /api/v2/contacts/unsubscribe $unsubUrl = $baseUrl . '/api/v2/contacts/unsubscribe'; $unsub = [ 'email' => 'maria.perez@example.com' ]; $ch = curl_init($unsubUrl); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($unsub)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'x-api-key: ' . $apiKey ]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $res = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch);
For many companies the integration of a reliable Email Marketing service into their application is of great importance as corporate communication around Email services for transactional messages is required. Maintaining a healthy SMTP infrastructure could be challenging as spam filters, blacklist and technology know how is fundamental for a successfull emailing campaign. Our Email Marketing platform is build from ground up to handle transactional and marketing emails while our team of techs keep track of every aspect of the infrastrucutre allow you to focus in your business operation.
At mailrush.io, each account with Dedicated IP is isolated and characterized by its own reputation. This isolation ensures higher reputation and control over the effectiveness of your campaigns.
With our Email Marketing API you can send Emails from web, desktop and mobile applications using our Web App or API.