This is the official API documentation for MailRush.io.

Below you will find a current list of the available methods for MailRush.io.

NOTE: You will need to have a valid account to use the API.

Base URL: https://app.mailrush.io/api/v1

Authentication

MailRush.io use the API Key authentication mechanism where you need to send your private API Key on every call you make to MailRush.io API. MailRush.io API use HTTPS/TLS for secure transportation the data sent to MailRush.io API.

Status Codes

MailRush.io API will respond with one of the following HTTP status codes as part of the JSON response to any API request.

Status Response Description
200 SUCCESS Request completed successfully.
202 ACCEPTED Request was accepted.
400 INVALID REQUEST The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 UNAUTHORIZED Authentication credentials were missing or incorrect.
403 FORBIDDEN The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why.
404 NOT FOUND The URI requested is invalid or the resource requested does not exists.
405 METHOD NOT ALLOWED Method doesn't exist or is not allowed.
429 TOO MANY REQUESTS Rate Limit Exceeded. Returned when a request cannot be served due to the application’s rate limit having been exhausted for the resource. See Rate Limiting.
500 INTERNAL SERVER ERROR Server side error

Supported Methods

Mail Send API Method

The Mail Send API Method allow you to send emails via an HTTPS POST request to the API Server. Its use is inteded for single Email sending capabilites.

Call

POST https://app.mailrush.io/api/v1/mail/send
Data { apikey: "your-api-key", from: 'Bob <youruser@yourmailrushdomain.tld>', to: 'alice@destination.tld', subject: 'Example Subject', text: "Plain text message", html: "<p>Html message</p>" }

JSON Response

Success:
{"code": "202","result": "OK"}
Error:
{ code: "401", result: "Invalid apikey" }

Code Examaples

PHP
<?php

//API Url
$url = 'https://app.mailrush.io/api/v1/mail/send';
    
//Initiate cURL.
$ch = curl_init($url);
    
//The JSON data.
$jsonData = array(
    'apikey' => 'your-api-key',
    'from' => 'bob@yourdomain.com',
    'to' => 'alice@otherdomain.com',
    'subject' => 'Example Subject',
    'text' => 'Hello World, this is a text.',
    'html' => '<p>Hello World, this is a text.</p>';
);
    
//Encode the array into JSON.
$jsonDataEncoded = json_encode($jsonData);
    
//Tell cURL that we want to send a POST request.
url_setopt($ch, CURLOPT_POST, 1);
    
//Attach our encoded JSON string to the POST fields.
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
    
//Set the content type to application/json
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); 
    
//Execute the request
$result = curl_exec($ch);                       

                                

                                

                                

                                

Mail List Incoming API Method

The Mail List Incoming API Method return a list of incoming emails received by your MailRush.io Email address.

Call

POST https://app.mailrush.io/api/v1/mail/list
Data { apikey: "your-api-key", message_id: '', page: '', results: '10', folder: '', date_from: '', date_to: '' }

Parameters

Parameter Name Value Required/Optional Description
apikey string required Your MailRush.io API Key.
message_id string optional Email message identifier
page int optional Result page for paging. Default 1.
results int optional Results to show per page. Default 10.
folder string optional Folder result to retreive. Default 'Inbox'.
date_from datetime optional Starting Date for search. Default current date. Format: 'YYYY-MM-DD HH:MM:SS'
date_to datetime optional Ending Date for search. Default current date. Format: 'YYYY-MM-DD HH:MM:SS'

JSON Response

Success:
{ "code": "202", results: 100, data: [] }
Error:
{ code: "401", result: "Invalid apikey" }

Code Examples