Official API documentation for the MailRush.io cold email automation platform. Integrate email sending and contact management into your applications in minutes.
This is the official documentation for MailRush.io API v2. The API is RESTful and uses JSON over HTTPS.
Base URL
https://app2.mailrush.io/api/v2
All requests must include your API key in the x-api-key header.
Send a single email using an SMTP account that belongs to your organization. Attachments are not supported in v2.
Endpoint
POST https://app2.mailrush.io/api/v2/email
Headers: Content-Type: application/json, x-api-key: YOUR_API_KEY
| Field | Type | Required | Notes |
|---|---|---|---|
| fromEmail | string (email) | Yes | Must be an active SMTP account in your organization. |
| recipientEmail | string (email) | Yes | Primary recipient. |
| subject | string | Yes | Cannot be empty. |
| html | string (HTML) | Yes* | Required if text is not provided. |
| text | string | Yes* | Required if html is not provided. If omitted and html is present, a text version is auto-generated. |
| replyTo | string (email) | No | Defaults to fromEmail when omitted. |
Constraints
Request example (cURL)
curl -X POST https://app2.mailrush.io/api/v2/email -H "Content-Type: application/json" -H "x-api-key: YOUR_API_KEY" -d '{
"fromEmail": "notificaciones@yourdomain.com",
"recipientEmail": "alice@example.com",
"subject": "Welcome!",
"html": "Hello
Your account is ready.
"
}'
Successful response
{ "success": true, "messageId": "" }
Create a contact inside your organization and assign it to a tag. If the tag does not exist, it is created. Duplicate emails are rejected.
Endpoint
POST https://app2.mailrush.io/api/v2/contacts
Headers: Content-Type: application/json, x-api-key: YOUR_API_KEY
| Field | Type | Required | Notes |
|---|---|---|---|
| string (email) | Yes | Unique per organization (non-deleted contacts). | |
| first_name | string | No | — |
| last_name | string | No | — |
| title | string | No | Honorific or role label. |
| company | string | No | — |
| phone | string | No | — |
| custom1..custom6 | string | No | Free-form fields. |
| tag | string | No | Defaults to untagged when omitted. |
Rules
400.422 Unexpected fields.Request example (cURL)
curl -X POST https://app2.mailrush.io/api/v2/contacts -H "Content-Type: application/json" -H "x-api-key: YOUR_API_KEY" -d '{
"email": "maria.perez@example.com",
"first_name": "Maria",
"last_name": "Perez",
"company": "Example Inc.",
"tag": "customers"
}'
Successful response (201)
{
"success": true,
"contact_id": 12345,
"public_id": "4f9d2f0e3b1c4e21b6c2f8d1",
"tag": "customers"
}
Unsubscribe a contact (opt-out) by email within your organization. The operation is idempotent.
Endpoint
POST https://app2.mailrush.io/api/v2/contacts/unsubscribe
Headers: Content-Type: application/json, x-api-key: YOUR_API_KEY
| Field | Type | Required | Notes |
|---|---|---|---|
| string (email) | Yes | Must exist in your organization. Extra keys are rejected (422). |
Request example (cURL)
curl -X POST https://app2.mailrush.io/api/v2/contacts/unsubscribe -H "Content-Type: application/json" -H "x-api-key: YOUR_API_KEY" -d '{ "email": "jon@example.com" }'
Successful responses
{ "success": true, "message": "Unsubscribed successfully" }
{ "success": true, "message": "Already unsubscribed" }
MailRush.io uses API Key authentication. Include your private key in the x-api-key header on every request. All endpoints require HTTPS/TLS.
x-api-key: YOUR_API_KEY
Content-Type: application/json
| Status | Label | Description |
|---|---|---|
| 200 | OK | Successful operation. |
| 201 | Created | Resource created (e.g., contact). |
| 400 | Bad Request | Business rule violation (e.g., duplicate contact email). |
| 401 | Unauthorized | Invalid API key or inactive organization. |
| 403 | Forbidden | Not allowed by business rules (e.g., fromEmail not permitted). |
| 404 | Not Found | Resource not found (e.g., contact to unsubscribe does not exist). |
| 422 | Unprocessable Entity | Validation failed (missing/invalid fields, unexpected keys). |
| 429 | Too Many Requests | Sending limits exceeded (email endpoint). |
| 500 | Server Error | Internal or SMTP provider error. |