MailRush.io v1 API


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

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
Header content-type x-www-form-urlencoded
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" }

Get all campaigns

This method will retreive all campaigns details for your MailRush.io account via an HTTPS POST

Call

POST https://app.mailrush.io/api/v1/campaign/list
Header content-type x-www-form-urlencoded
Data { "apikey": "your-api-key"}

Parameters

Parameter Name Value Required/Optional Description
apikey string required Your MailRush.io API Key.

JSON Response

Success { "code": "202", "result": "OK", "data": array, "contact_count": int }
Error { "code": "401", "result": "Invalid apikey" }

Add contact to a campaign

The Mail List Incoming API Method subscribe a contact a mailing list asigned to a campaign at MailRush.io via an HTTPS POST

Call

POST https://app.mailrush.io/api/v1/addcontact
Header content-type x-www-form-urlencoded
Body Params { "apikey": "your-api-key", "name" = "John Smith", "email": "john@example.com", "campaignid": "your-campaign-id", "custom1": "custom field 1", "custom2": "custom field 2", "custom3": "custom field 3", "custom4": "custom field 4", "custom5": "custom field 5", "custom6": "custom field 6", "custom7": "custom field 7", "custom8": "custom field 8", "status": "subscribed" }

Parameters

Parameter Name Value Required/Optional Description
apikey string required Your MailRush.io API Key.
name string optional Contact Name for the subscriber.
email string required Valid Email Address format.
campaignid string required The numeric id of the campaign.
custom1 string optional Custom field 1 in your campaign matching your CSV label.
custom2 string optional Custom field 2 in your campaign matching your CSV label.
custom3 string optional Custom field 3 in your campaign matching your CSV label.
custom4 string optional Custom field 4 in your campaign matching your CSV label.
custom5 string optional Custom field 5 in your campaign matching your CSV label.
custom6 string optional Custom field 6 in your campaign matching your CSV label.
custom7 string optional Custom field 7 in your campaign matching your CSV label.
custom8 string optional Custom field 8 in your campaign matching your CSV label.

JSON Response

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

Remove contact from a campaign

Remove a contact from a campaign at MailRush.io via an HTTPS POST

Call

POST https://app.mailrush.io/api/v1/removecontact
Header content-type x-www-form-urlencoded
Body Params { "apikey": "your-api-key", "email": "john@example.com", "campaignid": "your-campaign-id"}

Parameters

Parameter Name Value Required/Optional Description
apikey string required Your MailRush.io API Key.
email string required Valid Email Address format.
campaignid string required The numeric id of the campaign.

JSON Response

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

Update a contact information

The Update Contact API Method updates the contacts information at MailRush.io via an HTTPS POST

Call

POST https://app.mailrush.io/api/v1/campaign/modicontactapi
Header content-type x-www-form-urlencoded
Data { "apikey": "your-api-key", "campaign_id": "capaign's numeric id", "email": "contact's email address", "fields": { "name": "value", "custom1": "value", "custom2": "value", "custom3": "value", "custom4": "value", "custom5": "value", "custom6": "value", "custom7": "value", "custom8": "value"} }

Parameters

Parameter Name Value Required/Optional Description
apikey string required Your MailRush.io API Key.
campaign_id intiger required Campaigns numeric ID. You can get the campaign numeric ID from the extended menu of the campaign, under "Subscription Form".
email string required Valid Email Address for the contact
fields JSON object required The fields JSON object should contain at least one of the following properties to update: name, custom1, custom2, custom3, custom4, custom5, custom6, custom7, custom8

JSON Response

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